Detecting audio spectrum
I am writing an audio visualizing application which will detect the low, mid and high frequencies of a song. I have looked endlessly on google and can't seem to find anything and the Apple developer documents all seem to show audio uses in standard ways.
Ideally, I'm just looking for an objective-C开发者_如何学运维 function.
I was also looking for something to filter out frequencies and I could not find anything pre-made. So I started to create my own. I am using a window-sinc filter based off this code. Check it out! http://logix4u.net/DSP/Digital_Filters/Windowed_sinc_filter.html
You can use a simple FFT routine, such as KissFFT, with a fairly small window size (e.g. 256). Then just sum the magnitudes of the bins of interest for each of the three ranges.
精彩评论