使用Accelerate Framework进行iOS的FFT间距检测? [英] FFT Pitch Detection for iOS using Accelerate Framework?

查看:184
本文介绍了使用Accelerate Framework进行iOS的FFT间距检测?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在已经阅读了FFT和音高检测一段时间了,但是我把它拼凑起来很麻烦。

I have been reading up on FFT and Pitch Detection for a while now, but I'm having trouble piecing it all together.

我已经知道了加速框架可能是最好的方法,我已经阅读了apple的示例代码,看看如何将它用于FFT。如果我想实时运行音调检测,那么FFT的输入数据是什么?我是否只是从麦克风传入音频流?我怎么做?

I have worked out that the Accelerate framework is probably the best way to go with this, and I have read the example code from apple to see how to use it for FFTs. What is the input data for the FFT if I wanted to be running the pitch detection in real time? Do I just pass in the audio stream from the microphone? How would I do this?

此外,在我得到FFT输出后,我怎样才能得到频率?我到处读书,找不到任何例子或解释?

Also, after I get the FFT output, how can I get the frequency from that? I have been reading everywhere, and can't find any examples or explanations of this?

感谢您的帮助。

推荐答案

频率和音高不是一回事 - 频率是物理量,音调是心理感知 - 它们是相似的,但有重要的差异,可能有也可能无关紧要给你,取决于你试图测量音高的乐器类型。

Frequency and pitch are not the same thing - frequency is a physical quantity, pitch is a psychological percept - they are similar, but there are important differences, which may or may not matter to you, depending on the type of instrument for which you are trying to measure pitch.

你需要阅读一些有关各种音调检测算法的信息(以及音调本身的意义),决定你想要使用什么算法,只有然后设置实现它。有关此Wikipedia页面。 wikipedia.org/wiki/Pitch_%28music%29rel =nofollow noreferrer>音高和音高检测(请注意,您可以将FFT用于基于自相关和频域的方法)。

You need to read up a little on the various pitch detection algorithms (and on the meaning of pitch itself), decide what algorithm you want to use and only then set about implementing it. See this Wikipedia page for a good overview of pitch and pitch detection (note that you can use FFT for the autocorrelation-based and frequency domain methods).

至于使用FFT来识别频谱中的峰值及其相关频率,在SO上有很多与此相关的问题和答案,例如:如何获取FFT中每个值的频率?

As for using the FFT to identify peaks in a spectrum and their associated frequencies, there are many questions and answers related to this on SO already, see for example: How do I obtain the frequencies of each value in an FFT?

这篇关于使用Accelerate Framework进行iOS的FFT间距检测?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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