Hello,
I read here:
that the latest version supports OSC bundling.
I tried a test generating bundles from within a simple java app, but am having trouble figuring out how the OSCDecoder parses them into spreads, and how I can access them.
Do I use some sort of spread extraction?
ty,
sv
import com.illposed.osc.;
import java.net.;
public class OSC2pb1
{
private static OSCPortOut oscPort;
static int port = 9000;
static String address = "/OSC1";
public static void main( String[]() commandline ) throws Exception
{
System.out.println( "OSC pb Sample Started." );
System.out.println( "Creating OSCPort to local host" );
oscPort = new OSCPortOut( InetAddress.getLocalHost(), port );
for (int i = 0; i < 1000; i++) {
testBundle(i);
}
System.out.println( "End of OSC sample" );
}
public static void testBundle(float param) throws Exception {
Object args[]() = new Object[2](2);
OSCPacket mesgs[]() = new OSCPacket[2](2);
args[0](0) = new Integer(1);
args[1](1) = new Float(param);
OSCMessage mesg = new OSCMessage(address, args);
mesgs[0](0) = mesg;
Object args2[]() = new Object[2](2);
args2[0](0) = new Integer(2);
args2[1](1) = new Float(param*2);
OSCMessage mesg2 = new OSCMessage(address, args2);
mesgs[1](1) = mesg2;
OSCBundle bundle = new OSCBundle(mesgs);
oscPort.send(bundle);
}
}