 |
 |
 |
 |
| Name |
|
SawtoothWave
|
 |
|
|
| Examples |
|
// Example by Krister Olsson
import krister.Ess.*;
AudioChannel myChannel;
SawtoothWave myWave;
void setup() {
size(256,200);
// start up Ess
Ess.start(this);
// create a new AudioChannel
myChannel=new AudioChannel();
// set the channel size to 5 seconds
myChannel.initChannel(myChannel.frames(5000));
// generate 3 seconds of a soft sawtooth wave
myWave=new SawtoothWave(480,.1);
myWave.generate(myChannel,0,myChannel.frames(3000));
// play
myChannel.play();
}
void draw() {
}
// we are done, clean up Ess
public void stop() {
Ess.stop();
super.stop();
}
|
|
|
| Description |
|
The SawtoothWave class is used to generate a sawtooth wave |
 |
|
|
 |
|
|
| Constructors |
|
SawtoothWave(frequency, volume)
SawtoothWave(frequency, volume, phase) |
 |
|
|
| Parameters |
|
| frequency |
|
float: the frequency of the sawtooth wave in Hz
|
| volume |
|
float: the volume of the sawtooth wave (between 0 and 1)
|
| phase |
|
float: the phase of the sawtooth wave (between 0 and the sample rate of the target AudioChannel, AudioStream, or floating point array)
| |
 |
|
|
| Usage |
|
Web & Application |
 |
|
|
|
|