Re: randomized white noise = white noise?
- From: "Tom Bruhns" <k7itm@xxxxxxx>
- Date: 23 May 2006 17:44:18 -0700
As I posted in your other thread (I think it was), you can't. At least
not unless you are _very_ clever. The best ideas I've seen here are:
1. To have a big memory with the noise you want pre-stored. At 44100
samples/second and one byte per sample, and considering you can get
some pretty huge flash memories pretty cheap these days, you could
store 23 seconds per megabyte, or several minutes in a "tiny" 16
megabyte memory. I don't think anyone would notice it repeating in
that time. (They tend to want to leave the room after a couple
minutes, or less, of loud pink or white noise! ;-) You could even put
a few different "types" of noise: white, pink, arbitrarily filtered,
some test sinewaves, ... in different segments of the memory and select
them with high order address bits.
or
2. Use the Atmel to generate a pseudorandom bitstream, which will be
"white" noise over the audio range if the bits come out at several
times the highest frequency of the range--say 100k to 200k bits per
second. Then filter that with a relatively simple RC filter with poles
and zeros spaced (roughly) geometrically along the negative real axis
of the s-plane...a pole closest to the origin, then a zero, then a
pole, etc. With 1% tolerance caps and 1% or better resistors, I
suspect you will get adequately "pink" noise with low enough
manufacturing variation for it to be quite useful, though you've never
said just what the spec is as far as I've seen. Note: you're likely
to need an amplifier at the output end of that. If the white noise has
a power density of 1 volt^2/R per 20kHz, then in the 10Hz-20Hz octave,
the power is 5e-4 volts^2/R. If the pink is rolling off at 3dB/octave
above that, each octave has the same power, and there are about 10
octaves from 20Hz-20kHz. The filter output, then, would be about 5e-3
volts^2/R or 70 millivolts RMS. If you want line-level output, you'll
need some gain, and that initial amplitude I assumed is undoubtedly
high.
It's possible if you are very clever to build a filter whose
coefficients are integer powers of 2, so that multiplication becomes
shifting, but even then, you can't do very much with a processor that
doesn't do multi-bit shifts in a single cycle...I don't know the
details of the Atmel parts but suspect it just does single bit shifts
and only on 8 bits at a time.
In even a pretty minimal DSP, I'd say you wouldn't have much trouble
doing both the noise generation and the pink filtering, but in an 8-bit
part with no hardware multiplication, I think your time will be much
better spent looking at other ways to do it. As I recall, I did a pink
filter from 10Hz to 22kHz that was accurate to better than 0.05dB over
the whole range, in an old Analog Devices ADSP2181...but there wasn't a
whole lot of processing time left over.
Cheers,
Tom
.
- Follow-Ups:
- Re: randomized white noise = white noise?
- From: acannell
- Re: randomized white noise = white noise?
- References:
- randomized white noise = white noise?
- From: acannell
- Re: randomized white noise = white noise?
- From: Don Lancaster
- Re: randomized white noise = white noise?
- From: Tom Bruhns
- Re: randomized white noise = white noise?
- From: acannell
- Re: randomized white noise = white noise?
- From: Tom Bruhns
- Re: randomized white noise = white noise?
- From: acannell
- randomized white noise = white noise?
- Prev by Date: Re: So say I wanted to sell something...
- Next by Date: Re: Mechanical Virtual Theremin
- Previous by thread: Re: randomized white noise = white noise?
- Next by thread: Re: randomized white noise = white noise?
- Index(es):
Relevant Pages
|