diyAudio

diyAudio (http://www.diyaudio.com/forums/)
-   PC Based (http://www.diyaudio.com/forums/pc-based/)
-   -   How To Generate Pink Noise? (http://www.diyaudio.com/forums/pc-based/203978-how-generate-pink-noise.html)

oshifis 7th January 2012 07:06 PM

How To Generate Pink Noise?
 
I would like to computer generate pink noise, and burn it on CD. Is there an easy and exact way to do it? I have seen several software where part of the functions is pink noise, but I am not sure how accurate they are. Especially the crest factor (peak to average ratio, I need 12 dB), frequency range (should be 5...10 Hz to 22 kHz within fractions of a dB), and peak level (should be near 0 dB). It can be PRBS-based with several seconds repetion period, if that is simpler. Any suggestions?

Ron E 7th January 2012 07:11 PM

Quote:

Originally Posted by oshifis (Post 2851068)
I would like to computer generate pink noise, and burn it on CD. Is there an easy and exact way to do it? I have seen several software where part of the functions is pink noise, but I am not sure how accurate they are. Especially the crest factor (peak to average ratio, I need 12 dB), frequency range (should be 5...10 Hz to 22 kHz within fractions of a dB), and peak level (should be near 0 dB). It can be PRBS-based with several seconds repetion period, if that is simpler. Any suggestions?

I am not sure how to specify or measure crest factor in pink noise, but audacity comes with a pink noise generator. Generate the pink noise, save as wav and burn to CD. Noise isn't really "flat" except over long averaging times, especially at low frequencies.

Ron E 9th January 2012 04:45 PM

The foobar2000 media player has a dynamic range add in component that seems to measure peak and RMS dB in sound files. I don't think it exactly correlates to crest factor, though.

A sine wave should have a 3dB crest factor and it reports 0dB, and a square wave should have a 0dB crest factor and it reports -3dB. So when it measures 10dB on Audacity pink noise, perhaps it is really 13dB...

Pano 9th January 2012 05:30 PM

I generated Pink Noise in Audacity V1.3 and it seems to be an RMS average of -12.22dB with the peaks at -0.94dB. Very close to what you are looking for.

oshifis 10th January 2012 02:40 PM

Thanks for all. If I don't want (trust) these commercial software, is there any algorithm for calculating the individual samples? Also I want a brickwall filter below 20 Hz and above 20 kHz, how do I realize it? My goal is to create a test CD, and get a ruler-flat FFT plot with 1/12th or 1/24th octave bandwidth setting within this range. Then compare the FFT plot of the WAV file against the FFT plot of the analog audio output when playing back the CD on a standalone CD player. Just for playing around...

Pano 10th January 2012 02:56 PM

I don't think you'll get a ruler flat response this way, unless you use very long averaging. Maybe someone else knows better.

If you want a noise signal and a good FR graph of it, I would suggest HOLMIpulse and ARTA. Both can use a noise signal for FR. ARTA uses either Pink or White, HOLM uses a modified MLS. Although normal use is thru the ins and outs of a soundcard, you can save the signal, burn it to CD, record it and measure. A bit of work, but with a CD player I would not know how else to do it.

The nice thing about these softwares is that they know what signal to expect (their own), therefore you don't need a "perfect" pink noise.

phofman 10th January 2012 03:10 PM

Quote:

Originally Posted by oshifis (Post 2855258)
Thanks for all. If I don't want (trust) these commercial software, is there any algorithm for calculating the individual samples? Also I want a brickwall filter below 20 Hz and above 20 kHz, how do I realize it? My goal is to create a test CD, and get a ruler-flat FFT plot with 1/12th or 1/24th octave bandwidth setting within this range. Then compare the FFT plot of the WAV file against the FFT plot of the analog audio output when playing back the CD on a standalone CD player. Just for playing around...

Did you look at sox SoX - Sound eXchange | HomePage ? It is the most versatile tool for playing with audio I know of. Its pinknoise generator does not have an option for crest factor, but the source code is freely available and rather simple to read (plain C).

The brickwall filter is simple to do with sox, see SoX


All times are GMT. The time now is 07:18 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio


Content Relevant URLs by vBSEO 3.3.2