lpHmod

1st order lowpass filter with resonance and self-modulation with the highpass output to increase the slope steepness The starve parameter allows to continuously subtract an amount from the LP buffer, forcing it to zero
Author: Remco van der Most
License: BSD
Github: sss/filter/lpHmod.axo

Inlets

frac32 cutoff frequency

frac32buffer input

Outlets

frac32buffer output

Parameters

frac32.u.map freq

frac32.u.map slope

frac32.u.map.filterq res

frac32.u.map.filterq starve

Declaration
int32_t val, hp, HP;
Init
val = 0;
Audio Rate
int32_t dif = inlet_in - val;
dif = dif > 0 ? -dif : dif;

int32_t f;
MTOF(__SSAT(param_freq + inlet_freq + ___SMMUL(dif << 1, param_slope << 4), 28),
     f);
val = ___SMMLA((inlet_in - val + (___SMMUL(param_res, hp) << 5)) << 1, f, val);
outlet_out = val;
HP += ___SMMUL(val - HP, f) << 1;
hp = val - HP;
val -= ___SMMUL(val, param_starve) << 1;

Privacy

© 2024 Zrna Research