2
$\begingroup$

I'm working on an audio based application for android platform , I'm trying to use a low pass filter to a fixed or variable max frequency "depends on the cost of development". first I've been playing around with FFT and I believe I can get results out of it "by muting the frequencies above the required frequency and then do inverse FFT". but the processing time seems high so I've searched again and found that a real time LPF can be implemented and applied to PCM data "IIR , Butterworth". any suggestions on the best approach keeping in mind low processing speed "CPU" and small available memory "around 20MB for dalvik virtual machine"

$\endgroup$
1

1 Answer 1

2
$\begingroup$

Audio EQ in by FFT?!? Please don't do that. CPU usage will be the least of your worries. http://blog.bjornroche.com/2012/08/why-eq-is-done-in-time-domain.html There was also a related discussion recently on the linkedin dsp group.

This post covers how to do a bell filter in the time domain, but it's extremely similar to create a low pass (actually a low pass is easier), and will be MUCH easier than trying to do an FFT (which won't do what you want anyway): http://blog.bjornroche.com/2012/08/basic-audio-eqs.html

You won't have to worry at all about memory (it only needs 2 memory slots) and CPU usage is very low. Plus latency is minimal. The final implementation is like 10 lines of code.

The original "cookbook" reference is here: https://www.w3.org/TR/audio-eq-cookbook/

Now, that said, this filter may not do for your purpose, but you haven't really made it clear what that is, so please feel free to clarify.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.