Hallo,
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__
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
So effectivly I'm looking for something like "OSCprepend" analogous to "OSCroute". How could this be done?
Ah, well, forget about this. As usual, just after sending a mail, I found a solution in zexy's niagara. It is attached...
Frank Barknecht _ ______footils.org__
Here is a patch I worked up for the purpose, using [tosymbol] and [fromsymbol] and [makesymbol] (also in ZEXY). Seems a shame to let it go to waste, even when a perfectly good solution has already been found!
#N canvas 201 110 433 331 12; #X obj 55 279 print; #X obj 55 147 makefilename /osc1%s; #X msg 55 73 /value 1 2 3; #X obj 55 126 tosymbol; #X obj 222 280 print; #X msg 222 43 /value 1 2 3; #X obj 222 126 tosymbol; #X obj 55 169 fromsymbol; #X obj 222 218 makesymbol %s%s; #X obj 222 192 pack s s; #X obj 222 147 t b s; #X obj 222 171 symbol /osc1; #X obj 222 239 fromsymbol; #X msg 232 63 /setting new; #X obj 289 144 tosymbol; #X msg 289 115 /osc1; #X msg 332 114 /osc2; #X obj 186 38 cnv 1 1 260 empty empty empty 20 12 0 14 -260818 -66577 0; #X text 56 11 idea #1; #X text 219 9 idea #2; #X connect 1 0 7 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 10 0; #X connect 7 0 0 0; #X connect 8 0 12 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 10 1 9 1; #X connect 11 0 9 0; #X connect 12 0 4 0; #X connect 13 0 6 0; #X connect 14 0 11 1; #X connect 15 0 14 0; #X connect 16 0 14 0;