MEAP The Library

MOZZI
MEAP The Class
C++ tips
Mozzi Reworks
mOscil
mSample
Generators
mDust
mNoise
mOperator
mSineLFO
mEnvSection
Effects
mBitcrusher
mChorus
mDigitalDelay
mFlanger
mPlateReverb
mSchroederReverb
DSP
mDelayLine
mFeedbackComb
mFeedforwardComb
mFIR
mIIR
mNaturalComb
mOnePoleLPF
mResonz
mRingz
mSchroederAllpass
mInstruments
mDrumRack
mFM4Instrument
mMarimbaInstrument
mPopInstrument
mRompler
mStringInstrument
mStringSynthInstrument
Composition
mMML
mTransitionTable
Utilities
mEventDelayMicros
mRandomDistribution

mIIR


Generic IIR (infinite impulse response) filter

Description

A generic IIR filter class. Filter can be set to any order. Implemented as a Direct Form I filter.

Template Parameters

template <uint16_t filter_order, class T = int32_t>

filter_order: filter order (ie how many delay elements/coefficients are needed)

T: data type used in filter

Class Methods

void setCoefficients(float *a_, float *b_)

a_: Pointer to an array of numerator coefficients. Array should have filter_order elements in it. If a[0] is not equal to 1.0, coefficients will be scaled accordingly.

b_: Pointer to an array of denominator coefficients. Array should have filter_order elements in it


T next(T in_sample)

Sends a sample to the filter and returns a processed sample back.

Example

Relevant Tutorials