C的实时算法来确定注

C的实时算法来确定注

本文介绍了C / C ++ /的OBJ-C的实时算法来确定注(不是音高)从声音输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要检测没有在球场上,而是在沥青类一唱音符。

I want to detect not the pitch, but the pitch class of a sung note.

所以,无论是C4或C5是不重要:它们必须被检测为C

So, whether it is C4 or C5 is not important: they must both be detected as C.

想象12个半音布置在钟面,与针指向音高集合。这就是我追求!理想情况下,我想能够告诉唱音符是否斑点或稍微偏离。

Imagine the 12 semitones arranged on a clock face, with the needle pointing to the pitch class. That's what I'm after! ideally I would like to be able to tell whether the sung note is spot-on or slightly off.

这是不是$ P $的副本pviously问的问题,因为它引入了约束:

This is not a duplicate of previously asked questions, as it introduces the constraints that:

  1. 声源是一个人的声音,希望可以忽略不计的背景干扰(虽然我可能需要处理这一点)

  1. the sound source is a single human voice, hopefully with negligible background interference (although I may need to deal with this)

八度并不重要,只有音高集合

编辑 - 链接:
实时基音检测
<一href="http://stackoverflow.com/questions/3398753/using-the-apple-fft-and-accelerate-framework?lq=1">Using苹果FFT和加速框架

EDIT -- Links:
Real time pitch detection
Using the apple FFT and accelerate Framework

推荐答案

最后,我在这一个封闭,感谢的这文章

Finally I have closure on this one, thanks to this article from DSP Dimension

本文包含源$ C ​​$ C。

The article contains source code.

基本上,他执行FFT。然后,他解释说,频率不重合发现与他们坠入将涂抹在附近的垃圾箱在一种钟形曲线的bin中心。他介绍了如何从这些数据中提取的精确频率在第二遍(FFT是第一关)。

Basically he performs an FFT. then he explains that frequencies that don't coincide spot on with the centre of the bin they fall in will smear over nearby bins in a sort of bell shaped curve. and he explains how to extract the exact frequency from this data in a second pass (FFT being the first pass).

文章接着进一步变调;我可以简单地删除code。

the article then goes further to pitch shift; I can simply delete the code.

请注意,他们提供一个商业库,做同样的事情(和远)唯一的超级优化。还有的是,可能会做的一切,我所需要的库的免费版本,但因为我已经经历了iOS音频子系统的工作,我可能也只是实现它自己。

note that they supply a commercial library that does the same thing (and far more) only super optimised. there is a free version of the library that would probably do everything I need, although since I have worked through the iOS audio subsystem, I might as well just implement it myself.

备案,我找到了一个替代方法通过近似二次曲线在bin和它的两个邻国的。我不知道什么是这两种方法之间的相对准确性。

for the record, I found an alternative way to extract the exact frequency by approximating a quadratic curve over the bin and its two neighbours here. I have no idea what is the relative accuracy between these two approaches.

这篇关于C / C ++ /的OBJ-C的实时算法来确定注(不是音高)从声音输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 01:16