FFT and guitar not working right

  • Thread starter Thread starter btb4198
  • Start date Start date
  • Tags Tags
    Fft Guitar
Click For Summary

Discussion Overview

The discussion revolves around the challenges of using Fast Fourier Transform (FFT) to analyze guitar sounds, specifically when trying to identify the frequency of notes played on a guitar. Participants explore the effectiveness of FFT and alternative methods for frequency analysis, including the use of Audacity and other waveforms like sawtooth and sine waves.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant questions the effectiveness of FFT for analyzing guitar notes, suggesting that the tool may not be the issue but rather the method of data handling.
  • Another participant emphasizes the importance of having a fundamental period that matches the sequence length or using windowing to avoid artifacts in FFT results.
  • Some participants report that FFT seems to work only for sine waves and not for other waveforms like sawtooth, raising concerns about the sampling method and potential issues with under-sampling or missing Nyquist filtering.
  • A participant mentions that their FFT results do not match expected frequencies, specifically noting discrepancies in the expected frequency of 87 Hz.
  • There is a suggestion to consider how guitar tuner apps operate, implying they may not rely on FFT for frequency detection.
  • Participants share specific frequency outputs from their FFT analyses, with one noting a result of 258.398 Hz, which is close to the expected frequency for Middle C (261 Hz).
  • Another participant reports an unexpected FFT result of 1566.5405 Hz when analyzing a sawtooth wave at 261 Hz, indicating potential issues with the analysis process.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of FFT for analyzing guitar sounds, with some suggesting that the method of sampling and data handling may be the source of discrepancies. There is no consensus on the best approach or the reliability of FFT in this context.

Contextual Notes

Participants mention various factors that could affect FFT results, such as the need for proper windowing, the sampling method, and the potential for artifacts in frequency analysis. These aspects remain unresolved within the discussion.

btb4198
Messages
570
Reaction score
10
Why is it that my FFT does not work when I play a note on a guitar ? I even tried audacity and it did not work .
Is there some thing else beside a fft That I can use that can work for a guitar ? So if I play a C I and the program to get me the right frequency that is being played . My fft and audacity were both way off.
 
Engineering news on Phys.org
I don't think it's the tool that's wrong here. I think it's what you are doing with it. In principle, you should be able to analyse a time function in terms of its frequency components but you have to do it right.
To use an fft utility, the data needs either to have a fundamental period that's a multiple of the length of the sequence or you have to window the data. Remember, a Discrete Fourier Transform assumes that the sequence repeats itself. If you try to analyse a sequence that doesn't satisfy that requirement, you will get all sorts of artefacts at frequencies that are not part of the original waveform. You will be getting harmonics of the data sequence repeat rate as well as / instead of the frequency components that you expect to find.

Wiki has an introduction to the process.
 
ok I tried to do it with a saw tooth wave and it still does not work. It seem to only work for sinewave

also
sophiecentaur, I tried to use a window function but that did not help. I used Audacity to generate a pluck and then I only pick of some the points and not all of them and I did a fft in Audacity and it was not close. there was no 87 Hz.
Also I still so not get how window function would help.
 
btb4198 said:
ok I tried to do it with a saw tooth wave and it still does not work. It seem to only work for sinewave

also
sophiecentaur, I tried to use a window function but that did not help. I used Audacity to generate a pluck and then I only pick of some the points and not all of them and I did a fft in Audacity and it was not close. there was no 87 Hz.
Also I still so not get how window function would help.
Is it something obvious like the way you are doing your original sampling? (i.e. wrong or missing Nyquist filter or under-sampling ). What happens if you cut out the initial transients?
How do guitar tuner apps work? Probably not with fft.
How does Audacity 'generate a pluck'? Perhaps the simulation is at fault rather than the analysis.
 
It looks right . Please see the attach picture. so it a Pluck at 60 Hz..
 

Attachments

  • Physics1.png
    Physics1.png
    31.8 KB · Views: 601
it also sounds right please listen to the attachments
 

Attachments

but the fft is way off please see attach pic.
Frequency (Hz) Level (dB)
86.132813 -59.651352
172.265625 -36.878502
258.398438 -30.400234
344.531250 -35.905823
430.664063 -45.633568
516.796875 -38.646156
602.929688 -43.637161
689.062500 -35.162346
775.195313 -27.670515
861.328125 -32.256226
947.460938 -41.441525
1033.593750 -33.528790
1119.726563 -37.669998
1205.859375 -41.013893
1291.992188 -32.503139there is not 60hz
 

Attachments

  • graph.png
    graph.png
    11.3 KB · Views: 537
The highest component is at 258.3. That's pretty near 261 (Middle C)
What does your FFT tell you when you put in a 261Hz sine wave?
 
  • #10
also just to do it and using that same site:
I did a sawthooh wave at 261 hz and my fft came up with 1566.5405Hz
 

Similar threads

Replies
6
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 85 ·
3
Replies
85
Views
11K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 26 ·
Replies
26
Views
5K