The FAUST noise generator defined in noises.lib is an instructive example. It generates uniform pseudo-random white noise in by the linear congruential method.12
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.