frac32buffer a
frac32 gain input
frac32 expVCA
frac32 expLPG
frac32 cutoff
frac32buffer output
frac32.s.map expVCA
frac32.s.map expLPG
frac32.u.map cutoff
int32_t step1;
int32_t step2;
int32_t step3;
int32_t level;
int32_t LP;
int32_t EXPO;
int inv;
int32_t expo(int32_t value, int32_t expa) {
if (expa < 0) {
value = (1 << 27) - value;
expa = -expa;
inv = 1;
} else {
inv = 0;
}
int32_t comp = (1 << 27) - expa;
EXPO = ___SMMUL(value << 3, (comp + ___SMMUL(expa << 3, value << 2)) << 2);
EXPO = ___SMMUL(EXPO << 3, (comp + ___SMMUL(expa << 3, EXPO << 2)) << 2);
EXPO = ___SMMUL(EXPO << 3, (comp + ___SMMUL(expa << 3, EXPO << 2)) << 2);
EXPO = ___SMMUL(EXPO << 3, (comp + ___SMMUL(expa << 3, EXPO << 2)) << 2);
EXPO = ___SMMUL(EXPO << 3, (comp + ___SMMUL(expa << 3, EXPO << 2)) << 2);
if (inv == 1) {
EXPO = (1 << 27) - EXPO;
}
}
expo(inlet_env, -__SSAT(param_expVCA + inlet_expVCA, 27));
int32_t varA = EXPO;
level = __USAT(inlet_cutoff + param_cutoff, 27);
expo(inlet_env, -__SSAT(param_expLPG + inlet_expLPG, 27));
int32_t varB = ___SMMUL(EXPO << 3, level << 3) - (1 << 27);
step1 = step1 + ((varA - step1) >> 6);
step2 = step2 + ((varB - step2) >> 6);
int32_t freq;
MTOF((step2), freq)
int32_t o = ___SMMUL(inlet_a << 3, step1 << 3);
LP = __SMMLA((o - LP) << 1, freq, LP);
outlet_o = LP;