frac32buffer in
frac32buffer out
frac32.s.map.pitch filter
bool32.tgl postfilter
bool32.tgl highpass
frac32.u.map feed
int32_t f;
int32_t feed;
int32_t satout = 0;
int32_t filterout = 0;
bool postfilter = 0;
bool highpass = 0;
MTOF(param_filter, f);
postfilter = param_postfilter;
highpass = param_highpass;
int32_t ts = __SSAT(___SMMLA(filterout, param_feed << 4, inlet_in) << 1, 27);
int32_t tsq31 = ts << 3;
int32_t tsq31p3 = ___SMMUL(tsq31, ___SMMUL(tsq31, tsq31));
satout = ts + (ts >> 1) - (tsq31p3);
filterout = ___SMMLA(__SSAT((satout - filterout) << 1, 30), f, filterout);
if (highpass)
filterout = satout - filterout;
if (postfilter)
outlet_out = filterout;
else
outlet_out = satout;