Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


White Noise Generator

The FAUST noise generator defined in noises.lib is an instructive example. It generates uniform pseudo-random white noise in $ [0,1)$ by the linear congruential method.10

    random = +(12345) ~ *(1103515245); // overflowing mpy & offset
    RANDMAX = 2147483647.0;
    noise = random / RANDMAX;
Note that for this noise-generator to give identical results on all platforms, FAUST must define integers as 32 bits everywhere, and overflow behavior must be normalized across platforms as well.


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download aspf.pdf
[Comment on this page via email]

``Audio Signal Processing in Faust'', by Julius O. Smith III.
Copyright © 2022-05-05 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA