bp svf m

Bandpass filter, state-variable type, control rate
Author: Johannes Taelman
License: BSD
Github: kfilter/bp svf m.axo

Inlets

frac32 filter input

frac32 pitch input

frac32 resonance input

Outlets

frac32 filter output

Parameters

frac32.s.map.kpitch pitch

frac32.u.map.filterq reso

Declaration
int32_t low;
int32_t band;
Init
low = 0;
band = 0;
Control Rate
int32_t damp = (0x80 << 24) - (__USAT(inlet_reso + param_reso, 27) << 4);
damp = ___SMMUL(damp, damp);
int32_t alpha;
int32_t freq;
MTOFEXTENDED(param_pitch + inlet_pitch, alpha);
SINE2TINTERP(alpha, freq);
int32_t in1 = inlet_in;
int32_t notch = inlet_in - (___SMMUL(damp, band) << 1);
low = low + (___SMMUL(freq, band) << 1);
int32_t high = notch - low;
band = (___SMMUL(freq, high) << 1) + band; // - drive*band*band*band;
int32_t out1 = band;
outlet_out = out1;

Privacy

© 2024 Zrna Research