DCAsm

De clicked and smooth "Digital" Controlled Amplifier: multiplies "in" and "gain" inputs. The gain input is shortly interpolated, DCA is "anti "clicked by updating gain at zero crossings of the input. The update is smoothed by two fast filters. This allows very sharp attack transients without additional clicks.
Author: Smashed Transistors
License: LGPL
Github: tiar/gain/DCAsm.axo

Inlets

frac32buffer audio input

frac32 gain input

Outlets

frac32buffer output

Declaration
int32_t _in = 0, g = 0, fg = 0, ffg = 0;
Audio Rate
if ((inlet_in > 0) != (_in > 0)) {
  g = inlet_gain;
}
fg = (g + fg) >> 1;
ffg = (fg + ffg) >> 1;
outlet_out = ___SMMUL(_in, ffg) << 5;
_in = inlet_in;

Privacy

© 2024 Zrna Research