dejump

1st order lowpass filter and high pass filter.
Author: Smashed Transistors
License: LGPL
Github: tiar/XT/dejump.axo

Inlets

frac32buffer input

bool32.rising trig

Outlets

frac32buffer output

Declaration
int32_t y;
bool atrig;
Init
y = 0;
atrig = false;
Control Rate
if (inlet_trig && !atrig) {
  int32_t a = (1 << 27) / 16; // 1/16
  for (int i = 0; i < BUFSIZE; i++) {
    outlet_out[i] = y = ___SMMLA(a, inlet_in[i] - y, y >> 5) << 5;
    a = ___SMMUL(a, 1276901416) << 2; // q30 root16 16 1,1892
  }
} else {
  for (int i = 0; i < BUFSIZE; i++) {
    outlet_out[i] = y = inlet_in[i];
  }
}
atrig = inlet_trig;

Privacy

© 2024 Zrna Research