Electronic – Lossless FFT on audio data

armaudiofft

I have an application where I'll be receiving an audio stream, much like using headphones, into my processor. I would like to run FFT and various DSP algorithms on the sampled audio and then spit the audio back out as if the device wasn't there. Basically doing DSP in real-time in between samples I guess. The processor I'm using is the MKL26Z128xxx4, mounted on the FRDM-KL26Z development board. It has a single ARM Cortex M0+ core and is programmed in C/C++ and can use the THUMB Assembly instruction set.

How would I do this without losing any of the streamed audio?

Best Answer

FFT needs to sample at at least twice the frequency of your signal, and should not introduce any loss. Loss is introduced on compression or encoding. Your input and outputs should be able to match the frequency, amplitude, and frequencies of the signal you are sampling.

Your biggest challenge is processing the DSP algorithms in real time, which depends on the algorithms you use, how many, and how your processor can keep up with it, with minimal delay. Like fractions of a second, to stay in sync with anything else (Video, other audio, or live instruments).

You need to do some calculations on what you need, through testing, before you can find out if your platform is good enough, or where you need to rethink or cut around.