What are the FIR filter parameters at AudioInputAnalog source

YasarYY

Member
Hi,

I'm studying source of AudioInputAnalog, input_adc.cpp, and have a question about the FIR filter.

For filtering, this object uses an FIR filter. I'm curious about how its parameters are calculated. The line at which the filter is defined, it's stated the filter is designed at http://t-filter.engineerjs.com/, using 176400 sample freq and int 18 bit output. But at the T-filter page, band and attenuation values are also needed. I did some trials and searching but cannot achieve the impulse params at the source code.

Can anyone help about filter design params for creating the filter impulse params at the source code?
 
Well plotting its response suggests a passband ripple of about 1.5dB, stopband -80dB
Screenshot 2025-07-05 at 21.20.56.png
 
Hi Mark, thank you for the values and the graphs. They are good starting points for filter params, I'll play with the values and see if I can achieve the filter at the source. I don't need to find the exact filter, but a more approximate one will be enough for me to get the idea used while the source was being written.

BTW, what is the tool you used to plot these response graphs? 🧐
 
I found the design parameters. When below parameters are input at the T-filter tool, the exact impulse values at the source code are calculated.

Code:
sampling freq: 176400 Hz
desired #taps: 45
from   to     gain   ripple/att.
0      12000  1      2
22000  88200  0      -80
type: int, 18 bits
 
Back
Top