FFT not working

ok I am using this site to test :

and I am using 261Hz and I am doing a sawtooth wave.
but the fft give me this back :
the highest point is 1291.992188 hz that is not close to 261 hz
please see attachments
spectrum2.txt (6.13 KB)

The problem is probably the online generator.

This picture shows the online generator waveform (downloaded as a WAV file) in the top track, and an accurate 261 Hz saw wave below it.
Note that the waveform from the online generator is offset vertically from the centre line:

ok if you download the file from the site ( and not just recording) and increase the Size to 4096 the fft seem to work.
also but how about this one
I did the Generate Pluck
Pluck MIDI pitch: 60 hz
when I do the fft I get
the peaks are 1832 hz and 3401 hz

that is not close at all

MIDI Pitch 60 is not 60 Hz, it is middle C: 261.63 Hz.

In order to accurately show lower frequencies in the spectrogram you need to increase the Size, but I can see the 261 Hz peak with a size of 256 (although it reports as 253 Hz). Increasing the size to 4096 (not unreasonable) and changing to log frequency (not strictly necessary, but it makes it easier to see the low frequency peaks), Plot Spectrum reports a peak at 262 Hz.

– Bill

Where do those numbers come from?


I got those numbers from the plot
please see the pic1.png and spectrum4.txt
spectrum4.txt (49.9 KB)

Your plot shows a fundamental at about 262 Hz, which is correct for a pluck at middle C.

The frequencies you’ve identified are the 7th and 13th harmonics.

Nobody said the fundamental would be the highest peak (although it often is).

The FFT (Plot Spectrum) is working fine.

– Bill

“Nobody said the fundamental would be the highest peak (although it often is).”

It is always…

how are you getting 261.63???

looking at this graphic i would not get that the fundamental F is 261.63
how are you getting that ?

261.63 is the standard tuning for C4 (middle C) based on A440 tuning. Other standard frequencies can be found here: Frequencies of Musical Notes, A4 = 440 Hz

I know that 261.63 is C4 or middle C
but how did you get that from looking that the graphic?

If I did not say that I did a MIDI Pitch 60 Pluck , would you know that the fundamental frequency 261.63 Hz from the graphic ?

that is what I am asking.

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:

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

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?

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

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).