frac32buffer input
frac32 pitch
frac32 env
frac32 LFO
frac32buffer output
frac32.u.map gain
frac32.s.map.pitch freq
frac32.s.map envCut
frac32.s.map lfoCut
frac32.s.map res
frac32.s.map envRes
frac32.s.map lfoRes
frac32.s.map offset
frac32.s.map width
int32_t val1;
int32_t val2;
int32_t val3;
int32_t val4;
val1 = 0;
val2 = 0;
val3 = 0;
int32_t f;
int32_t g;
int32_t h;
int32_t Freq;
Freq = __SSAT(param_freq + inlet_pitch +
___SMMUL(param_envCut << 3, inlet_env << 3) +
___SMMUL(inlet_LFO << 3, param_lfoCut << 2),
28);
MTOF(Freq, f);
MTOF(Freq + param_offset - (param_width >> 2), g);
MTOF(Freq + param_offset + (param_width >> 2), h);
// int32_t res=param_res>0?param_res>>1:param_res;
int32_t res = param_res + ___SMMUL(param_envRes << 3, inlet_env << 2) +
___SMMUL(param_lfoRes << 3, inlet_LFO << 2);
val2 = ___SMMLA((val4 - val2) << 1, g, val2);
val3 = ___SMMLA((val4 - val2 - val3) << 1, h, val3);
int32_t sat = __SSAT(val3, 27);
int32_t gain = inlet_in + ___SMMUL(res << 3, sat << 3);
gain += +___SMMUL(gain << 4, param_gain << 4);
gain = __SSAT(gain, 27);
val1 = ___SMMLA((gain - val1) << 1, f, val1);
val4 = ___SMMLA((val1 - val4) << 1, f, val4);
outlet_out = val4;