[sdiy] Fwd: Re: Uniformly distributed noise generator?
rburnett at richieburnett.co.uk
rburnett at richieburnett.co.uk
Mon Jun 17 11:40:53 CEST 2013
> From: rsdio at sounds.wa.com
>
> It's not that casting, per se, is affecting the spectrum. It's the
> grouping of
> multiple bits from a 1-bit noise source into a 16-bit (or other size)
> word that
> results in the spectrum changing...
It's the shifting of the bits through the 16-bit word that causes the
filtering of the noise spectrum. It's easiest to understand if you
consider the bits being injected into the MSB end of the Linear Feedback
Shift Register, and clocked so that they gradually suffle to the right.
If a 1 is introduced into the MSB it would be worth 32768 in a 16-bit
unsigned register. On the next clock cycle this is shifted to the right
and is now worth 16384 (half as much.) On each subsequent clock cycle
the value halves: 32768, 16384, 8192, 4096, 2048....., 4, 2, 1, until it
falls off the LSB end.
So each "noise bit" that is injected into the MSB of the shift-register
doesn't just influence the 16-bit result output _now_, but also has a
"half-life" of influence on subsequent outputs. This exponentially
decaying impulse-response is what you get from a 1st-order lowpass
filter like a simple RC network, or a 1-pole IIR digital filter:
y[n] = x[n] + 0.5 * y[n-1]
You can correct the spectrum by applying a "whitening" post-filter with
a corresponding zero at the same position as the pole in the above
transfer function.
If the LFSR is clocked right-to-left the impulse response is just
reversed. Noise bits are worth 1 as they're injected into the LSB and
double in value until they fall off the MSB end. The exponentially
growing impulse response has the same magnitude spectrum as
exponentially diminishing so the lowpass filtering effect on the
spectrum is the same. About 9.5dB down at half of the sampling rate.
-Richie,
More information about the Synth-diy
mailing list