boost

boost up to 16 times (saturated) (adds boosted signal to clean input signal and averages)
Author: Remco van der Most
License: BSD
Github: sss/dist/boost.axo

Inlets

frac32buffer input

frac32 amp

Outlets

frac32buffer output

Parameters

frac32.u.map.gain16 amp

Declaration
int32_t step;
int32_t prev;
Control Rate
int32_t v = __USAT((param_amp >> 3) + (inlet_amp << 3), 30);
step = (v - prev) >> 4;
int32_t i = prev;
prev = v;
Audio Rate
int32_t out = __SSAT(___SMMUL(i << 1, __SSAT(inlet_in, 28) << 4) << 1, 28);

int32_t ts = __SSAT(out, 28);
int32_t tsq31 = ts << 3;
int32_t tsq31p3 = ___SMMUL(tsq31, ___SMMUL(tsq31, tsq31));
outlet_out = __SSAT(inlet_in + (ts + (ts >> 1) - (tsq31p3) >> 1), 28) >> 1;
i += step << 1;

Privacy

© 2024 Zrna Research