# noise type...

Robin Whittle rw at firstpr.com.au
Fri Nov 27 19:35:14 EST 1998

```Regarding Pseudo-Random Number Generators for DSP noise, see:

http://www.firstpr.com.au/csound/

for how I searched for a 31 bit PRNG and settled on a public domain
implemention by Ray Gardner of a Park-Miller linear congruential PRNG
which works fine with 32 bit integer calculations.

http://www.snippets.org/RG_RAND.C

Regarding -3dB filtering . . .

Stuart Dimond wrote:

> A filter with a roll-off of 3 dB per octave will convert the
> spectrum from white to pink. White noise has equal energy per
> frequency. Pink noise has equal energy per octave.

We had an interesting discussion on this list at the start of July
regarding pink noise.  A 3 pole -3dB filter was proposed, but I
didn't pursue this area.  I still have some homework to do before I
understand DSP filtering enough to implemen this in C.

> Date sent:      	Tue, 30 Jun 1998 21:48:08 -0700
> From:           	robert bristow-johnson <pbjrbj at viconet.com>
> Subject:        	Re: Generating pink = 1/f noise

> >   "Orfanidis also mentions a clever way to get reasonably good 1/f
> >   noise: sum together n randh's, where each randh is running an
> >   octave slower than the preceding (one):"
> >
> >This is a reference to Sophocles Orfanidis' book "Introduction to
> >Signal Processing":
> >
> >   http://www.prenhall.com/books/esm_0132091720.html
> >
> >This sounds like a pretty good way to do it.
>
> another method that Orfanidis mentions came from a comp.dsp post of
> mine. it's just a simple "pinking" filter to be applied to white
> noise.  since the rollof is -3 dB/octave, -6 dB/octave (1st order
> pole) is too steep and 0 dB/octave is too shallow.
>
> an equiripple approximation to the ideal pinking filter can be
> realized by alternating real poles with real zeros.  a simple 3rd
> order solution that i obtained is:
>
> 	pole            zero
> 	----            ----
> 	0.99572754      0.98443604
> 	0.94790649      0.83392334
> 	0.53567505      0.07568359
>
> the response follows the ideal -3 dB/octave curve to within + or -
> 0.3 dB over a 10 octave range from 0.0009*nyquist to 0.9*nyquist.
> probably if i were to do it over again, i'd make it 5 poles and 4
> zeros.
>
> r b-j
> pbjrbj at viconet.com   a.k.a.   robert at audioheads.com
>                      a.k.a.   robert at wavemechanics.com
>
> "Don't give in to the Dark Side.  Boycott intel and microsoft."

Thanks for this Robert! I will give it a go when I have done my
homework by reading C. Britton Rorabaugh's "Digital Filter Designer's
Handbook 2nd Ed."

- Robin

===============================================================

Robin Whittle     rw at firstpr.com.au  http://www.firstpr.com.au
Heidelberg Heights, Melbourne, Australia

First Principles  Research and expression: music, Internet
music marketing, telecommunications, human
privacy. Consulting and technical writing.

Real World        Electronics and software for music: eg.
Interfaces        the Devil Fish mods for the TB-303.

===============================================================

```