Audio Toolkit - pinknoise
X =pinknoise(n)X =pinknoise(sz)X =pinknoise(sz1,sz2)X =pinknoise(___,typename)X =pinknoise(___,'like', p)Create pinknoise using random numbers through a series of randomly initiated SOS filters..
Note: this function uses zp2sos and sosfilt from the signal package, which will be loaded as part of calling this function.
Inputs
n - scalar value for length of the pinknoise
sz - A 2 element vector for [length, number_of_channels]
sz1, sz2 - scalar length and number of channels.
typename - datatype to create - ’double’ or ’single’.
p - matrix of data to use class type ’double’ or ’single’.
Outputs
X - pinknoise output
Examples
Create 10 second 2 channel pink noise waveform at 44.1kHz
fs = 44.1e3; duration = 10; y = pinknoise (duration*fs, 2);
See also: whitenoise.