iir1 1.11.0
Permanent link:
cppdashboard.dev/r/2026/10/iir1-1-11-0DSP IIR realtime filter library written in C++
Release notes
Butterworth, Chebychev1 and Chebychev2 are now tested by sending an input signal into them and then compared their output against the output generated by scipy's filter design functions and sosfilt. The scipy outputs have all been pre-calculated and added to the `test` subdirectory. They can be regenerated with `generate_filter_outputs.py`. The csv files are copied, if needed, to the directory of the binary test files so that the tests can load them, for example when building out of source.
There is a new method to set the custom parameters of a filter. This can now be done with `std::array` instead of with raw C arrays:
```
const int nSOS1 = 2;
const std::array<std::array<double, 6>, nSOS1> sosCoefficients{
{ { 1.665623674062209972e-02, -3.924801366970616552e-03,
1.665623674062210319e-02, 1.000000000000000000e+00,
-1.715403014004022175e+00, 8.100474793174089472e-01 },
{ 1.000000000000000000e+00, -1.369778997100624895e+00,
1.000000000000000222e+00, 1.000000000000000000e+00,
-1.605878925999785656e+00, 9.538657786383895054e-01 } }
};
Iir::Custom::SOSCascade<nSOS1> cust (sosCoefficients);
```
Depending on the C++ compiler one can even omit the `<nSOS1>` template parameter:
```
Iir::Custom::SOSCascade cust (sosCoefficients);
```
that works under Linux with gcc and clang but not under Windows using VS.
Share this resource