[PD] Replacing first element in a list

Frank Barknecht fbar at footils.org
Sun Feb 29 12:36:11 CET 2004


I'm stuck with a problem regarding lists. Say I have a list of unknown
length, but at least two elements long. The first element always is a
symbol, in fact, it's an OSC-like selector like "/value". So the full
lists could be something like: 

 "/value 1 2 3" or "/setting new"

Now I want to change this first element and add another OSC-selector
upfront. Afterwards above example should then be: 
 "/osc1/value 1 2 3" rsp. "/osc1/setting new"

This has to be dynamic, so that I also could create these lists:
 "/osc2/value 1 2 3" rsp. "/osc2/setting new"

So effectivly I'm looking for something like "OSCprepend" analogous to
"OSCroute". How could this be done?

 Frank Barknecht                               _ ______footils.org__

More information about the Pd-list mailing list