33 #define SHIFTED_1 ((uint8_t) 255)
56 fb = q+ucfxmul(q, SHIFTED_1 - cutoff);
78 buf0+=fxmul(((in - buf0) + fxmul(fb, buf0-buf1)), f);
79 buf1+=ifxmul(buf0-buf1, f);
101 unsigned int ucfxmul(uint8_t a, uint8_t b)
103 return (((
unsigned int)a*b)>>FX_SHIFT);
108 int ifxmul(
int a, uint8_t b)
110 return ((a*b)>>FX_SHIFT);
115 long fxmul(
long a,
int b)
117 return ((a*b)>>FX_SHIFT);
void setResonance(uint8_t resonance)
Set the resonance.
A resonant low pass filter for audio signals.
LowPassFilter()
Constructor.
int next(int in)
Calculate the next sample, given an input signal.
void setCutoffFreq(uint8_t cutoff)
Set the cut off frequency,.