-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about new OSC support classes - OscIn #1
Labels
Comments
Also: Hello Simon, all, on Ubuntu GNU/Linux (JACK) I confirm both issues with OscIn:
I suppose those are ChucK bugs. |
Part 1 fixed in f27c82b |
Part 2 fixed in bab0e69 |
gewang
pushed a commit
that referenced
this issue
Apr 13, 2022
updated docs to reflect new LiSa voice max
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From https://lists.cs.princeton.edu/pipermail/chuck-users/2014-May/007607.html
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)
The text was updated successfully, but these errors were encountered: