Re: randomized white noise = white noise?



Hm. To get started and to get a better understanding of whats happening
I tried to implement the original floating point un-efficient filter in
open watcom running on my laptop, to generate 10 seconds of noise hence
the 441000:

float b0, b1, b2;

signed int white;

for(sampnum = 0 ; sampnum < 441000 ; sampnum++)
{
white = (rand() * 2) - (RAND_MAX);
b0 = 0.99765 * b0 + white * 0.0990460;
b1 = 0.96300 * b1 + white * 0.2965164;
b2 = 0.57000 * b2 + white * 1.0526913;
noise[sampnum] = b0 + b1 + b2 + white * 0.1848;
}


But the output array noise[], according the debugger, gets filled with
numbers greater than and less than 32767/-32767. Is this because the
noise is literally trying to be gaussian and has peaks and valleys
which can go to infinity? The large numbers are quite frequent, maybe 3
or 4 out of ten is beyond a 16bit integer. Should I normalize it
somehow? Or am I doing something wrong here.

The input is random between -32767 and 32767, (white)

The filter does its thing.

The output array and the b0, b1, b2 coeff's are float. So it should be
able to handle everything.

.