frac32buffer in
frac32buffer out
frac32.s.map mod1
frac32.s.map.pitch damp
frac32.u.map rate
int32_t O1;
int32_t prev;
int32_t cap1;
int32_t cap2;
SINE2TINTERP(1 << 30, O1)
int32_t damp;
MTOF(param_damp, damp)
int32_t in = inlet_in;
int32_t comp;
int32_t offs;
comp = in > prev ? (1 << 27) : -param_mod1;
int32_t rate = (comp - cap1) << 1;
rate = rate > param_rate ? param_rate : rate;
rate = rate < -param_rate ? -param_rate : rate;
cap1 = ___SMMLA(rate, damp, cap1);
outlet_out = ___SMMUL(in << 2, cap1 << 3);
prev = inlet_in;