Question about new OSC support classes - OscIn
I was looking at the new Osc support classes. When using OscIn, I can't seem to receive more than the first character of a string. If I replace the OscIn code with the equivalent using OscRecv code then the strings come through okay. If I sent the equivalent data to a separate program - e.g. PD - then the strings also come through okay. Conversely, if I send strings from PD to ChucK then, once again, my OscIn code only picks up the first character. So, I am assuming the issue lies with my code for OscIn rather than OscOut. If anyone could put their finger on the problem, I would be most grateful. And a separate issue with .addAddress: "oIn.addAddress( "/chuck/data, ifss" )" works but "oIn.addAddress( "/chuck/data, i f s s" )" doesn't. This didn't seem to be an issue when using with OscRev/.event. Here's the code: //=========================================== OscIn oIn; OscMsg oMsg; 6452 => oIn.port; oIn.addAddress( "/chuck/data, ifss" ); "localhost" => string hostname; 6452 => int port; OscOut xmit; xmit.dest( hostname, port ); spork ~ recvOsc(); spork ~ sendOsc(); while(true) { 1::day => now; } //============================================ fun void sendOsc() { while( true ) { xmit.start( "/chuck/data" ); Math.random2( 30, 80 ) => xmit.add; Math.random2f( 0.1, 1 ) => xmit.add; "xyz" => xmit.add; "abc" => xmit.add; xmit.send(); 1::second => now; } } //============================================ fun void recvOsc() { -1 => int i; -1.0 => float f; "NULL" => string s; "NULL2" => string s2; "NULL3" => string s3; while( true ) { oIn => now; while( oIn.recv(oMsg) ) { oMsg.getInt(0) => i; oMsg.getFloat(1) => f; oMsg.getString(2) => s; oMsg.getString(3) => s2; <<< "got (via OSC):", i, f, s, s2, s3 >>>; } } } //================================================= Thanks Simon (PS - my machine is a PC running Windows Vista)
Hello Simon, all, on Ubuntu GNU/Linux (JACK) I confirm both issues with OscIn: - only first letter of string data is received; - spaces between types letters are misinterpreted. I suppose those are ChucK bugs. Antanas
Thanks for the reports -- as these are new classes, there are definitely
bound to be issues. I recall seeing a bug related to the string issue, but
it looks like I didnt fix it for some reason. Ill take a look and report
back.
spencer
On Mon, May 12, 2014 at 9:57 AM, Antanas Budriūnas
Hello Simon, all,
on Ubuntu GNU/Linux (JACK) I confirm both issues with OscIn: - only first letter of string data is received; - spaces between types letters are misinterpreted.
I suppose those are ChucK bugs.
Antanas _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Howdy,
These issues are now fixed on GitHub, if you are interested in giving it a
test drive:
https://github.com/ccrma/chuck
Of course, these fixes will be incorporated into the next release, which
will probably be coming out a lot sooner given the nature of these bugs.
spencer
On Fri, May 16, 2014 at 1:08 PM, Spencer Salazar wrote: Thanks for the reports -- as these are new classes, there are definitely
bound to be issues. I recall seeing a bug related to the string issue, but
it looks like I didnt fix it for some reason. Ill take a look and report
back. spencer On Mon, May 12, 2014 at 9:57 AM, Antanas Budriūnas Hello Simon, all, on Ubuntu GNU/Linux (JACK) I confirm both issues with OscIn:
- only first letter of string data is received;
- spaces between types letters are misinterpreted. I suppose those are ChucK bugs. Antanas
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Spencer,
2014-05-17 8:12 GMT+03:00 Spencer Salazar
Howdy,
These issues are now fixed on GitHub, if you are interested in giving it a test drive: https://github.com/ccrma/chuck
Thank you so much for fixing both those issues. Even Unicode strings comes through nicely :) Antanas
participants (3)
-
Antanas Budriūnas
-
Simon Steptoe
-
Spencer Salazar