<div dir="ltr">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.<div>If I replace the OscIn code with the equivalent using OscRecv code then the strings come through okay.<br>

</div><div>If I sent the equivalent data to a separate program - e.g. PD - then the strings also come through okay.<br></div><div>Conversely, if I send strings from PD to ChucK then, once again, my OscIn code only picks up the first character.</div>

<div>So, I am assuming the issue lies with my code for OscIn rather than OscOut.<br></div><div>If anyone could put their finger on the problem, I would be most grateful.<br></div><div><br></div><div>And  a separate issue with .addAddress: "oIn.addAddress( "/chuck/data, ifss" )" works but "oIn.addAddress( "/chuck/data, i f s s" )" doesn't.</div>

<div>This didn't seem to be an issue when using with OscRev/.event.</div><div><br></div><div><div>Here's the code:<div><div>//===========================================</div><div>OscIn oIn;</div><div>OscMsg oMsg;</div>

<div>6452 => oIn.port;</div><div>oIn.addAddress( "/chuck/data, ifss" );</div><div><br></div><div>"localhost" => string hostname;</div><div>6452 => int port;</div><div>OscOut xmit;</div><div>xmit.dest( hostname, port );</div>

<div><br></div><div>spork ~ recvOsc();</div><div>spork ~ sendOsc();</div><div><br></div><div>while(true)</div><div>{</div><div>    1::day => now;</div><div>}</div><div>//============================================</div>

<div>fun void sendOsc()</div><div>{</div><div>    while( true )</div><div>    {</div><div>        xmit.start( "/chuck/data" );</div><div>        Math.random2( 30, 80 ) => xmit.add;</div><div>        Math.random2f( 0.1, 1 ) => xmit.add;</div>

<div>        "xyz" => xmit.add;</div><div>        "abc" => xmit.add;</div><div>        xmit.send();</div><div>        1::second => now;</div><div>    }</div><div>}</div><div>//============================================</div>

<div>fun void recvOsc()</div><div>{</div><div>     -1 => int i;</div><div>     -1.0 => float f;</div><div>     "NULL" => string s;</div><div>     "NULL2" => string s2;</div><div>     "NULL3" => string s3;</div>

<div>    while( true )</div><div>    {</div><div>        oIn => now;</div><div>        while( oIn.recv(oMsg) )</div><div>        { </div><div>            oMsg.getInt(0) => i; </div><div>            oMsg.getFloat(1) => f;</div>

<div>            oMsg.getString(2) => s;</div><div>            oMsg.getString(3) => s2;</div><div>            <<< "got (via OSC):", i, f, s, s2, s3 >>>;</div><div>        }</div><div>    }</div>

<div>}</div><div>//=================================================</div></div><div><br></div></div></div><div><div>Thanks</div><div>Simon<br></div><div>(PS - my machine is a PC running Windows Vista)</div></div></div>