Determining the FFT Height for a Guitar String

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

+3
source share
1 answer

I don’t know specifically about guitars, but the missing basics are apparently quite common in acoustics. The Wikipedia page in determining the pitch refers to the secondary processing steps after the FFT, perhaps one of them would be useful.

Also see these two SO questions, there is a lot of good information there: (1) , (2) .

+1
source

Source: https://habr.com/ru/post/1337860/


All Articles