kfrlib / kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
https://www.kfrlib.com
GNU General Public License v2.0
1.62k stars 248 forks source link

Polyphase filter bank #193

Open xkzl opened 9 months ago

xkzl commented 9 months ago

Hello @dancazarin ,

I would like to resample my signal and apply a filter bank to my input signal. I have done some attempt of implementation on my own, but would it be possible to implement such features directly into KFR in the future ?

dancazarin commented 9 months ago

Hello, As for resampling with bandpass filtering using a polyphase FIR filter to prevent aliasing, there is a builtin feature since KFR 1, see examples/sample_rate_conversion.cpp. It uses Kaiser window with adjustable quality (transition band width) and cutoff frequency. Or do you need to pass custom coefficients to the polyphase filter?

xkzl commented 9 months ago

May I ask the effect of this adjustable quality? I am usually not working with audio. Additionally, I would expect lowpass not bandpass filtering to prevent aliasing.

I might actually need some flexibility and interested in passing some custom coefficients to the polyphase filter indeed.