Audio Sources
Noise
Noise
@synthlet/noise
A Noise generator. Currently white and pink noise are supported.
Parameters
type
: The type of noise to generate. Can be one of:- 0
NoiseType.White
: White noise that usesMath.rand
for random numbers. - 10:
NoiseType.Pink
: Pink noise based on this Larry Trammel algorithm
- 0
Since type is an audio param, any arbitrary value can be used, but only the above values are valid. If you suply an invalid value, a warning will be printed and the noise will default to white random.
References
- https://en.wikipedia.org/wiki/Colors_of_noise
- Voss-McCartney algorithm:
- Larry-Trammel algorithm:
- Mathlab pink noise implementation: https://ccrma.stanford.edu/~jos/sasp/Example_Synthesis_1_F_Noise.html
- https://github.com/Stenzel/newshadeofpink