强大的算法色仪器调谐器? [英] Robust algorithm for chromatic instrument tuner?

查看:159
本文介绍了强大的算法色仪器调谐器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁知道最稳健的算法,一个色仪器调谐器?

Who knows the most robust algorithm for a chromatic instrument tuner?

我想写的仪器调谐器。我曾尝试以下两种算法:

I am trying to write an instrument tuner. I have tried the following two algorithms:

  1. FFT创建Welch周期,然后检测峰值频率

  1. FFT to create a welch periodogram and then detect the peak frequency

一个简单的自相关(http://en.wikipedia.org/wiki/Autocorrelation)

A simple autocorrelation (http://en.wikipedia.org/wiki/Autocorrelation)

我遇到了以下基本问题:

I encountered the following basic problems:

  1. 精度1:在FFT的采样率,记录长度和块大小之间的关系是固定的。这意味着,我需要记录1-2秒的数据来获得几美分的精度。这不正是我所说的实时。

  1. Accuracy 1: in FFT the relation between samplerate, recording length and bin size is fixed. This means that I need to record a 1-2 seconds of data to get an accuracy of a few cents. This is not exactly what i would call realtime.

精度2:自相关工作好一点。为了得到几毛钱,我不得不样品引入线性插值所需要的精确度。

Accuracy 2: autocorrelation works a bit better. To get the needed accuracy of a few cents I had to introduced linear interpolation of samples.

稳健性:如果一个吉他我看到了很多的泛音。有些弦外之音实际上不是由字符串产生的主基调强。我找不到一个可靠的方法来选择播放的正确的字符串。

Robustness: In case of a guitar I see a lot of overtones. Some overtones are actually stronger than the main tone produced by the string. I could not find a robust way to select the right string played.

不过,任何廉价的电子调谐器的工作原理不是我的实现更加强劲。 如何这些调谐器实现的?

Still, any cheap electronic tuner works more robust than my implementation. How are those tuners implemented?

推荐答案

您可以插值的FFT也和你经常可以使用增加precision高次谐波。你需要了解仪器的制作,该谐波一点点,而且更容易,如果你可以假设你是不到一个半八度偏离目标,但即使在没有了,最根本的频率通常远强比第一分谐波,并且不是远低于主谐波。一种简单的规则应该让你选择的基本频率。

You can interpolate FFTs also, and you can often use the higher harmonics for increased precision. You need to know a little bit about the harmonics of the instrument that was produced, and it's easier if you can assume you're less than half an octave off target, but even in the absence of that, the fundamental frequency is usually much stronger than the first subharmonic, and is not that far below the primary harmonic. A simple heuristic should let you pick the fundamental frequency.

我怀疑自相关方法将工作全部强劲整个仪器,但你应该得到一系列的自相似性得分是最高的,当你被一个基频正在抵销。如果你去二,应再次得到相同的分数(内噪声和谐波不同的差分阻尼)。

I doubt that the autocorrelation method will work all that robustly across instruments, but you should get a series of self-similarity scores that is highest when you're offset by one fundamental frequency. If you go two, you should get the same score again (to within noise and differential damping of the different harmonics).

这篇关于强大的算法色仪器调谐器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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