Spectrum Comparisons

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
clincoln777
Posts: 10
Joined: Mon Jun 22, 2015 11:38 am
Operating System: Please select

Spectrum Comparisons

Post by clincoln777 » Mon Jun 22, 2015 11:43 am

I am having an issue that I am hoping Audcity can resolve for me. I am wanting to export the freq/db levels from the spectrum analyzer after recording a sample of audio. Then I want to do the same thing a second time and compare the two spectrum data export files.

I was expecting to see the exact same data (at least at the start of the comparison) but strangely me DB levels are off slightly between the two files.

The were recorded on the same system about 45 seconds apart and of course same audio.

Is my basic expectation that these exports would be the same wrong, or what is it I am not understanding. It probably goes without saying I am fairly new to audio analysis.

Can you help me?

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

Re: Spectrum Comparisons

Post by steve » Mon Jun 22, 2015 12:07 pm

Audacity automatically adjusts the x/y axes to fit the data. I agree that this is not useful when you want to compare spectra.

The next version of Audacity (2.1.1) goes some way to improving this as it allows you to zoom the Y axis (dB). It does not completely resolve the issue but it is a step in the right direction which hopefully can be improved in later versions.

Probably the best way at present is to export the data from "Plot Spectrum", then use third party software to plot the graph.

There are a number of "feature request" on the Audacity wiki that relate to this. Do you wish to "vote" for any of these: http://wiki.audacityteam.org/wiki/Featu ... t_Spectrum (to "vote", just say which you want and I can update the vote count).
(note that "voting" does not mean that the feature will be developed, but it gives the Audacity team an idea about what features users are interested in.)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

clincoln777
Posts: 10
Joined: Mon Jun 22, 2015 11:38 am
Operating System: Please select

Re: Spectrum Comparisons

Post by clincoln777 » Mon Jun 22, 2015 6:56 pm

Thanks for the reply. What I do not understand is how the x/y axes can be plotted differently when it is the exact same audio file that is being played in both sides of the comparison. The frequencies match exactly in the comparisons but the decibels do not. How is that possible?

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Spectrum Comparisons

Post by Robert J. H. » Mon Jun 22, 2015 8:16 pm

clincoln777 wrote:Thanks for the reply. What I do not understand is how the x/y axes can be plotted differently when it is the exact same audio file that is being played in both sides of the comparison. The frequencies match exactly in the comparisons but the decibels do not. How is that possible?
A possible explanation:

It is often a question of proper alignment.
Spectrograms are calculated from (overlapping, windowed) frames.

Thus, it is important that the audio fits into the "grid".
A numerical example:
Our sequence is
1 2 3 0 0 1 2 3
Frame and hop size = 2, operation = sum:
Frame 1 = 3 (1+2)
Frame 2 = 3 (3+0)
Frame 3 = 1 (0+1)
Frame 4 = 5 (2+3)

As you can see, frames 1-2 and 3-4 can't be compared although they have the same numbers and their overall sum is the same (namely 6).

Another example:
The sequence is
1 1 1 1 1 1 1 1

Frame and hop size = 3, operation = add and average frames (as in "Plot spectrum")

Frame 1 = 1 1 1
Frame 2 = 2 2 2 (frame 1 is added)
Frame 3 = 3 3 2 (we have to add a zero to the last frame)
divided by number of frames = 3:
result = 1 1 0.666

The exact same happens to the spectrogram view and the plot spectrum effect, the operation is just different (a Fourier transform instead of a summation).

A proper comparison has therefore to be made with multiples of the chosen window sizes in mind.

Robert

clincoln777
Posts: 10
Joined: Mon Jun 22, 2015 11:38 am
Operating System: Please select

Re: Spectrum Comparisons

Post by clincoln777 » Mon Jun 22, 2015 10:17 pm

Excellent explanation, thanks.

Post Reply