// Example by Krister Olsson
import krister.Ess.*;
AudioChannel myChannel;
void setup() {
size(256,200);
// start up Ess
Ess.start(this);
// load "cell.aif" into a new AudioChannel
myChannel=new AudioChannel("cell.aif");
// pan left
myChannel.pan(Ess.LEFT);
// play
myChannel.play();
// pan right over the duration of the sound
myChannel.panTo(Ess.RIGHT,myChannel.duration);
print("Starting pan");
// slow the framerate
framerate(1);
}
void draw() {
// are we panning?
if (myChannel.panning) print(".");
}
void audioOutputPan(AudioOutput ch) {
print("done!");
}
// we are done, clean up Ess
public void stop() {
Ess.stop();
super.stop();
}
|