吉他弦的FFT音高检测 [英] FFT pitch detection for guitar string

查看:116
本文介绍了吉他弦的FFT音高检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是音高检测.输入(麦克风)数据传递到fft例程,然后我正在寻找具有最大值的音调,这意味着:

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

我需要它来检测吉他弦的主频率.在频率为440 Hz(可能更高,我没有检查)的情况下,它可以很好地工作至250 Hz.低于此值,检测到的频率是应有频率的两倍.对于195 hz,检测到的频率约为380 hz.看起来它检测到低于250 hz的高次谐波.对于纯195 Hz的音调,它可以完美检测,但是对于琴弦,则有些问题.

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.采样率:8000hz,输入数据大小:1024

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

推荐答案

我不特别了解吉他,但是基音检测上的Wikipedia页面暗示了FFT之后的次要处理步骤,也许其中一个可以会有所帮助.

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.

另外,请参见以下两个SO问题,那里有很多很好的信息:(1)(2).

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

这篇关于吉他弦的FFT音高检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆