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

iir1

Public Member Functions | List of all members
Iir::Butterworth::BandPass< FilterOrder, StateType > Struct Template Reference

`#include <Butterworth.h>`

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

## Public Member Functions
void | setup (double sampleRate, double centerFrequency, double widthFrequency)
void | setup (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< MaxStages, StateType >
void | reset ()
void | setup (const double(&sosCoefficients)[MaxStages][6])
template<typename Sample >
Sample | filter (const Sample in)
const Cascade::Storage | getCascadeStorage ()

## Detailed Description

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

Butterworth Bandpass filter.

Parameters

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

## Member Function Documentation

## ◆ setup() [1/2]

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

void Iir::Butterworth::BandPass< 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 bandpass
  widthFrequency | Width of the bandpass

## ◆ setup() [2/2]

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

void Iir::Butterworth::BandPass< FilterOrder, StateType >::setup | ( | 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 bandpass
  widthFrequency | Width of the bandpass

## ◆ setupN() [1/2]

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

void Iir::Butterworth::BandPass< 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 bandpass
  widthFrequency | Width of the bandpass in normalised freq

## ◆ setupN() [2/2]

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

void Iir::Butterworth::BandPass< 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 bandpass
  widthFrequency | Width of the bandpass in normalised freq

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

- iir/Butterworth.h