 |
 |
 |
 |
| Class |
|
WhiteNoise |
 |
|
|
| Name |
|
generate() |
 |
|
|
| Examples |
|
// Example by Krister Olsson
import krister.Ess.*;
AudioChannel myChannel;
WhiteNoise myNoise;
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 soft white noise
myNoise=new WhiteNoise(.1);
myNoise.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 |
|
Generates sample data and stores it in, adds it to, or subtracts it from an AudioChannel, AudioStream, or a floating point array |
 |
|
|
| Syntax |
|
whitenoise.generate(out)
whitenoise.generate(out, mode)
whitenoise.generate(out, offset, frames)
whitenoise.generate(out, mode, offset, frames)
whitenoise.generate(outArray, rate)
whitenoise.generate(outArray, rate, mode)
whitenoise.generate(outArray, rate, offset, frames)
whitenoise.generate(outArray, rate, mode, offset, frames) |
 |
|
|
| Parameters |
|
| whitenoise |
|
any instance of WhiteNoise
|
| out |
|
the output AudioChannel or AudioStream instance
|
| outArray |
|
float[]: the output array
|
| rate |
|
float: the sample rate of the output floating point array
|
| mode |
|
replace, add, or subtract once generated: Ess.REPLACE, Ess.ADD, Ess.SUBRACT
|
| offset | ,
|
int: the sample frame from which to start generating. The default is the first frame
|
| frames |
|
int: the number of frames to generate. The default is the entire AudioChannel, AudioStream, or floating point array
|
|
 |
|
|
| Returns |
|
nothing |
 |
|
|
| Usage |
|
Web & Application |
 |
|
|
|
|