Skip to content
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

Closed
spencersalazar opened this issue May 16, 2014 · 3 comments
Closed

Question about new OSC support classes - OscIn #1

spencersalazar opened this issue May 16, 2014 · 3 comments
Labels

Comments

@spencersalazar
Copy link
Member

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)

@spencersalazar
Copy link
Member Author

Also:

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.

@spencersalazar
Copy link
Member Author

Part 1 fixed in f27c82b

@spencersalazar
Copy link
Member Author

Part 2 fixed in bab0e69

spencersalazar added a commit that referenced this issue Apr 4, 2016
gewang pushed a commit that referenced this issue Apr 13, 2022
updated docs to reflect new LiSa voice max
spencersalazar added a commit that referenced this issue Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant