Fire multiple clips at once using LiveAPI
Posted: Tue Jul 02, 2013 9:01 pm
Is there a way to fire multiple clips at the same time using Javascript with the LiveAPI?
I've tried firing some clips inside a 'for' iterator but sometimes they fire separately. For example, the following code:
var api = new LiveAPI();
for (var i = 0; i < 5; i++) {
api.path = "live_set tracks " + i + " clip_slots " + 0;
api.call("fire"); // Sometimes this is slow and clips are not fired at once. Find another way!
}
This happens specially when transport is stopped. I guess that in the first iteration, when the first clip is fired, it causes the transport to start playing and after that, the next iterations fire the clips and wait for the next quantization.
Is there any way to call the 'fire' method and passing a list of clips in a single call?
Anyone knows a workaround for this?
I've tried firing some clips inside a 'for' iterator but sometimes they fire separately. For example, the following code:
var api = new LiveAPI();
for (var i = 0; i < 5; i++) {
api.path = "live_set tracks " + i + " clip_slots " + 0;
api.call("fire"); // Sometimes this is slow and clips are not fired at once. Find another way!
}
This happens specially when transport is stopped. I guess that in the first iteration, when the first clip is fired, it causes the transport to start playing and after that, the next iterations fire the clips and wait for the next quantization.
Is there any way to call the 'fire' method and passing a list of clips in a single call?
Anyone knows a workaround for this?