frac32buffer filter input
frac32 pitch
frac32 filter resonance
frac32buffer filter output
frac32.u.map freq
frac32.s.map.ratio g2
combo order
class APC {
public:
int32_t v[attr_order];
void init(void) {
for (int i = 0; i < attr_order; i++)
v[i] = 0;
}
int32_t aProc(int32_t x, int32_t g) {
int32_t y = x;
for (int p = 0; p < attr_order; p++) {
int32_t u = ___SMMLA(g, v[p] << 1, y);
y = ___SMMLS(g, u << 1, v[p]);
v[p] = u;
}
return y;
}
};
APC apc;
int32_t v;
apc.init();
v = 0;
int32_t g = 0x7FFFFFFF - (__USAT((param_freq + inlet_freq), 27) << 4);
int32_t g2 = __USAT((param_g2 + inlet_g2), 27) << 4; // q31
// nested all pass chain
int32_t u = ___SMMLA(g2, v << 1, inlet_in);
outlet_out = ___SMMLS(g2, u << 1, v);
v = apc.aProc(u >> 8, g) << 8;