[chuck-users] limit on number of OSC addresses you can listen to?
Ben Steinberg
ben at potswift.org
Fri Aug 22 13:25:51 EDT 2014
I've posted about this to the electro-music forum:
http://electro-music.com/forum/viewtopic.php?p=402793
In trying to write some code for the Illucia dtr, I found that adding
addresses to an OscIn object appeared not to work after twelve
addresses. I wrote a test program that wasn't illucia-specific; the
following code starts 16 OSC transmitters and 16 receivers. When you run
it, you can see that transmitters 0-15 all transmit, but only receivers
0-11 receive.
for ( 0 => int i ; i < 16 ; i++ ) {
spork ~ output(i);
spork ~ input(i);
}
while ( true ) {
1::second => now;
}
fun void output(int number) {
12008 => int port;
"localhost" => string hostname;
OscOut xmit;
xmit.dest(hostname, port);
while (true) {
Math.random2f(5.5, 8.5) => float wait;
wait::second => now;
xmit.start("/tester/what/" + number);
Math.random2f(0.0, 1.0) => float temp => xmit.add;
xmit.send();
<<< "sent", number, temp >>>;
}
}
fun void input(int number) {
OscIn oin;
OscMsg msg;
12008 => oin.port;
oin.addAddress("/tester/what/" + number + ", f");
float val;
while (true) {
oin => now;
while ( oin.recv(msg) != 0 )
{
msg.getFloat(0) => val;
<<< "received", number, val >>>;
}
5::ms => now;
}
}
I'm running ChucK 1.3.4 on Mavericks, with and without miniAudicle.
More information about the chuck-users
mailing list