Hi All, I'm venturing on a project to put a device (presumably an Arduino) in-line between an audio source and speakers that would apply a Finite Impulse Response filter to audio in real-time, "correcting" the audio before it reaches the speakers. This would be for high-fidelity sound.
Most of my experience is with an Uno, but I don't think the 10-bit ADC/DAC would suffice (CD quality audio appears to be 16-bit). I'm also not sure the Uno would have the processing power to apply the filter (the filter itself would be stored in a short WAV file).
My question is, what sort of hardware might be up to the task, and are there any pitfalls/tips that would be helpful to know about before I dive into it?
Thanks in advance!
Assuming stereo, you will need at least two 16 bit ADCs, two 16 bit DACs and a very fast processor to implement any sort of audio quality FIR filter.
There are special purpose filter chips and general-purpose DSP (digital signal processing) chips. The filter-chips may not be FIR filters, but I'd look into that first. You wouldn't have to write a program for a filter chip...
Alternatively, a Raspberry Pi has a soundchip so you'd have a head start.
Have you done any DSP programming?
Most of my experience is with an Uno, but I don't think the 10-bit ADC/DAC would suffice (CD quality audio appears to be 16-bit).
That's correct, and from what I've read here on the forum, the ADC is not fast enough for a 44.1kHz sample rate. So, you're not going to get "CD quality".
And, there is no DAC at all on the "basic" Arudino.
I'm also not sure the Uno would have the processing power to apply the filter (the filter itself would be stored in a short WAV file).
I don't have a feel for that. I don't think a basic" high-pass or low-pass filter is that complex. But, DSP is usually done in floating point (because there's lots of summation) so processing power could be an issue. And, the Arduino couldn't do anything else because there is no buffering.
(the filter itself would be stored in a short WAV file).
A DSP filter is an algorithm so it doesn't make sense to store that in a WAV file. You can store an Impulse Response in a WAV file, but I don't know how an impulse response is used to modify a sound...
You have to convolve it. Which is way beyond the arduino's capabilities.
A Teensy 3.2 with audio shield can handle that although it will depend upon how many taps the FIR has.
The Teensy 3.2 has DSP instructions. The audio shield samples 16-bit stereo at 44.1kHz.
+edit: you will need to know how to design and implement the FIR
Pete
You would not use ADC.DAC's for this job use a CODEC take a look at the ones from Analog Devices or TI
Mark
Thanks everyone. I haven't done any DSP programming (coming up on that class as a EE student) and am looking forward to the experience (hence the project). I'll muddle my way along to some other hardware and see where that gets me.
I have people close to me that have experience with FIR implementation on a PC but they don't have experience with hardware.