iir1: Iir::Custom::SOSCascade< NSOS, StateType > Struct Template Reference

iir1

Public Member Functions | List of all members
Iir::Custom::SOSCascade< NSOS, StateType > Struct Template Reference

`#include <Custom.h>`

Inheritance diagram for Iir::Custom::SOSCascade< NSOS, StateType >:

## Public Member Functions
| SOSCascade ()=default
| SOSCascade (const double(&sosCoefficients)[NSOS][6])
void | setup (const double(&sosCoefficients)[NSOS][6])
Public Member Functions inherited from Iir::CascadeStages< NSOS, DirectFormII >
void | reset ()
void | setup (const double(&sosCoefficients)[MaxStages][6])
Sample | filter (const Sample in)
const Cascade::Storage | getCascadeStorage ()

## Detailed Description

### template<int NSOS, class StateType = DirectFormII>
struct Iir::Custom::SOSCascade< NSOS, StateType >

A custom cascade of 2nd order (SOS / biquads) filters.

Parameters

  NSOS | The number of 2nd order filters / biquads.
  StateType | The filter topology: DirectFormI, DirectFormII, ...

## Constructor & Destructor Documentation

## ◆ SOSCascade() [1/2]

template<int NSOS, class StateType = DirectFormII>

Iir::Custom::SOSCascade< NSOS, StateType >::SOSCascade | ( |  | ) |
| default

Default constructor which creates a unity gain filter of NSOS biquads. Set the filter coefficients later with the setup() method.

## ◆ SOSCascade() [2/2]

template<int NSOS, class StateType = DirectFormII>

Iir::Custom::SOSCascade< NSOS, StateType >::SOSCascade | ( | const double(&) | sosCoefficients[NSOS][6] | ) |
| inline

Python scipy.signal-friendly setting of coefficients. Initialises the coefficients of the whole chain of biquads / SOS. The argument is a 2D array where the 1st dimension holds an array of 2nd order biquad / SOS coefficients. The six SOS coefficients are ordered "Python" style with first the FIR coefficients (B) and then the IIR coefficients (A). The 2D const double array needs to have exactly the size [NSOS][6].

Parameters

  sosCoefficients | 2D array Python style sos[NSOS][6]. Indexing: 0-2: FIR-, 3-5: IIR-coefficients.

## Member Function Documentation

## ◆ setup()

template<int NSOS, class StateType = DirectFormII>

void Iir::Custom::SOSCascade< NSOS, StateType >::setup | ( | const double(&) | sosCoefficients[NSOS][6] | ) |
| inline

Python scipy.signal-friendly setting of coefficients. Sets the coefficients of the whole chain of biquads / SOS. The argument is a 2D array where the 1st dimension holds an array of 2nd order biquad / SOS coefficients. The six SOS coefficients are ordered "Python" style with first the FIR coefficients (B) and then the IIR coefficients (A). The 2D const double array needs to have exactly the size [NSOS][6].

Parameters

  sosCoefficients | 2D array Python style sos[NSOS][6]. Indexing: 0-2: FIR-, 3-5: IIR-coefficients.

The documentation for this struct was generated from the following file:

- iir/Custom.h