View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide

How to force order in independent osc bundles?

Home   How To   Code Pool   Public Library   Theory   Events

Sending OSC-bundles independently from each other, they will not have a certain execution order:
s.sendBundle(0.2, ["/b_query", 0]);
s.sendBundle(0.2, ["/b_query", 1]);


how to force an order on their execution?


// add a little time lapse: minimum 3e-10, which is about a 50 000th of a sample
fork {
	s.sendBundle(0.2, ["/b_query", 0]);
	3e-10.wait; 
	s.sendBundle(0.2, ["/b_query", 1]);
}



// better than this is to use the openBundle / closeBundle methods:

s.openBundle;

	s.sendBundle(0.2, ["/b_query", 0]);
	s.sendBundle(0.2, ["/b_query", 1]);

s.closeBundle;


Link to this Page