Good morning,
I manage to send at the same time 9 integers from 0 to 127 from Pocessing to max/msp
But when I start processing, my image streams in max/msp become inconsistent, with lag
Is it possible to send less data?
void loop() {
for (int i = 0; i < networkSize; i++)
{
Pos[i] = abs((int) map(dataMappedForMotorisedPosition[i] % numberOfStep, 0, numberOfStep, 0, 127));
}
if (millis()>timeTosendData + 250)
{
oscSend();
timeTosendData = millis();
//println ("SEND DATA");
}
}
void oscSend()
{
OscMessage myMessage20= new OscMessage("/position0"); // oscillator front
OscMessage myMessage21= new OscMessage("/position1"); // oscillator
OscMessage myMessage22= new OscMessage("/position2"); // oscillator
OscMessage myMessage23= new OscMessage("/position3"); // oscillator
OscMessage myMessage24= new OscMessage("/position4"); // oscillator
OscMessage myMessage25= new OscMessage("/position5"); // oscillato
OscMessage myMessage26= new OscMessage("/position6"); // oscillator
OscMessage myMessage27= new OscMessage("/position7"); // oscillator
OscMessage myMessage28= new OscMessage("/position8"); // oscillator
OscMessage myMessage29= new OscMessage("/position9"); // oscillator behind
myMessage20.add(Pos[0]);
myMessage21.add(Pos[1]);
myMessage22.add(Pos[2]);
myMessage23.add(Pos[3]);
myMessage24.add(Pos[4]);
myMessage25.add(Pos[5]);
myMessage26.add(Pos[6]);
myMessage27.add(Pos[7]);
myMessage28.add(Pos[8]);
// myRemoteLocationII port 8001 //position0 to position9
oscP5.send(myMessage20, myRemoteLocationII);
oscP5.send(myMessage21, myRemoteLocationII);
oscP5.send(myMessage22, myRemoteLocationII);
oscP5.send(myMessage23, myRemoteLocationII);
oscP5.send(myMessage24, myRemoteLocationII);
oscP5.send(myMessage25, myRemoteLocationII);
oscP5.send(myMessage26, myRemoteLocationII);
oscP5.send(myMessage27, myRemoteLocationII);
oscP5.send(myMessage28, myRemoteLocationII);
oscP5.send(myMessage29, myRemoteLocationII);
}
I tried this, it’s a little better but still not perfect.
or do something so that the osc data doesn’t disrupt my max/msp image stream?
I don’t understand why receiving data in osc disrupts my image stream in max/msp when this image stream comes from max/msp
Processing and max/msp are in the same computer, should I create some sort of virtual usb connection between max and processing?