我怎样才能做到实时音高检测在.net中? [英] How can I do real-time pitch detection in .Net?

查看:133
本文介绍了我怎样才能做到实时音高检测在.net中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打一个程序,检测到正在播放的麦克风前的注意事项。我测试n音讯的FFT功能,但我在大胆做了测试,似乎FFT无法正确检测音调。我起了C5,但最高顺位是在E7。

I want to make a program that detects the note that is being played in front of the microphone. I am testing the FFT function of Naudio, but with the tests that I did in audacity it seems that FFT does not detect the pitch correctly. I played an C5, but the highest pick was at E7.

我改变了第一个下拉框的频率分析窗口enchanced自相关,之后的最高顺位是在C5。

I changed the first dropdown box in the frequency analysis window to "enchanced autocorrelation" and after that the highest pick was at C5.

我用Google搜索enchanced自相关,也没有运气。

I googled "enchanced autocorrelation" and had no luck.

推荐答案

在音频频谱的最高峰不一定是音高作为一个人会感知它,特别是具有较强的意味的声音。这是因为间距是人的心理感知的现象,大脑往往会演绎出的频率甚至不是present的波形。

The highest peak in an audio spectrum is not necessarily the musical pitch as a human would perceive it, especially in a sound with strong overtones. That's because pitch is a human psycho-perceptual phenomena, the brain will often deduce frequencies that aren't even present in a waveform.

频率或音调估计的自相关方法(大致,发现相隔多远,即使一个有趣的前瞻性和/或非正弦波形重复的时间)通常什么人会打电话间距更好的匹配。之所以各种改进自相关算法是简单的自相关会发现重复波长的近无限多的(例如,如果它重复每1秒它还重复两次,每2秒等),因此,关键是要相关权重不知何故统计更好地匹配什么人会猜测相同的波形。

Auto-correlation methods of frequency or pitch estimation (roughly, finding how far apart even a funny-looking and/or non-sinusoidal waveform repeats in time) is usually a better match for what a human would call pitch. The reason for various enhancements to the autocorrelation algorithm is that simple autocorrelation will find an near infinite number of repeating wavelengths (e.g. if it repeats every 1 second it also repeats twice every 2 seconds, etc.) So the trick is to weight the correlation to somehow statistically better match what a human would guess about the same waveform.

这篇关于我怎样才能做到实时音高检测在.net中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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