oscP5 Send() and Bundle
in
Contributed Library Questions
•
1 year ago
Hey there,
I have a question about the oscP5 lib, actually 2 questions:
1) While using Bundles is there a limit to the number of message you can put in the bundle? I'm trying as an experiment to send 800 oscMessages in a bundle to TouchOSC on the iPad (to update a bunch of LEDs) it looks like the OSCMessage are all bundled ok but the LEDs on the TouchOSC are not updated correctly: the first 300 hundreds OSCMessages seems to arrive ok but that's it. The loop looks like that:
2) I've also tried using 800 separated oscMessages in a similar "for" loop (which actually seems to be faster than sending a bundle, for whatever reason) but some are losts along the way. Maybe there is a time out for each oscMessage? or by the time I send the next OSCMessage in the loop the previous did not arrived yet? it looks like they are all sent ok but then the LEDs on touchOSC are not updated as they should
Basically the questions come down to: How can I send out a big quantity of message to TouchOSC without messages being lost along the way? Is the problem coming from TouchOSC? Is there a way to send a flow of OSCMessage in a very efficient way?
Merci!
G.
I have a question about the oscP5 lib, actually 2 questions:
1) While using Bundles is there a limit to the number of message you can put in the bundle? I'm trying as an experiment to send 800 oscMessages in a bundle to TouchOSC on the iPad (to update a bunch of LEDs) it looks like the OSCMessage are all bundled ok but the LEDs on the TouchOSC are not updated correctly: the first 300 hundreds OSCMessages seems to arrive ok but that's it. The loop looks like that:
- for (int i = 0; i < (800); i++) {
- // get current color
- c = pixels[ ( (i%ledGridWidth) * width/ledGridWidth) + ( (int(i/ledGridWidth) )* height/ledGridHeight ) * width];
- // greyscale conversion
- ledMessage = new OscMessage("/2/led"+i);
- ledMessage.add(norm(round(red(c)*0.222+green(c)*0.707+blue(c)*0.071), 0, 255));
- myBundle.add(ledMessage);
- ledMessage.clear();
- }
- oscP5.send(myBundle, myRemoteLocation);
- myBundle.clear();
2) I've also tried using 800 separated oscMessages in a similar "for" loop (which actually seems to be faster than sending a bundle, for whatever reason) but some are losts along the way. Maybe there is a time out for each oscMessage? or by the time I send the next OSCMessage in the loop the previous did not arrived yet? it looks like they are all sent ok but then the LEDs on touchOSC are not updated as they should
Basically the questions come down to: How can I send out a big quantity of message to TouchOSC without messages being lost along the way? Is the problem coming from TouchOSC? Is there a way to send a flow of OSCMessage in a very efficient way?
Merci!
G.
1