Hallo, Orm Finnendahl hat gesagt: // Orm Finnendahl wrote:
does anybody know a way to send arbitrary length messages to arbitrary receivers? I would like to send OSC messages of variable length to pd, specifying the receiver in the first element of the message. It has to be completely dynamic as I want to create pd subpatchers dynamically, so OSCroute won't work.
It would be possible, if e.g. the send object allowed for a set message (or have a right inlet for setting the receiver), or if it was possible to use message boxes with Dollarsigns for arbitrary length messages.
Before patching pd's send I thought to better ask for a standard way to get this done.
There are various ways. If all you need is to add the "send" in front of the variable length list of data you want sendOSC to send, then you can use
whatever ... | [list prepend send] | [list trim] | [sendOSC]
If you actually want to send to a variable receiver, you can use some message-method trickery. I attached an example patch, however I don't like this approach in general.
A third solution would be to use a fixed send/receiver name and use [route] to route incoming messages according to their first element.
You can use the [list prepend]-[list trim] idiom to easily construct such messages.
Note that these solutions may require Pd 0.39 or better.
Frank Barknecht _ ______footils.org_ __goto10.org__