// Example by Krister Olsson
import krister.Ess.*;
AudioChannel myChannel;
void setup() {
// start up Ess
Ess.start(this);
// load "cell.aif" into a new AudioChannel
myChannel=new AudioChannel("cell.aif");
// only pan at zero crossings
myChannel.smoothPan=true;
// pan left
myChannel.pan(Ess.LEFT);
// play
myChannel.play();
// pan right over the duration of the sound
myChannel.panTo(Ess.RIGHT,myChannel.duration);
}
void draw() {
}
// we are done, clean up Ess
public void stop() {
Ess.stop();
super.stop();
}
|