# iir1: Iir::Butterworth::BandStop< FilterOrder, StateType > Struct Template Reference

Iir::Butterworth::BandStop< FilterOrder, StateType > Struct Template Reference

`#include <Butterworth.h>`

Inheritance diagram for Iir::Butterworth::BandStop< FilterOrder, StateType >:

## Public Member Functions

void | setup (double sampleRate, double centerFrequency, double widthFrequency)
void | setupN (int reqOrder, double sampleRate, double centerFrequency, double widthFrequency)
void | setupN (double centerFrequency, double widthFrequency)
void | setupN (int reqOrder, double centerFrequency, double widthFrequency)
Public Member Functions inherited from Iir::CascadeStages<(MaxDigitalPoles+1)/2, DirectFormII >
void | reset ()
void | setup (const double(&sosCoefficients)[MaxStages][6])
Sample | filter (const Sample in)
const Cascade::Storage | getCascadeStorage ()

## Detailed Description

### template<int FilterOrder = 4, class StateType = DirectFormII>
struct Iir::Butterworth::BandStop< FilterOrder, StateType >

Butterworth Bandstop filter.

Parameters

  FilterOrder | Reserves memory for a filter of the order FilterOrder
  StateType | The filter topology: DirectFormI, DirectFormII, ...

## Member Function Documentation

## setup()

template<int FilterOrder = 4, class StateType = DirectFormII>

void Iir::Butterworth::BandStop< FilterOrder, StateType >::setup | ( | double | sampleRate,
|  | double | centerFrequency,
|  | double | widthFrequency
| ) |  |

inline

Calculates the coefficients with the filter order provided by the instantiation

Parameters

  sampleRate | Sampling rate
  centerFrequency | Centre frequency of the bandstop
  widthFrequency | Width of the bandstop

## setupN() [1/3]

template<int FilterOrder = 4, class StateType = DirectFormII>

void Iir::Butterworth::BandStop< FilterOrder, StateType >::setupN | ( | double | centerFrequency,
|  | double | widthFrequency
| ) |  |

inline

Calculates the coefficients with the filter order provided by the instantiation

Parameters

  centerFrequency | Normalised centre frequency (0..1/2) of the bandstop
  widthFrequency | Normalised width of the bandstop

## setupN() [2/3]

template<int FilterOrder = 4, class StateType = DirectFormII>

void Iir::Butterworth::BandStop< FilterOrder, StateType >::setupN | ( | int | reqOrder,
|  | double | centerFrequency,
|  | double | widthFrequency
| ) |  |

inline

Calculates the coefficients

Parameters

  reqOrder | The actual order which can be less than the instantiated one
  centerFrequency | Normalised centre frequency (0..1/2) of the bandstop
  widthFrequency | Normalised width of the bandstop

## setupN() [3/3]

template<int FilterOrder = 4, class StateType = DirectFormII>

void Iir::Butterworth::BandStop< FilterOrder, StateType >::setupN | ( | int | reqOrder,
|  | double | sampleRate,
|  | double | centerFrequency,
|  | double | widthFrequency
| ) |  |

inline

Calculates the coefficients

Parameters

  reqOrder | The actual order which can be less than the instantiated one
  sampleRate | Sampling rate
  centerFrequency | Centre frequency of the bandstop
  widthFrequency | Width of the bandstop

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

- iir/Butterworth.h