FFT not working

Effects, Recipes, Interfacing with other software, etc.
Forum rules
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
steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: FFT not working

Post by steve » Tue Nov 18, 2014 6:24 pm

btb4198 wrote:but how did you get that from looking that the graphic?
Nobody has claimed to get that from the graphic.

From a very large FFT I can see that the fundamental of a MIDI note 60 "Pluck" is about 261 Hz:

Code: Select all

242.248535	-91.680298
244.940186	-87.737885
247.631836	-83.080460
250.323486	-77.384331
253.015137	-70.033623
255.706787	-59.615227
258.398438	-43.077496
261.090088	-35.374306
263.781738	-38.694241
266.473389	-54.144516
269.165039	-66.535614
271.856689	-74.815453
274.548340	-81.046692
277.239990	-86.053345
279.931641	-90.242523
282.623291	-93.846199
285.314941	-97.008987
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

billw58
Forum Staff
Posts: 5565
Joined: Wed Aug 12, 2009 2:10 am
Operating System: macOS 10.15 Catalina or later

Re: FFT not working

Post by billw58 » Tue Nov 18, 2014 7:25 pm

btb4198 wrote:Bill
"Nobody said the fundamental would be the highest peak (although it often is)."
It is always...
Really? Anyone could construct a signal from a sum-of-sines where any arbitrary harmonic is the strongest. So just because Plot Spectrum doesn't show the fundamental as the highest peak does not mean that Plot Spectrum is broken.

Try this. Generate a tone, "Square, no-alias" at 440 Hz. Select the track and do Effect > High Pass Filter, Frequency 1000 and Roll off 24 dB/octave. Now do a Plot Spectrum on the track. Which peak is highest?
btb4198 wrote: would you know that the fundamental frequency 261.63 Hz from the graphic ?
that is what I am asking.
You wouldn't, at least to that accuracy. From the plot (and from the "peak finding" code built into that plot window) you get 262 Hz, which is about the best you're going to get without going to insane FFT window sizes. From the text dump you get somewhere around 261.09 Hz. FFT can only tell you the level in each "frequency bin", not exactly where the peak is.

-- Bill
Last edited by billw58 on Fri Apr 24, 2015 4:43 pm, edited 2 times in total.
Reason: fix typo

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

Re: FFT not working

Post by Robert J. H. » Wed Nov 19, 2014 1:50 am

btb4198 wrote:Bill
"Nobody said the fundamental would be the highest peak (although it often is)."

It is always...
Clearly not!

It is often totally missing. The most famous example are church bells that do not play the fundamental they have the name from.
The enhanced autocorrelation does often show weak or missing fundamentals where the normal spectrum sucks.
Another good measurement is the harmonic product spectrum (which is unfortunately not implemented).

Post Reply