mostFilter

Custom designed 2-stage filter with crossfade between LP, BP and HP using the "mode" control. 2nd input is an inversed input with inversed filter effects: HP, NOTCH and LP respectively. The "mod" control is an extra filter control, softening the sound, though distorting at higher mod and resonance settings with higher frequencies. It came as a possible extra control within the design..
Author: Remco van der Most
License: BSD
Github: sss/filter/mostFilter.axo

Inlets

frac32 pitch

frac32 resonance

frac32buffer in

frac32buffer iv

frac32buffer freq

Outlets

frac32buffer output

Parameters

frac32.u.map freq

frac32.u.map resonance

frac32.u.map mode

frac32.u.map mod

Declaration
int32_t val;
int32_t rate;
int32_t diff;
Init
val = 0;
rate = 0;
Control Rate
int32_t resonance = (1 << 27) - __USAT(param_resonance + inlet_resonance, 28);
resonance = ___SMMUL(resonance << 2, resonance << 2);
Audio Rate
int32_t in;
in = (inlet_in - inlet_iv);
diff = in - val;
int32_t f;
MTOF(param_freq + inlet_pitch + inlet_freq -
         ___SMMUL(((diff > 0 ? diff : -diff)) << 3, param_mod << 1),
     f);
rate = ___SMMLA((diff) << 1, f, rate);
rate = rate - ___SMMUL(rate << 3, ((1 << 21) + resonance) << 2);
val += rate;
outlet_out = val - ___SMMUL(in << 3, param_mode << 2) + (inlet_iv);

Privacy

© 2024 Zrna Research