[music-dsp] pseudo random generators
joshscholar at yahoo.com
Thu Oct 21 15:03:23 EDT 2004
Be careful. I once wanted to generate noise that was somewhat below 1 bit
in ampituded - ie <-96 db on a 16 bit system.
I found that no single random number generator was good enough to do this
without creating obvious peaks. I had to combine a random number generator
with a bunch of hashing steps to get a generator wthat was good enough.
Even using only one or two hashing steps wasn't enough. I think I was using
a 32 bit linear congruential generator or two (with different constants),
and my hashes involved rotations, additions and exclusive ors against
So, no a single linear congruential step doesn't make perfect noise - not if
your use is sensitive.
If you get one of those overkill rngs that combines the results of 20
different kinds of rng, then you'll be safe.
----- Original Message -----
From: Adel Makai
To: music-dsp at ceait.calarts.edu
Sent: Thursday, October 21, 2004 6:50 AM
Subject: [music-dsp] pseudo random generators
I'm a university student and I plan to measure impulse
response of some rooms in order to compare a real room
impulse response and the impulse response of filter
systems used for reverberation (Schroeder, Moorer,
So, I need a pseudo random generator with 'sampling
frequency' 44.1 kHz, and 5-10 seconds periodicity (I
want to stimulate the room with this pseudo random
stream). I found that the linear congruential method
(seed = p1*seed + p2 mod N)
is easy to implement on a dsp chip. I found
suggestions for p1, p2 and N values for 16-bit and
32-bit seed also. But the 16-bit version gives too
short periods (about 1 second), while the 32-it
version gives too long ones.
Any idea for another set of values, or another method
for creating pseudo random streams?
More information about the music-dsp