Hi again,
this wouldnt work of course, my problem is a bit different than i thought.
in my path I will have many similar objects, far more that 20 possibly.
And the OSCroute object is limited to 20 addresses. So I use a normal
route object to route the info to the objects.
I need to send several types of messages to that object. Lets think its
a sample playr. When i play the sample i need to pass numbers like freq,
voluume, etc... but at some other point i also need to pass the object
the path to load the sample from the harddrive.
i am using the following structure for the OSC messages
/spin 1 100 100
meaning this
/adress identifier volume frequency
But at some other point i need to pass
/spin 1 "C:\mysound.wav"
or
/spin 1 "someothertag"
I attach an example of what i am doing.
suggestions are welcome.
thanks!
try casting your string to symbol with the [symbol] object before the
[select]
I see. but the problem is that I am sending several types of messages
under the same address like
/spin 111 0 12
/spin xxx
/spin zzz
maybe i should specify another address? like:
/spin/xxx 1
This way I might not need the select object but the OSCroute. Still
trying to format my way of thinking into OSC ;-)
--
enrike ::
#N canvas 219 135 710 507 10;
#X text 126 12 gets OSC from port 9000;
#X obj 40 13 dumpOSC 9000;
#X obj 501 53 OSC;
#X msg 501 33 version;
#X floatatom 40 216 5 0 0 0 - - -;
#X text 75 216 vol;
#X obj 81 84 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X msg 81 105 ; pd dsp $1;
#X text 85 139 ON/OFF;
#X obj 207 203 route 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
20 21;
#X floatatom 122 72 5 0 0 0 - - -;
#X obj 40 38 OSCroute /vol /bang /numOfSpins /new /open /save /saveas
/quit /spin;
#X obj 377 107 s pd;
#X msg 377 88 quit;
#X obj 164 71 print new;
#X obj 205 91 print open;
#X obj 246 71 print save;
#X obj 288 91 print saveas;
#X obj 155 163 osc~;
#X floatatom 246 359 5 0 0 0 - - -;
#X floatatom 325 310 5 0 0 0 - - -;
#X floatatom 298 326 5 0 0 0 - - -;
#X floatatom 272 342 5 0 0 0 - - -;
#X text 341 291 loch , locv , rotation , spin width;
#X obj 246 290 unpack f f f f;
#X obj 50 376 select born dead;
#X obj 50 352 symbol;
#X obj 50 407 print born;
#X obj 95 435 print dead;
#X obj 141 398 print oo;
#X text 442 139 messages i might receive: /spin 1 100 100 362 59 /spin
born /spin C:/mysound.wav;
#X text 350 331 if i do this i cannot handle the messges that contain
strings.;
#X text 204 392 and if i do this i cannot handle the messges that contain
lost with numbers.;
#X connect 1 0 11 0;
#X connect 3 0 2 0;
#X connect 6 0 7 0;
#X connect 9 0 24 0;
#X connect 9 0 26 0;
#X connect 11 0 4 0;
#X connect 11 1 6 0;
#X connect 11 2 10 0;
#X connect 11 3 14 0;
#X connect 11 4 15 0;
#X connect 11 5 16 0;
#X connect 11 6 17 0;
#X connect 11 7 13 0;
#X connect 11 8 9 0;
#X connect 13 0 12 0;
#X connect 24 0 19 0;
#X connect 24 1 22 0;
#X connect 24 2 21 0;
#X connect 24 3 20 0;
#X connect 25 0 27 0;
#X connect 25 1 28 0;
#X connect 25 2 29 0;
#X connect 26 0 25 0;