Box

Author: Smashed Transistors
License: LGPL
Github: tiar/filter/Box.axo

Inlets

frac32buffer filter input

Outlets

frac32buffer Low Pass

frac32buffer High Pass

Attributes

combo fc

Declaration
static const int NB = 2 << attr_fc;
int32_t d[NB];
int32_t acc;
uint8_t c;
Init
acc = 0;
for (int i = 0; i < NB; i++)
  d[i] = 0;
Audio Rate
c++;
c &= NB - 1;
acc -= d[c];
d[c] = inlet_in >> (1 + attr_fc);
acc += d[c];
outlet_LP = acc;
outlet_HP = (d[(c + (NB / 2)) & (NB - 1)] << (1 + attr_fc)) - acc;

Privacy

© 2024 Zrna Research