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

mFeedbackComb


An IIR comb

Description

An IIR comb filter. Length can be changed and interpolation is available.

Template Parameters

template<class T = int32_t, meap_interpolation INTERP = mINTERP_NONE>

T: data type used in delay line

INTERP: kind of interpolation used when indexing non-integer sample indices

Class Methods

Constructor

mFeedbackComb(uint32_t max_delay_length, float delay_length, float feedback = 0.5)

max_delay_length: Constructor will allocate a delay buffer with this many samples. Cannot be changed. This is the maximum length of delay that this line can handle.

delay_length: Actual delay length between writing and reading samples. Can be changed

feedback: Feedback amount from output to input of delay line. (0 to 1.0)


void setDelay(float delay_samples)

Sets length of delay used in comb filter. Must be less than max_delay_samples


void setFeedback(float feedback)

Sets feedback from output to input of delay line within comb filter. (0 to 1.0)


T next(T in_sample)

Retrieves a sample from comb filter and writes another sample into it.

Example

Relevant Tutorials