fdbkcomb

feedback comb filter, y(n) = b*x(n)+a*y(n-D)
Author: Johannes Taelman
License: BSD
Github: filter/fdbkcomb.axo

Inlets

frac32buffer in

Outlets

frac32buffer out

Parameters

frac32.s.map.ratio a

frac32.s.map.ratio b

Attributes

spinner delay

Declaration
int16_t d[attr_delay];
int dpos;
Init
int i;
for (i = 0; i < attr_delay; i++)
  d[i] = 0;
dpos = 0;
Control Rate
int32_t a2 = param_a << 4;
int32_t b2 = param_b << 4;
Audio Rate
int32_t dout = d[dpos] << 16;
int32_t din = ___SMMUL(b2, inlet_in);
din = ___SMMLA(a2, dout, din);
d[dpos++] = din >> 15;
outlet_out = din;
if (dpos == attr_delay)
  dpos = 0;

Privacy

© 2024 Zrna Research