Equalizer from audio data

ぃ、小莉子 提交于 2019-12-08 00:53:53

问题


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?

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


回答1:


The standard way to transform from time domain to frequency domain is a Fourier Transform.

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.



来源:https://stackoverflow.com/questions/27733553/equalizer-from-audio-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!