frac32buffer in
frac32.positive fb
frac32.positive damp
frac32buffer out
spinner delay
int32_t d[attr_delay];
int dpos;
int32_t filter;
int i;
for (i = 0; i < attr_delay; i++)
d[i] = 0;
dpos = 0;
filter = 0;
// int32_t a2 = param_a<<4;
// int32_t b2 = param_b<<4;
int32_t fb = inlet_fb << 4;
int32_t damp1 = inlet_damp << 4;
int32_t damp2 = 0x7ffffff0 - damp1;
int32_t dout = d[dpos];
// int32_t dout = 0x7ffffff;
filter = ___SMMUL(damp2, dout);
filter = ___SMMLA(damp1, filter << 1, filter);
// outlet_diag = filter;
// int32_t din = ___SMMUL(b2,inlet_in);
// din = ___SMMLA(a2,dout,din);
// d[dpos++]=din>>15;
// int32_t t=___SMMLA(fb,filter<<1,inlet_in);
d[dpos++] = ___SMMLA(fb, filter << 1, inlet_in);
outlet_out = dout;
if (dpos == attr_delay)
dpos = 0;