本文介绍了从iPhone上的音频流获取赫兹的频率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是要在iOS上获得音频流(音乐)Hz的频率值的最佳方法?什么是苹果提供这样做的最好,最简单的框架。先谢谢了。

What would be the best way to get Hz frequency value from audio stream(music) on iOS? What are the best and easiest frameworks provided by Apple to do that. Thanks in advance.

推荐答案

此问题在这里问了很多不同的方式对如此,所以我写了code一个小教程,你甚至可以在商业使用和关闭源应用程序。这不一定是最好的方式,但它是一种方式,很多人都明白。你将不得不根据你所说的每个短的音乐片段赫兹平均值什么修改。你的意思是根本的音高或频率重心,例如。

This question is asked a lot in different ways here on SO, so I wrote a little tutorial with code that you can use even in commercial and closed source apps. This is not necessarily the BEST way, but it's a way that many people understand. You will have to modify it based on what you mean by "Hz average value of every short music segment". Do you mean the fundamental pitch or the frequency centroid, for example.

您可能需要使用苹果的FFT在加速框架,另一个答案的建议。

You might want to use Apple's FFT in the accelerate framework as suggested by another answer.

希望它帮助。

http://blog.bjornroche.com/2012/07/frequency-detection-using-fft-aka-pitch.html

这篇关于从iPhone上的音频流获取赫兹的频率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 01:40