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.64k stars 252 forks source link

Filter's order #165

Open xkzl opened 1 year ago

xkzl commented 1 year ago

Hello @dlevin256 ,

Is there any plan in KFR5.0 to compute the filter's order based on gPass/gStop parameters like in SciPy ? https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.ellipord.html (instead of providing an integer N)

This is something I am using everyday that is very useful. At this time I have to guess the order (or compute it myself based on dB variations I want).

xkzl commented 1 year ago

I just pushed a commit I implemented last week and got tested this week. https://github.com/xKZL/kfr/commit/16b2702850a34b3bfe36550a2a2ef7c58b5e76ce

This is not kfr style again, sorry about that. I hope this might enhance the use of this library.

dancazarin commented 1 year ago

Hello Marco,

Computing the filter order is definitely a good feature for KFR 5.x. Thank you for the contribution.