Public Member Functions

MoBiQuad Class Reference

Two-zero, two-pole filter. More...

#include <mo_filter.h>

Inheritance diagram for MoBiQuad:
MoFilter

List of all members.

Public Member Functions

 MoBiQuad ()
 default constructor creates a second-order pass-through filter
 ~MoBiQuad ()
 destructor
void setCoefficients (SAMPLE b0, SAMPLE b1, SAMPLE b2, SAMPLE a1, SAMPLE a2, bool clearState=false)
 set all filter coefficients
void setB0 (SAMPLE b0)
 set the b[0] coefficient value
void setB1 (SAMPLE b1)
 set the b[1] coefficient value
void setB2 (SAMPLE b2)
 set the b[2] coefficient value
void setA1 (SAMPLE a1)
 set the a[1] coefficient value
void setA2 (SAMPLE a2)
 set the a[2] coefficient value
void setResonance (SAMPLE frequency, SAMPLE radius, bool normalize=false)
void setNotch (SAMPLE frequency, SAMPLE radius)
void setEqualGainZeroes ()
SAMPLE tick (SAMPLE input)
 input one sample to the filter and return a reference to one output

Detailed Description

Two-zero, two-pole filter.


Constructor & Destructor Documentation

MoBiQuad::MoBiQuad (  ) 

default constructor creates a second-order pass-through filter

MoBiQuad::~MoBiQuad (  ) 

destructor


Member Function Documentation

void MoBiQuad::setA1 ( SAMPLE  a1  )  [inline]

set the a[1] coefficient value

void MoBiQuad::setA2 ( SAMPLE  a2  )  [inline]

set the a[2] coefficient value

void MoBiQuad::setB0 ( SAMPLE  b0  )  [inline]

set the b[0] coefficient value

void MoBiQuad::setB1 ( SAMPLE  b1  )  [inline]

set the b[1] coefficient value

void MoBiQuad::setB2 ( SAMPLE  b2  )  [inline]

set the b[2] coefficient value

void MoBiQuad::setCoefficients ( SAMPLE  b0,
SAMPLE  b1,
SAMPLE  b2,
SAMPLE  a1,
SAMPLE  a2,
bool  clearState = false 
)

set all filter coefficients

void MoBiQuad::setEqualGainZeroes (  ) 

sets the filter zeroes for equal resonance gain. when using the filter as a resonator, zeroes places at z = 1, z = -1 will result in a constant gain at resonance of 1 / (1 - R), where R is the pole radius setting.

void MoBiQuad::setNotch ( SAMPLE  frequency,
SAMPLE  radius 
)

set the filter coefficients for a notch at frequency (in Hz) this method determines the filter coefficients corresponding to two complex-conjugate zeros with the given frequency (in Hz) and radius from the z-plane origin. No filter normalization is attempted.

void MoBiQuad::setResonance ( SAMPLE  frequency,
SAMPLE  radius,
bool  normalize = false 
)

sets the filter coefficients for a resonance at frequency (in Hz) this method determines the filter coefficients corresponding to two complex-conjugate poles with the given frequency (in Hz) and radius from the z-plane origin. If normalize is true, the filter zeros are placed at z = 1, z = -1, and the coefficients are then normalized to produce a constant unity peak gain (independent of the filter gain parameter). The resulting filter frequency response has a resonance at the given frequency. The closer the poles are to the unit-circle (radius close to one), the narrower the resulting resonance width.

SAMPLE MoBiQuad::tick ( SAMPLE  input  ) 

input one sample to the filter and return a reference to one output


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines