Frequency Analysis issue: pink noise

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
Krakatoa
Posts: 22
Joined: Tue Mar 04, 2014 9:26 am
Operating System: Please select

Frequency Analysis issue: pink noise

Post by Krakatoa » Tue Mar 04, 2014 10:01 am

Dear Audacity, First up, what a great app; congratulations. However, I am puzzled why when I make 1 minute of pink noise, then Select All, and then plot a Frequency Analysis with the frequency axis in log that the plot is not flat but biased towards the LF. Pink noise contains the same amount of energy per octave and must therefore look flat when shown with a log frequency axis and not slope off at a rate of -3 dB per octave as this analysis shows. See attached screenshot. I had another source of pink noise that I trust and analised that (just one channel this time) and this is the same so it is therefore the frequency analysis that is incorrect and not the pink noise generator. Can you please advise? Best wishes, Krakatoa
Attachments
Screen Shot 2014-03-04 at 09.36.12.png
Screen Shot 2014-03-04 at 09.36.12.png (154.7 KiB) Viewed 6524 times

kozikowski
Forum Staff
Posts: 69357
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Frequency Analysis issue: pink noise

Post by kozikowski » Tue Mar 04, 2014 1:18 pm

Wikipedia agrees with Audacity.
http://en.wikipedia.org/wiki/Pink_noise

Koz
Attachments
Screen shot 2014-03-04 at 5.16.28 AM.png
Screen shot 2014-03-04 at 5.16.28 AM.png (30.69 KiB) Viewed 6523 times

Krakatoa
Posts: 22
Joined: Tue Mar 04, 2014 9:26 am
Operating System: Please select

Re: Frequency Analysis issue: pink noise

Post by Krakatoa » Tue Mar 04, 2014 4:34 pm

Thanks Koz but both the plot you found on Wikipedia and the plot that Audacity generates are misleading. Pink noise has equal energy per octave band (or per decade band) and used over white noise because it typically matches the way we perceive sound. Pink Noise sounds flat and it should look flat when plotted on a chart that has logarithmic horizontal frequency axis. It is the area under the curve that should represent the energy--and it is constant per octave/decade with pink noise. The classic 1/3 octave analogue spectrum analiser employs a series of bandpass filters that are 1/3 octave wide (not a fixed frequency width wide) and centred on the 1/3 octave frequencies across the audio range. Pink Noise on such an analiser looks flat.

Digital analisers will use a time-to-frequency domain transform that results in a linear analysis; ie. each frequency bin is a constant number of Hz wide. Yes, one would expect the energy per bin to reduce by 10dB per decade but when people choose a logarythmic horizontal frequency axis, they want to see the total level too logarithmically otherwise Pink Noise won't look flat. To do that, the frequency bins need also to widen logarithmically as the frequency goes up and not be a fixed number of Hz wide across the whole bandwidth. This is impossible from an FFT perspective, so to do this and to have a meaningful log plot, the level of all the bins within an Octave, 1/3 octave or 1/6 octave (whatever one chooses as the final resolution) should be summed together in order that the total energy of that logarithmic division is properly represented.

The charts of wikipedia and audacity effectively have ever-narrowing representations of linear bins and thus gives a meaningless plot suggesting that the energy per octave or decade reduces when it does not. This is very misleading for an audio mix engineer, which I believe is the target user for Audacity. I would very much suggest this is corrected as it's a major error for an otherwise superb app. I've attached an Excel sheet that shows energy per Hz of Pink Noise and how that plots on a logarithmic scale (the Wikipedia / Audacity way) and then I show how it should be by summing the bins so that the number of bins doubles per octave just as we're expecting. Best wishes, Krakatoa

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Frequency Analysis issue: pink noise

Post by steve » Tue Mar 04, 2014 5:40 pm

Pink noise is band limited noise in which the power spectral density (power / frequency) is inversely proportional to frequency.
The y axis in Audacity's "Plot Spectrum" shows amplitude, not power spectral density. The graph is correct and the Pink noise is generated to instrumentation standards.

If you want a graph to show power spectral density against frequency, that would be a feature request. Let us know if that is what you want and we will move this topic to the appropriate forum board.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Krakatoa
Posts: 22
Joined: Tue Mar 04, 2014 9:26 am
Operating System: Please select

Re: Frequency Analysis issue: pink noise

Post by Krakatoa » Tue Mar 04, 2014 6:26 pm

Thanks Kos. The plot does indeed correctly show the amplitude of each frequency bin but this is meaningless from an audio perspective and on a log chart if each bin is the same number of Hz wide; it should be showing amplitude per equal portion of octave or decade when set to log. So an FFT to create the frequency bins is the first stage in a spectral analysis but the meter then fails to take the next important step of summing them together in a logarithmic fashion in order to present the amplitude in a meaningful way. The whole point of audio meters is that they present meaningful analysis of the audio. At the moment Audacity's Frequency Analysis is suggesting the amplitude per octave is decreasing with frequency when it is not. So this is not at all a feature request but a feature fix. Best wishes and thanks, Krakatoa.

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Frequency Analysis issue: pink noise

Post by steve » Tue Mar 04, 2014 8:17 pm

Krakatoa wrote:The plot does indeed correctly show the amplitude of each frequency bin but this is meaningless from an audio perspective and on a log chart if each bin is the same number of Hz wide;
The "frequency bin" concept is an analogy to describe in simple terms the way that FFT analysis works.
The frequency components of the DFT array are spaced logarithmically between DC and the Nyquist frequency, so they in no way represent bins that are "the same number of Hz wide".

Thank you for your interest in Audacity and for sharing your concern that there may be an error. Please be assured that in this case it is not a bug or error. Plot Spectrum is intended to plot amplitude against frequency, and it does so correctly. You may find it useful to compare the results from Audacity with similar features in other software, such as Adobe Audition, Soundforge, Sonar, Cubase, Protools, or similar.

It may also be worth considering the case of "white noise" which is usually described as having equal amplitude at all frequencies (a constant power spectral density).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Krakatoa
Posts: 22
Joined: Tue Mar 04, 2014 9:26 am
Operating System: Please select

Re: Frequency Analysis issue: pink noise

Post by Krakatoa » Tue Mar 04, 2014 8:37 pm

Hi Steve, sorry to keep banging this drum, but a spectrum analyzer with a log x axis that doesn't show pink noise as flat is at best misleading and at worst plain wrong. I won't keep going over this (I'm just trying to improve this otherwise great app) so I'm out. Best wishes.

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Frequency Analysis issue: pink noise

Post by steve » Tue Mar 04, 2014 11:33 pm

Krakatoa wrote:a spectrum analyzer with a log x axis that doesn't show pink noise as flat is at best misleading and at worst plain wrong.
That is true for a an analyzer whose bandwidth is a constant percentage of the center frequency of the filter, but that is not what "Plot Spectrum" is, and is not what "Plot Spectrum" is intended to be.

Plot Spectrum provides a graphical representation of peak amplitude against frequency. Thus for white noise it will show (approximately) equal amplitudes across the spectrum, and for pink noise shows a 3dB per octave roll-off.

Before digital electronics and FFT analysis it was virtually impossible to plot amplitude against frequency other than by analyzing relatively broad frequency bands, thus analyzers that measured 1/2 or 1/3 octave bands were the order of the day. With the advent of digital electronics, computers and FFT analysis, the audio spectrum can be divided into tens of thousands of frequency bands.

Both types of analyzer have their uses. FFT based frequency analyzers have tended to dominate in computer based audio applications over the last couple of decades due to popularity of the extremely fine detail they can provide in the frequency domain. 1/3 octave analyzers remain popular as hardware devices, particularly in the field of environmental acoustics. I believe you can even get a 1/3 octave analyzer as an app for smart phones.

A "classic" 1/3 octave spectrum analyzer is not currently included with Audacity. That would be a feature request.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Krakatoa
Posts: 22
Joined: Tue Mar 04, 2014 9:26 am
Operating System: Please select

Re: Frequency Analysis issue: pink noise

Post by Krakatoa » Wed Mar 05, 2014 9:39 am

Hi Steve,
That is true for a an analyzer whose bandwidth is a constant percentage of the center frequency of the filter, but that is not what "Plot Spectrum" is, and is not what "Plot Spectrum" is intended to be.
My point is that Plot Spectrum should be exactly that when in Log x axis mode otherwise it gives the wrong / unexpected reading. Pink Noise should look flat in Log and White Noise should look flat in Linear. That is, Plot Spectrum is correct as it currently is when in Linear x axis mode but incorrect when in Log.

Best wishes,

Krakatoa

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Frequency Analysis issue: pink noise

Post by Gale Andrews » Sat Mar 08, 2014 9:25 pm

Moved to "Adding Features" as there is no agreement this is a "bug".

If am not an audio engineer, but if you HighPass white noise and pink noise at say 5000 Hz, doesn't the pink noise "sound" much quieter and the white noise not "sound" much quieter?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked