[PD] routeOSC: how to distinguish messages addressed to a node from messages addressed to any descendant

Matteo Sisti Sette matteosistisette at gmail.com
Sun May 22 00:10:34 CEST 2011

On 05/21/2011 10:39 PM, cyrille henry wrote:
> what about [routeOSC /foo/* /foo] ?

That won't work. RouteOSC only matches "one level at a time", meaning 
that [routeOSC /foo/bar] will never match anything (indeed it should 
issue a warning at creation time). That applies also to /foo/*, I've 
just tried it.

Even if it worked, you wouldn't be able to distinguish /foo/bar from 
/foo/etc after that, because routeOSC strips the address that matches * 
(just as it strips the address that matches anything).

I don't see any way out of this, until [routeOSC] will consider a 
message without an address as equivalent to a message addressed to "/".

That would be consistent with the convention that "/" means "the root". 
Any node is the root of its own subtree, so any message addressed to 
/foo is addressed to the root of the /foo subtree. After "routing" a 
message addressed to /foo through [routeOSC /foo] you obtain a message 
that is addressed to the root (of the current subtree), so it should be 
considered equivalent to a messaged addressed to / by any cascaded 
[routeOSC]. In my opinion.

More information about the Pd-list mailing list