Re: Guitar Tuner - Low frequencies are not working



noodle22 wrote:
Hi,

I have been trying to create a guitar tuner for the sole purpose of
expanding my understanding of dsp. I started by trying to use the FFT
method. This worked pretty well but when I played an A below middle C, it
gave a frequency of 220Hz instead of 440Hz (while the A above middle C was
440Hz).

Eh? The A below Middle C IS 220Hz.


As I played lower notes, other strange things occurred. When I
hit the C below middle C, it read 393Hz

= 3rd harmonic.

and said it was a G and the D said
it was an A (440 Hz).

ditto.


(a) What size window (and srate) are you using?
(b) at the moment of the attack, the fundamental has barely become established, and octave errors are very possible - so how long are you waiting (over how many FFT windows) before trying to derive the pitch?


One method (CPU-permitting of course) is in fact to detect the harmonics, compute their separation (which for a harmonic sound should be close to the fundamental anyway), and derive the fundamental as the average of those intervals. The high harmonics develop first - especially if you pick close to the bridge (and use a pick rather than a naked finger).


When I look at the spectrum, the peaks for the low C and the low D are
very small to non-existant while the G and A were huge. I thought it might
have been a problem with my FFT so I tried the 0 cross over method and the
same thing occurred. The crossover method only worked for a small range of
high frequencies, I'm guessing because of too much noise of over tones or
something. However, after a correlation, it worked a bit better and, I did
notice when play the A below middle C, it gave 440 instead of 220.


= 2nd harmonic.

See above - better revise your assumptions about what note corresponds to what frequency!

Richard Dobson


.



Relevant Pages

  • Re: Best way to measure precise harmonics?
    ... ostensibly due to a limited-sample FFT. ... containing a fundamental and a bunch of its near harmonics. ... looking for overtones in the spectrum of an excited string, ... the analyzer can resolve them. ...
    (sci.electronics.design)
  • Re: Are harmonics real?
    ... Harmonics in a signal are as real as those mathematics, ... < case of the Fourier transform that's pretty darn real -- you can sum up ... related signals, though not all. ... < The FFT case is a bit problematical, because the FFT is only exact if you ...
    (comp.dsp)
  • Re: Are harmonics real?
    ... < have assumed that the input-output relationship of your system follows ... saturated signal had more harmonics than I knew what to do with. ... in that case I could point to the FFT in a non-technical way and say ... It found and revealed the harmonics created by the saturation. ...
    (comp.dsp)
  • Re: Are harmonics real?
    ... other issues could create harmonics, ... It's interesting that a "debate has raged" as to whether harmonics are being "manufactured" by the FFT calculation. ... One must imagine that by "FFT calculation" folks must mean the entire process including word lengths, arithmetic, etc. because the FFT calculation itself I don't believe / see how it should be suspect. ...
    (comp.dsp)
  • Re: Are harmonics real?
    ... < I am involved in the machinery vibration analysis field. ... < energy at all frequencies, whereas a pulse train will generate harmonics. ... < An FFT of the impact will have energy at 'all' frequencies. ...
    (comp.dsp)