// Example by Krister Olsson
import krister.Ess.*;
AudioChannel myChannel;
Notch myNotch;
Normalize myNormalize;
void setup() {
size(256,200);
// start up Ess
Ess.start(this);
// load "cell.aif" into a new AudioChannel
myChannel=new AudioChannel("cell.aif");
// apply a notch filter
myNotch=new Notch(1000,-20,1);
myNotch.filter(myChannel);
// apply a second notch filter
myNotch.frequency=880;
myNotch.gain=40;
myNotch.q=2;
myNotch.filter(myChannel);
// normalize
myNormalize=new Normalize();
myNormalize.filter(myChannel);
// play
myChannel.play();
}
void draw() {
}
// we are done, clean up Ess
public void stop() {
Ess.stop();
super.stop();
}
|