开发者

FFT pitch detection for guitar string

开发者 https://www.devze.com 2023-01-31 20:40 出处:网络
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:

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


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消