// 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");
// set the out loop point to 3 seconds
myChannel.out(myChannel.frames(3000));
// start the sound looping forever
myChannel.play(Ess.FOREVER);
// print the location of the out loop point
println(myChannel.out);
}
void draw() {
}
// we are done, clean up Ess
public void stop() {
Ess.stop();
super.stop();
}
|