hi, i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded... ChucK: OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent(); fun void pollOscEvent() { while ( true ) { oe => now; while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } } SC: NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 ); what am i doing wrong? i tried other ports without success... thanks, -sciss-
should add that it has nothing to do with SC, as the same problem occurs from for example PD: #N canvas 505 179 435 193 10; #X obj 75 52 sendOSC; #X msg 39 17 connect 127.0.0.1 6449; #X msg 20 93 send /test 33; #X msg 209 17 connect localhost 6449; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0; Am 04.05.2008 um 20:43 schrieb Sciss:
hi,
i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Hi Sciss, I had the same with PD and Chuck and the reason was taht PD sends numbers as floats. The same may be true for SC. Probably you can force them to be sent as ints, or try to receive a float in Chuck and see if the message is recieved. hope it helps, eduard On 4 May 2008, at 21:02, Sciss wrote:
should add that it has nothing to do with SC, as the same problem occurs from for example PD:
#N canvas 505 179 435 193 10; #X obj 75 52 sendOSC; #X msg 39 17 connect 127.0.0.1 6449; #X msg 20 93 send /test 33; #X msg 209 17 connect localhost 6449; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0;
Am 04.05.2008 um 20:43 schrieb Sciss:
hi,
i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
no that was not the problem. in fact, PD (which as opposed to max has only a float primitive) automatically uses "i" instead of "f" if the argument is an integer (though float) number. Anyway, SuperCollider has both ints and floats. the problem also occurs if i send a message without any arguments, so it seems that OscRecv is basically broken and does not adher to the OSC specification. ciao, -sciss- Am 05.05.2008 um 13:11 schrieb eduard aylon:
Hi Sciss,
I had the same with PD and Chuck and the reason was taht PD sends numbers as floats. The same may be true for SC. Probably you can force them to be sent as ints, or try to receive a float in Chuck and see if the message is recieved.
hope it helps,
eduard
On 4 May 2008, at 21:02, Sciss wrote:
should add that it has nothing to do with SC, as the same problem occurs from for example PD:
#N canvas 505 179 435 193 10; #X obj 75 52 sendOSC; #X msg 39 17 connect 127.0.0.1 6449; #X msg 20 93 send /test 33; #X msg 209 17 connect localhost 6449; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0;
Am 04.05.2008 um 20:43 schrieb Sciss:
hi,
i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Hi!
Do you get anything at all, i.e., do you see LALA? If not maybe you could
add a printout before the while(oe.nextMsg()) loop.
I've fiddled around a little bit with OSC, but just in ChucK and in Java
(using raw UDP). I tried looking a bit at the docs for PD and SC, but I
didn't find anything on OSC right away (I don't know if the OSC acronymn was
well-chosen - you get a lot of hits on "oscillator" when searching on synth
sites). Are you sure that NetAddr().send() and the PureData stuff formats
the OSC message according to "/test, i" properly, aligning the integer,
inserting zeroes and so on? I don't see the ", i" part in the sender, could
it mistake the argument for a float instead, thus needing people to listen
for "/test, f" instead? I'm guessing the senders in PD and SC don't want you
to add the argument type list.
A basic sanity test could be to implement a sender in another ChucK program
and use that to send to your existing listener. You could have some network
config problem maybe.
Just some random guesses.
/Stefan
On Sun, May 4, 2008 at 8:43 PM, Sciss
hi,
i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Release me, insect, or I will destroy the Cosmos!
both SC3 and PD have a fully working OSC implementation (in fact SuperCollider was one of the programs that introduced OSC). it seems that even within ChucK the communication doesn't work: OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; fun void pollOscEvent() { <<< "HUHU" >>>; while ( true ) { oe => now; <<< "DOING" >>>; while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } } spork ~ pollOscEvent(); me.yield(); OscSend trns; trns.setHost( "127.0.0.1", 6449 ); trns.startMsg( "/test, i" ); trns.addInt( 33 ); the above runs up to printing "HUHU" and that's it.... ciao, -sciss- Am 05.05.2008 um 12:27 schrieb Stefan Blixt:
Hi!
Do you get anything at all, i.e., do you see LALA? If not maybe you could add a printout before the while(oe.nextMsg()) loop.
I've fiddled around a little bit with OSC, but just in ChucK and in Java (using raw UDP). I tried looking a bit at the docs for PD and SC, but I didn't find anything on OSC right away (I don't know if the OSC acronymn was well-chosen - you get a lot of hits on "oscillator" when searching on synth sites). Are you sure that NetAddr().send() and the PureData stuff formats the OSC message according to "/test, i" properly, aligning the integer, inserting zeroes and so on? I don't see the ", i" part in the sender, could it mistake the argument for a float instead, thus needing people to listen for "/test, f" instead? I'm guessing the senders in PD and SC don't want you to add the argument type list.
A basic sanity test could be to implement a sender in another ChucK program and use that to send to your existing listener. You could have some network config problem maybe.
Just some random guesses.
/Stefan
On Sun, May 4, 2008 at 8:43 PM, Sciss
wrote: hi, i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Release me, insect, or I will destroy the Cosmos! _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
You should advance time at some point. Try adding 1::second => now, at the end of the patch. On 5 May 2008, at 13:54, Sciss wrote:
both SC3 and PD have a fully working OSC implementation (in fact SuperCollider was one of the programs that introduced OSC).
it seems that even within ChucK the communication doesn't work:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe;
fun void pollOscEvent() { <<< "HUHU" >>>; while ( true ) { oe => now;
<<< "DOING" >>>;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
spork ~ pollOscEvent(); me.yield();
OscSend trns; trns.setHost( "127.0.0.1", 6449 ); trns.startMsg( "/test, i" ); trns.addInt( 33 );
the above runs up to printing "HUHU" and that's it....
ciao, -sciss-
Am 05.05.2008 um 12:27 schrieb Stefan Blixt:
Hi!
Do you get anything at all, i.e., do you see LALA? If not maybe you could add a printout before the while(oe.nextMsg()) loop.
I've fiddled around a little bit with OSC, but just in ChucK and in Java (using raw UDP). I tried looking a bit at the docs for PD and SC, but I didn't find anything on OSC right away (I don't know if the OSC acronymn was well-chosen - you get a lot of hits on "oscillator" when searching on synth sites). Are you sure that NetAddr().send() and the PureData stuff formats the OSC message according to "/test, i" properly, aligning the integer, inserting zeroes and so on? I don't see the ", i" part in the sender, could it mistake the argument for a float instead, thus needing people to listen for "/test, f" instead? I'm guessing the senders in PD and SC don't want you to add the argument type list.
A basic sanity test could be to implement a sender in another ChucK program and use that to send to your existing listener. You could have some network config problem maybe.
Just some random guesses.
/Stefan
On Sun, May 4, 2008 at 8:43 PM, Sciss
wrote: hi, i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- Release me, insect, or I will destroy the Cosmos! _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
hi sciss, your script works fine, if you add while(true) 1::second=>now; at the end to keep your program running. volker. On 04 May 2008, at 20:43, Sciss wrote:
hi,
i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
thanks volker and eduard! that solved it. i thought if i spork a function it will "survive" the parent code, obviously that was wrong ;-) ciao, -sciss- Am 05.05.2008 um 14:23 schrieb volker böhm:
hi sciss, your script works fine, if you add
while(true) 1::second=>now;
at the end to keep your program running.
volker.
On 04 May 2008, at 20:43, Sciss wrote:
hi,
i'm trying to send an OSC message from SuperCollider to chuck, which doesn't work. no matter what i do, the OscEvent seems never to be decoded...
ChucK:
OscRecv recv; 6449 => recv.port; recv.listen(); recv.event( "/test, i" ) @=> OscEvent oe; spork ~ pollOscEvent();
fun void pollOscEvent() { while ( true ) { oe => now;
while( oe.nextMsg() ) { <<< "LALA" >>>; <<< oe.getInt() >>>; } } }
SC:
NetAddr( "127.0.0.1", 6449 ).sendMsg( "/test", 33 );
what am i doing wrong? i tried other ports without success...
thanks, -sciss-
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (4)
-
eduard aylon
-
Sciss
-
Stefan Blixt
-
volker böhm