FFT pitch detection for guitar string

房东的猫 提交于 2019-12-21 20:40:04

问题


I have simply pitch detection. Input (microphone) data are passed to fft routine, then I'm looking for a pitch with maximum value It means:

Max(pow(data[i].getRe(), 2) + pow(data[i].getIm(), 2)) for 0<= i < SAmplesSize

I need it for detection of guitar string's primary frequency. It works well for freq 440 hz (and maybe higher, i didn't check that) downto 250 hz. Below this value detected frequency is twice as high as it should be, ie. for 195 hz detected frequency is about 380 hz. It looks like it detects higher harmonics below 250 hz. For pure 195 hz tone it detects perfectly, but for quitar string something is wrong.

Any suggestion what can cause that ? Or should I use more sophisticated pitch detection?

Ps. sampling rate: 8000hz, input data size: 1024


回答1:


I don't know about guitars specifically, but missing fundamentals seem to be quite common in acoustics. The Wikipedia page on pitch detection alludes to secondary processing steps after the FFT, perhaps one of these would be helpful.

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



来源:https://stackoverflow.com/questions/4501089/fft-pitch-detection-for-guitar-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!