< Back to IRCAM Forum

How to make spat5.osc.collect behave like o.collect (remove duplicated addresses)?

CNMAT o.collect has a feature that I often find quite useful : it filters duplicated addresses :

if you send it
/source/1/azim 30, /source/1/azim 50, /source/1/azim 70, bang
it will create a bundle containing only the last message received :
/source/1/azim 70

the same messages, sent to spat5.osc.collect will keep all messages and will create a bundle with different values for the same parameter /source/1/azim

Most of the time, I find o.collect behavior more appropriate : only the latest received value matters ; I don’t want to send / receive all the previous states of this parameter.

I can’t find a way to replicate this o.collect feature with spat.osc externals.

spat5.osc.unique almost do the job… excepted that

only the first occurrence of the duplicated address pattern is kept

I would need it to keep the last occurence

Am I missing something ?
is there a way to achieve this with spat5.osc externals ?

if not… would you consider it as a FR : it could be a mode (attribute) for spat5.osc.unique



Hi Mathieu,

Hum, I’m not sure if you do it with existing spat5 tools…
But that’s a great feature request ! It will be added as soon as possible.


Thanks for this fast reply and for considering this FR :slight_smile:
For the time being I’ll stick to o.collect, but it would be definitely very convenient to rely to only one single lib to rule them all :nerd_face: