None
frac32.bipolar out
frac32.u.map rate
frac32.u.map pos
frac32.u.map neg
int32_t vC = 0;
bool sRS = true;
// -2 +2 3.25/2 q27 -1 +1 q27
// f ~ 1/rc = param_rate/(3000/(20*32)); // => param_rate/4.68;
if (sRS) {
vC = ___SMMLA(___SMMUL(param_rate, param_rate) << 4,
2 * ((13 << 24) - param_pos) - vC, vC);
if (vC > (1 << 27)) {
sRS = false;
vC = (1 << 28) - vC;
}
} else {
vC = ___SMMLA(___SMMUL(param_rate, param_rate) << 4,
2 * (param_neg - (13 << 24)) - vC, vC);
// RS change vC subsample evolution ("mirror" against 1
// or -1)
if (vC < -(1 << 27)) {
sRS = true;
vC = -(1 << 28) - vC;
}
}
outlet_out = vC;