Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

FFT and guitar not working right

  1. Nov 16, 2014 #1
    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.
     
  2. jcsd
  3. Nov 16, 2014 #2

    sophiecentaur

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  4. Nov 16, 2014 #3
    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.
     
  5. Nov 17, 2014 #4

    sophiecentaur

    User Avatar
    Science Advisor
    Gold Member

    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.
     
  6. Nov 17, 2014 #5
    It looks right . Please see the attach picture. so it a Pluck at 60 Hz..
     

    Attached Files:

  7. Nov 17, 2014 #6
    it also sounds right please listen to the attachments
     

    Attached Files:

  8. Nov 17, 2014 #7
    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.503139


    there is not 60hz
     

    Attached Files:

  9. Nov 17, 2014 #8

    sophiecentaur

    User Avatar
    Science Advisor
    Gold Member

    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. Nov 17, 2014 #9
  11. Nov 17, 2014 #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
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: FFT and guitar not working right
  1. Guitar Amps (Replies: 10)

  2. FFT question (Replies: 6)

  3. Phase of FFT (Replies: 4)

Loading...