imaradiostar
Member
I've recently purchased a teensy 3.6 and the audio board. I modified some example code and I have it passing the left audio input to a small FIR filter then out to the left and right outputs, straight to the headphone jack. That's just the barest start to my intended purpose! I was encouraged by Chip's hearing aid project and Frank's software defined radio. They both prove that it should be possible to build what I want. The end-goal is to be able to read an impulse response from the SD card and convolve it with the incoming audio with minimal latency. This will be used for guitar amplifier cabinet simulation.
So I guess I'm going to have way too many questions. I'll get started!
1) is the FIR filter coefficient limit on the audio library really 200? Is that based on a software limitation or the hardware that was available at the time?
2) Do FIR filters have equal frequency spacing like FFT? If they don't, how to I use a huge audio wav impulse (essentially 8800 samples) to generate a much smaller number of FIR coefficients? I looked for octave code and played with a few graphical filter designers on the internet but they were all geared toward very specific and steep filter applications, not the wacky curves I'd like to generate.
3) Several sources on the internet suggest that for a convolution over a given number of points, FFT convolution is superior to FIR methods. I've read threads about the difficulty using DMA and the CMSIS libraries. Is there a straightforward way to get started? I suppose I can copy Frank's code and modify it to suit my needs but I'm still confused as to how to convolve a wav file in ram with the incoming audio. I'm fine with truncating the impulse down to 1024 or 2048 points and it would even be ideal to be able to vary the portion of the IR used in order to compare the sound with different numbers of points. Ideally, I want to use the smallest reasonable size that sounds "right" and leave processor overhead for other things.
I don't expect anyone will be able to say "do this and this and here's the code to do it!" I am hoping for suggestions to point me in the right direction as I now have too many different things to consider!
Thanks all, keep up the good work.
Jamie
So I guess I'm going to have way too many questions. I'll get started!
1) is the FIR filter coefficient limit on the audio library really 200? Is that based on a software limitation or the hardware that was available at the time?
2) Do FIR filters have equal frequency spacing like FFT? If they don't, how to I use a huge audio wav impulse (essentially 8800 samples) to generate a much smaller number of FIR coefficients? I looked for octave code and played with a few graphical filter designers on the internet but they were all geared toward very specific and steep filter applications, not the wacky curves I'd like to generate.
3) Several sources on the internet suggest that for a convolution over a given number of points, FFT convolution is superior to FIR methods. I've read threads about the difficulty using DMA and the CMSIS libraries. Is there a straightforward way to get started? I suppose I can copy Frank's code and modify it to suit my needs but I'm still confused as to how to convolve a wav file in ram with the incoming audio. I'm fine with truncating the impulse down to 1024 or 2048 points and it would even be ideal to be able to vary the portion of the IR used in order to compare the sound with different numbers of points. Ideally, I want to use the smallest reasonable size that sounds "right" and leave processor overhead for other things.
I don't expect anyone will be able to say "do this and this and here's the code to do it!" I am hoping for suggestions to point me in the right direction as I now have too many different things to consider!
Thanks all, keep up the good work.
Jamie