frac32buffer input
frac32 cutoff frequency
frac32buffer output
frac32.u.map freq
int32.hradio 6,12,18,24db
bool32.tgl on
int32_t valHP1;
int32_t valHP2;
int32_t valHP3;
int32_t valHP4;
valHP1 = 0;
valHP2 = 0;
valHP3 = 0;
valHP4 = 0;
// HP //
int32_t fHP1;
MTOF(param_freq + inlet_freq, fHP1);
// HP //
int32_t fHP2;
MTOF(param_freq + inlet_freq, fHP2);
// HP //
int32_t fHP3;
MTOF(param_freq + inlet_freq, fHP3);
// HP //
int32_t fHP4;
MTOF(param_freq + inlet_freq, fHP4);
// HP //
valHP1 = ___SMMLA((inlet_in - valHP1) << 1, fHP1, valHP1);
valHP2 = ___SMMLA((valHP1 - valHP2) << 1, fHP2, valHP2);
valHP3 = ___SMMLA((valHP2 - valHP3) << 1, fHP3, valHP3);
valHP4 = ___SMMLA((valHP3 - valHP4) << 1, fHP4, valHP4);
int32_t SWITCHOUT;
switch (param_db > 0 ? param_db : 0) {
case 0:
SWITCHOUT = valHP1;
break;
case 1:
SWITCHOUT = valHP2;
break; // LP is routed thorugh the HP //
case 2:
SWITCHOUT = valHP3;
break;
case 3:
SWITCHOUT = valHP4;
break;
}
outlet_out = (param_on) ? (inlet_in - SWITCHOUT) : inlet_in;