frac32buffer input
frac32 cutoff frequency
frac32buffer output
bool32.tgl on
frac32.u.map freq
int32.hradio 6,12,18,24db
int32_t valLP1;
int32_t valLP2;
int32_t valLP3;
int32_t valLP4;
valLP1 = 0;
valLP2 = 0;
valLP3 = 0;
valLP4 = 0;
// LP //
int32_t fLP1;
MTOF(param_freq + inlet_freq, fLP1);
// LP //
int32_t fLP2;
MTOF(param_freq + inlet_freq, fLP2);
// LP //
int32_t fLP3;
MTOF(param_freq + inlet_freq, fLP3);
// LP //
int32_t fLP4;
MTOF(param_freq + inlet_freq, fLP4);
// LP //
valLP1 = ___SMMLA((inlet_in - valLP1) << 1, fLP1, valLP1);
valLP2 = ___SMMLA((valLP1 - valLP2) << 1, fLP2, valLP2);
valLP3 = ___SMMLA((valLP2 - valLP3) << 1, fLP3, valLP3);
valLP4 = ___SMMLA((valLP3 - valLP4) << 1, fLP4, valLP4);
int32_t SWITCHOUT;
switch (param_db > 0 ? param_db : 0) {
case 0:
SWITCHOUT = valLP1;
break;
case 1:
SWITCHOUT = valLP2;
break;
case 2:
SWITCHOUT = valLP3;
break;
case 3:
SWITCHOUT = valLP4;
break;
}
outlet_out = (param_on) ? SWITCHOUT : inlet_in;