frac32buffer input
frac32buffer in2
frac32 cutoff frequency
frac32 BW
frac32 res
frac32buffer output
frac32buffer HP
frac32buffer BP
frac32buffer BR
frac32.s.map BW
frac32.u.map resM
frac32.u.map resBP
frac32.u.map resHP
frac32.u.map resLP
frac32.u.map resBR
int32 OS
frac32.s.map.pitch freq
int32_t LP;
int32_t HP;
int32_t BP;
int32_t BR;
int32_t resH;
int32_t resL;
int i;
int32_t pv1;
int32_t pv2;
LP = 0;
int32_t RES = __USAT(param_resM + inlet_res, 27) << 2;
int32_t resBP = ___SMMUL(param_resBP << 3, RES);
int32_t resHP = ___SMMUL(param_resHP << 3, RES);
int32_t resLP = ___SMMUL(param_resLP << 3, RES);
int32_t resBR = ___SMMUL(param_resBR << 3, RES);
int32_t f1;
int32_t BW = __SSAT(inlet_BW + param_BW, 28);
BW = BW > 0 ? BW : (BW >> 3) * 3;
int32_t width1;
int32_t width2;
if (BW > 0) {
width1 = __SSAT(param_freq + inlet_freq, 28) - BW;
width2 = width1 + BW;
} else {
width2 = __SSAT(param_freq + inlet_freq, 28) + BW;
width1 = width2 - BW;
}
MTOF(width1, f1);
int64_t f2;
MTOF(width2, f2);
f1 = f1 / param_OS;
f2 = f2 / param_OS;
int32_t s1 = (f1 - pv1) / param_OS >> 4;
int32_t s2 = (f2 - pv2) / param_OS >> 4;
int32_t p1 = pv1;
int32_t p2 = pv2;
pv1 = f1;
pv2 = f2;
int32_t in2 = __SSAT(inlet_in2, 27) >> 1;
int32_t in1 = __SSAT(inlet_in1, 27) - in2;
for (i = 0; i < param_OS; i++) {
p1 += s1;
p2 += s2;
BP = __SSAT(
BP +
__SSAT(___SMMUL(BP, ___SMMUL(resBP << 4, (f1 >> 1) + (f2 >> 1))), 30),
31); // 2
BP = ___SMMLA((in1 - LP - BP) << 1, f2, BP); // 1
BR = __SSAT(
in1 - BP -
(___SMMUL(BP, ___SMMUL(+resBR << 4, (f1 >> 1) + (f2 >> 1))) << 5),
31); // 3
// BR=__SSAT(in1-BP,31);////////////
HP = __SSAT(BR - LP - BP -
(___SMMUL(BP << 3, ___SMMUL(resHP << 4, f2) << 1) << 4),
31); // 4
LP = ___SMMLA(
(BR - HP + (___SMMUL(BP << 3, ___SMMUL(resLP << 4, f1) << 1) << 4) - LP)
<< 1,
f1, LP); // 5
LP = __SSAT(LP, 31); // 6
}
outlet_LP = __SSAT(LP + in2, 28);
outlet_HP = __SSAT(HP + in2, 28);
outlet_BP = __SSAT(BP + in2, 28);
outlet_BR = __SSAT(BR + in2, 28);