[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Re: OSC trouble Solution




Awesome, huh ?
Just make sure to remove the 59999 listeners you don't need after you see which one responded ;-)

As you can see, I was going to extremes to solve this problem.


8-)

I had that instinct as well! Nothing like brute force in those cases where elegance is proving elusive!

But see my other post for another approach.

S.

scott, with your method NetAddr spits the default port arg (nil) and keeps listening to all ports. 
josts method actually works!

b = OSCresponder(nil, 'message', {arg time, responder, msg, addr;
[addr.addr, addr.port].postln;
OSCresponderNode(addr, 'message', {arg time, responder, msg;
[time, msg, addr.addr, addr.port].postln;
}).add;
}).add.removeWhenDone;

MAX
[ 949382712.82658, [ message, 0 ], 2130706433, nil ]
PD
[ 789.327569007, [ message, 1, 2, 3 ], 2130706433, nil ]


60000.do{arg i; n = n.add(NetAddr("127.0.0.1", i ))};
n.do{|it, i| a = a.add( OSCresponder(it,'/c_set',{arg a,b,c; [a,b,c,i].postln}).add ) }

PD
[ 1360.424519014, an OSCresponder, [ /c_set, 1, 2, 3 ], 54114 ]
MAX
[ 949382712.8401, an OSCresponder, [ /c_set, 0 ], 49181 ]


tom