frac32 mod
frac32buffer in
frac32buffer out
frac32.s.map mod
int32_t O1;
SINE2TINTERP(1 << 30, O1)
int32_t mod1a = param_mod + inlet_mod;
int32_t mod1b = mod1a < 0 ? -mod1a : 0;
mod1a = mod1a > 0 ? mod1a : 0;
int32_t in = inlet_in;
in += ___SMMUL(mod1b << 4, in << 4);
int32_t clip = in > mod1a ? mod1a : in;
clip = clip < -mod1a ? -mod1a : clip;
int32_t over = in - clip;
if (over > 0) {
SINE2TINTERP((-over << 4) + (1 << 30), over)
over = over >> 5;
over -= O1 >> 5;
} else {
SINE2TINTERP((-over << 4) - (1 << 30), over)
over = over >> 5;
over += O1 >> 5;
}
outlet_out = clip + over;