[PD] split off first path component of osc messages

Frank Barknecht fbar at footils.org
Tue Jun 28 12:50:05 CEST 2005

Lorenz Schori hat gesagt: // Lorenz Schori wrote:

> i'd like to use osc for controlling a rather big number of abstracts.  
> because the "voice numbers" are contained in the path part of the osc  
> messages i currently have to do something like
> [OSCroute /0 /1 /2 /3 /4 /5 /6 ...]
> is there a way to split off the first path part of an osc message? e.g.
> [OSCfirstpathcomponent]
> |                     |
> <number or symbol>    <rest of osc message>

You can get the <rest of osc message> part using [OSCroute /*], and to
get the first element, you could use [s2l /]---[$1( from zexy and
maybe prepending [symbol $1( to the incoming OSC message. However all
trailing arguments to the OSC message will be lost in the list, that
s2l procudes.

 Frank Barknecht                               _ ______footils.org__
          _ __latest track: "scans" _ http://footils.org/cms/show/41

More information about the Pd-list mailing list