[PD] Converting list to message, was: OSCprepend to message; input to sendOSC?

Martin Peach martinrp at vax2.concordia.ca
Thu Sep 22 22:24:39 CEST 2005


Urs Liska wrote:

> Hi, sorry for the traffic, but now I obviously found the solution myself:
>
> [OSCroute /...]
> |
> [list prepend send]
> |
> [list trim]
> |
> [sendOSC]
>
> seems to work as there now is the 'send' in front of the OSC message 
> but the 'list' is trimmed away (I didn't notice that before).
>

I don't have a 'list' object so I used the following methods:
e.g. for "/synth/voices/*/stop" you would do:
[symbol /synth/voices/*/stop]
|
[send $1(
|
[sendOSC]

For "/synth/preset 11" this works:
[symbol /synth/preset] [11\
|                       |
[pack s f                ]
|
[send $1 $2(
|
[sendOSC]

For "/synth/VCF/689 1.5" you could do:
[689\
|
[sprintf /synth/VCF/%d]
|
[symbol $1] [1.5\
|           |
[pack s f    ]
|
[send $1 $2(
|
[sendOSC]


...but if you already have the list and don't need to construct it just 
a [prepend send] should work:
[OSCroute]
|
[prepend send]
|
[sendOSC]

Martin







More information about the Pd-list mailing list