I just have a pitch determination. The input (microphone) data is passed to the fft procedure, then I look for the step with the maximum value. It means:
Max(pow(data[i].getRe(), 2) + pow(data[i].getIm(), 2)) for 0<= i < SAmplesSize
I need this to detect the fundamental frequency of a guitar string. It works well for a frequency of 440 Hz (and maybe higher, I did not check) to 250 Hz. Below this value, the detected frequency is two times higher than it should be, i.e. for 195 Hz, the specific frequency is about 380 Hz. It appears to detect higher harmonics below 250 Hz. For a pure tone of 195 hz, it recognizes perfectly, but for the quitar string, something is wrong.
Any suggestion what might cause this? Or should I use a more sophisticated pitch determination?
Ps. sampling frequency: 8000 Hz, input data size: 1024
source share