从均衡器的音频数据 [英] Equalizer from audio data
问题描述
我有一个MP3文件,所以我需要发挥它,以及(在附加的图像等)显示均衡器。结果
所以打是不是问题,但我不知道如何来衡量基于频率当前播放的样本星展的力量。
I have a mp3 file, so I need to play it, and display an equalizer (like in attached image).
So playing is not problem, but I have no idea how to measure power of current playing sample's dBs based on frequency.
通过哪些步骤,我可以得到的数据为当前样品的展示分贝?结果
的当我想,我需要在不同频率的权力的某些阵列,对吗?的
By which steps I can get data for displaying dBs of current sample?
As I guess, I need to get some array of powers in different frequencies, am I right?
下面是什么,我想实现的例子:结果
https://www.youtube.com/watch?v=7oeb-OIOe-0 结果
https://www.youtube.com/watch?v=PwmUhTDr0Y0
Here is examples of what I want to achieve:
https://www.youtube.com/watch?v=7oeb-OIOe-0
https://www.youtube.com/watch?v=PwmUhTDr0Y0
推荐答案
从时域变换到频域的标准方法是一个的傅里叶变换。
The standard way to transform from time domain to frequency domain is a Fourier Transform.
苹果<一个href=\"https://developer.apple.com/library/ios/documentation/Performance/Conceptual/vDSP_Programming_Guide/UsingFourierTransforms/UsingFourierTransforms.html\"相对=nofollow>提供之一VDSP (矢量数字信号处理)。
Apple provide one in vDSP (vector Digital Signal Processing).
Walkthrough using this library here. Another example (for bats!) here.
顺便说一句,我不会把这个均衡器 - 对我来说,这将是东西,改变在不同频段的波形的相对组件
By the way, I wouldn't call this an equalizer - to me that would be something that alters the relative components of a waveform in different frequency bands.
这篇关于从均衡器的音频数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!