frac32buffer filter input
frac32 pitch
frac32 filter resonance
frac32 center
frac32 width
frac32buffer filter output
frac32.u.map.filterq resoHP
frac32.u.map.filterq resoLP
frac32.u.map.filterq resoC
frac32.u.map.gain peak
frac32.s.map.pitch cutoff
frac32.s.map center
frac32.u.map width
biquad_state bs[3];
biquad_coefficients bc[3];
int32_t tmp1[BUFSIZE];
int32_t tmp2[BUFSIZE];
int32_t tmp3[BUFSIZE];
int i;
for (i = 0; i < 3; i++) {
biquad_clearstate(&bs[i]);
}
int32_t freq;
int32_t width = __SSAT(inlet_width + param_width, 28);
MTOF(param_cutoff + inlet_pitch +
___SMMUL(param_center + inlet_center << 2, width << 3),
freq);
biquad_bp_coefs(&bc[0], freq,
INT_MAX - (__USAT(inlet_reso + param_resoC, 27) << 4));
biquad_dsp(&bs[0], &bc[0], inlet_in, tmp1);
for (i = 0; i < BUFSIZE; i++) {
tmp1[i] = __SSAT(inlet_in[i], 28) +
(___SMMUL(__SSAT(tmp1[i], 28), param_peak) << 2);
}
MTOF(param_cutoff - width + inlet_pitch, freq);
biquad_hp_coefs(&bc[1], freq,
INT_MAX - (__USAT(inlet_reso + param_resoHP, 27) << 4));
biquad_dsp(&bs[1], &bc[1], tmp1, tmp2);
MTOF(param_cutoff + width + inlet_pitch, freq);
biquad_lp_coefs(&bc[2], freq,
INT_MAX - (__USAT(inlet_reso + param_resoLP, 27) << 4));
biquad_dsp(&bs[2], &bc[2], tmp2, outlet_out);