[PD] routeOSC - dynamic routing?

tim vets timvets at gmail.com
Thu Aug 8 20:54:57 CEST 2013


hi,
a somewhat related question:
I'm trying to do something like this:
[routeOSC /*/ID]
but that doesn't seem to work
Is it at all possible to use wildcards with routeOSC?
help patch only mentions "[set /*( this will match any OSC message"...
thanks,
Tim



2013/8/8 IOhannes m zmoelnig <zmoelnig at iem.at>

> -----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-----
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130808/f3823933/attachment.htm>


More information about the Pd-list mailing list