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