We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › [Ess] latency between 2 play() calls
Page Index Toggle Pages: 1
[Ess] latency between 2 play() calls (Read 535 times)
[Ess] latency between 2 play() calls
Oct 17th, 2007, 12:13pm
 
hi everybody,

I would like 2 AudioChannels to play one after another, for example ch01 -> ch02. I came up with this idea, using play and audioChannelDone methods :

Code:
import krister.Ess.*;

AudioChannel ch01, ch02;

void setup() {
Ess.start(this);
ch01 = new AudioChannel("mySample1.wav");
ch02 = new AudioChannel("mySample2.wav");
ch01.play();
}

void audioChannelDone(AudioChannel ch) {
if (ch == ch01) ch02.play();
}

void stop() {
Ess.stop();
super.stop();
}


It works, but there is a small latency just before ch02 starts. Try with beat or bassline samples and you'll hear the offset...

Is it possible to get rid of this latency?
Page Index Toggle Pages: 1