Decimal places for frequency in spectrums?

Anything you think is missing, or needs enhancement, goes here.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Decimal places for frequency in spectrums?

Permanent link to this post Posted by ElliotElliot » Tue Dec 12, 2017 9:46 am

Hello,
I see that there are no decimal places for the frequencies and this seems like quite a limitation.
ElliotElliot
 
Posts: 8
Joined: Tue Dec 12, 2017 9:40 am
Operating System: Windows 10

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by steve » Tue Dec 12, 2017 11:58 am

Do you mean in "Plot Spectrum"? http://manual.audacityteam.org/man/plot_spectrum.html

If so, the frequency analysis measures how much audio there is in a sequence of "frequency bands". For example, with default settings, the frequency bands are:
Code: Select all
0.000000 to 86.132812
86.132812 to 172.265625
172.265625 to 258.398438
258.398438 to 344.531250
...
...
21791.601562 to 21877.734375
21877.734375 to 21963.867188
21963.867188 to 22050.000000


The frequency values shown in the interface are then estimated by interpolation from the surrounding data values.
The estimated values are usually within about +/- 1 Hz, depending on the selected options. Higher "Size" settings give better frequency accuracy by collecting the "frequency bins" over longer periods of time.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46815
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by ElliotElliot » Tue Dec 12, 2017 12:56 pm

Thanks, yes I do mean "plot spectrum".

What you've told me is hard for me to understand. I really just want "cursor" and "peak" to at least one or two decimal places. It might be good also to be able to zoom in on the frequency axis like we can in the amplitude axis.
ElliotElliot
 
Posts: 8
Joined: Tue Dec 12, 2017 9:40 am
Operating System: Windows 10

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by steve » Tue Dec 12, 2017 1:41 pm

ElliotElliot wrote:I really just want "cursor" and "peak" to at least one or two decimal places.

The approximation is not that accurate. It would be like if I asked you to measure with a ruler the length of a piece of string to thousandths of a mm, when in fact you could not actually measure more precisely than to about +/- half a mm.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46815
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by ElliotElliot » Tue Dec 12, 2017 3:27 pm

I see. It should be possible to improve this in some cases though, and limiting the frequency precision the nearest hz is probably too blunt. I didn't understand much of what you said earlier but I think that the frequency resolution for DFT will be basically proportional to the amount of data. I don't know a formula for the error in the frequency though. I'd like to look into this later.
ElliotElliot
 
Posts: 8
Joined: Tue Dec 12, 2017 9:40 am
Operating System: Windows 10

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by ElliotElliot » Tue Dec 12, 2017 4:24 pm

OK last post by me on this; I've managed to get two decimal points for frequency, I just had to select more data. The size is now 65,536, taken from from a 44.1khz wav file.

I did some reading and I think the frequency precision might be given by the following formula:

(input frequency) / N

Where N is the "size". This seems to fit what I am seeing.
ElliotElliot
 
Posts: 8
Joined: Tue Dec 12, 2017 9:40 am
Operating System: Windows 10

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by steve » Tue Dec 12, 2017 4:27 pm

ElliotElliot wrote:I think that the frequency resolution for DFT will be basically proportional to the amount of data.

Yes, the bigger the "Size" setting in Plot Spectrum, the smaller the "frequency bins" (narrower frequency bands), so the more precise the Hz measurements.
At maximum "Size" (65536), the frequency bins are about 0.7 Hz wide, so in this case the approximation could be a little better than +/- 1 Hz, but why would you need that?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46815
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by ElliotElliot » Tue Dec 12, 2017 4:35 pm

Hi sorry, ignore my last post. I looked at the scale and it had decimal points, but not the readings. I want the greater accuracy for checking musical notes. I think one or two hz can be quite significant. So it looks like I would like there to be a larger "size" setting.
ElliotElliot
 
Posts: 8
Joined: Tue Dec 12, 2017 9:40 am
Operating System: Windows 10

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by steve » Tue Dec 12, 2017 6:44 pm

ElliotElliot wrote:I want the greater accuracy for checking musical notes. I think one or two hz can be quite significant.

Not if you only need to know what the note is. For example, with standard A440 tuning, an "A4" is nominally 440 Hz and an A#4 is about 466 Hz. If any real acoustic instrument plays an "A", it will never be exactly 440 Hz. Unless you have exceptionally fine sense of pitch, any frequency around 440 Hz +/- a couple of Hz will sound like a correctly in-tune "A".

Listen to this sequence of 8 notes (A, C#, A, G, C#, A, A, C#)
sequence.wav
(344.56 KiB) Downloaded 13 times

Which of the "A" notes sound in tune, which are a bit sharp, and which are a bit flat? Listen to it a few times and write down your answer before analyzing it.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46815
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Decimal places for frequency in spectrums?

Permanent link to this post Posted by kozikowski » Tue Dec 12, 2017 6:55 pm

I think one or two hz can be quite significant.

Why do you think that?

What instruments do you play? My joke is that I don’t play the piano, I play at the piano. Big difference.

Koz
kozikowski
Forum Staff
 
Posts: 39870
Joined: Thu Aug 02, 2007 5:57 pm
Location: Los Angeles
Operating System: OS X 10.9 Mavericks

Next

Return to Adding Features to Audacity



Who is online

Users browsing this forum: No registered users and 1 guest