Digital Pink Noise generator...?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I've posted this (yesterday): http://www.diyaudio.com/forums/showthread.php?s=&threadid=76106 under the Analog section.
I was told that I'll get more predictable results if I had implemented a digitally design.
But....I have never seen a decent digitally designed pink noise generator, or more actually a good design behind it...:rolleyes:
If I was to to this, I haven't got a clue where to start.

Anybody in this section know how to do this ?

Any ideas would be appreciated :)

Lyra
 
A quick hop on google reveals:

http://sound.westhost.com/project11.htm

Which looks like an acceptable project.

As for digital generation, I've written pink noise generation code for DSP - basically you use a random number generator feeding an appropriate FIR pink weighting filter. This requires quite a bit of DSP power, which a PIC12x simply can't do... but a dsPIC or another 'real' DSP should manage.
 
gmarsh:
Hi.
Yes the project 11 on westhost was the basis (?) for my a "little different" inplementation posted under the analog section ( http://www.diyaudio.com/forums/showthread.php?s=&threadid=76106) , but the only reply I've got so far was to rather go for a digital solution.
How succeptible would such an analog noise-generator be when it comes to GSM noise in the nearby surrondings for instance ?

Lyra
 
gmarsh said:
As for digital generation, I've written pink noise generation code for DSP - basically you use a random number generator feeding an appropriate FIR pink weighting filter. This requires quite a bit of DSP power, which a PIC12x simply can't do... but a dsPIC or another 'real' DSP should manage.

Before you try pushing random numbers through a FIR filter, look at the Voss-McCartney method for generating pink noise. The programming is trivial.
 
Ulas said:
Before you try pushing random numbers through a FIR filter, look at the Voss-McCartney method for generating pink noise. The programming is trivial.
Voss-McCartney is a simple algorithm to look at.. but iIve found that when you're going for a given spectrum error, a VM algorithm actually requires more DSP power than a white generator + pinking filter.

VM requires generating many random numbers per sample - depending on the generator you use and the capabilities of the DSP, this can take several instructions per number. But DSPs can scream through a FIR/IIR.
 
diyAudio Member
Joined 2002
In the picture below there is a decent pink noise generator from an old Elektor issue.

Regards,
Milan
 

Attachments

  • pink_noise.jpg
    pink_noise.jpg
    62.3 KB · Views: 265
Ulas said:
WRONG - Properly implemented, Voss-McCartney requires only ONE random number per sample.
*digs out book*... The book I've got here shows anywhere from 1 to N random numbers per sample, N being the order of the generator...

*searches around net* well, looks like you're right... I've found an optimization on the 'net which involves shuffling the higher N points in time. While saving on random number generation, it looks like it's worse from a conditional code perspective. It'd be hideous to implement on DSP.

It all comes down to hardware. It's hard to beat a LCG PRNG MAC followed by a half dozen paralleled FIR/IIR MAC clocks on pure DSP hardware. But I'm sure that on an ARM, where DSP capabilities lack but any instruction can be made conditional, optimized VM will fly.

Oh, and one last thing... *checks book again*... VM produces a spike at the extreme high frequency end. If this is unacceptable, you'll need a lowpass filter anyway. :D
 
portable cd players are only $20,

the rca lyra mp3 player can be found for $40 - it claims to do wma which has a lossless level/setting

even cheaper mp3 players with wma are available if you think eponymy isn't worth a few bucks more

the really motivated could build a phantom to battery V converter - much easier if you don't need to transmit quality audio on the same line
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.