[PD] routeOSC - dynamic routing?

IOhannes m zmoelnig zmoelnig at iem.at
Thu Aug 8 11:34:45 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2013-08-07 15:12, Colet Patrice wrote:
> Le 07/08/2013 08:15, puredata at 11h11.com a écrit :
>> hi all,
>> 
>> i have more than 50 OSC messages to [routeOSC], i would like to
>> avoid having to cut and paste & click and drag. what are my
>> options here?
>> 
>> [routeOSC /knob1 /knob2 ...] |              | [s $0-knob1]   [s
>> $0-knob2]
>> 
>> thanks
> 
> someting like this, and no need for routeOSC
> 
> [dumpOSC]-[set $1 $2, bang(--[  (

[dumpOSC]?
is this zombi still around?

> 
> [r /knob1]
> 

this is basically the same as roman's solution, but imho both miss
some points:

- - by switching from [routeOSC] to you lose pattern matching.
the OSC-message `/knob* 0` should set *all* knobs

- - you are giving up localization. where's the $0 gone to?

- - you assume a fixed format of the knob message, namely that it has
exactly one argument.


something like this should be better:

[routOSC /knobs]
|
[t      a      a]
|               |
|               [symbol]
|               |
|               [pack s $0]
|               |
|               [symbol $2-$1(
|               |
[list split 1]  |
       |        |
       [send    ]


which still doesn't give you pattern matching.


i once did a send-based solution with pattern matching which was quite
complicated.
it would include a address-registration, where each [receive] would
register it's name, e.g. "/foo/knob1/value", using a wrapper
abstraction around [r].
all these labels were filled into a central pattern-matching object
(zexy's [matchbox] was made for this).
the output of [unpackOSC] would be split into the address and the
arguments, the address gets expanded by [matchbox] to all possible
targets and the data is sent to those targets using a dynamic send.

[routeOSC] should be faster though, as it can operate on a more local
level. (thus having to compare against less possibilities).


mfgasdr
IOhannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlIDZjAACgkQkX2Xpv6ydvQSvACdEqlHGVTxK8yFAhT7GyeOEac0
ZC0AoOsXXaSqu3/DqB5zioQqmLwNBwMA
=O3d2
-----END PGP SIGNATURE-----



More information about the Pd-list mailing list