peaker

uses an exponential curve (exp) to offset(height) a particular voltage (position). the strength controls the amount of the original signal (when zero, it stays at the "height" voltage) has an internal hp filter to remove dc-offset
Author: Remco van der Most
License: BSD
Github: sss/dist/peaker.axo

Inlets

frac32buffer in

Outlets

frac32buffer out

Parameters

frac32.s.map position

frac32.s.map height

frac32.u.map exp

frac32.u.map strength

Declaration
int32_t out;
int32_t hp;
Audio Rate
int32_t posited = (inlet_in - param_position);
posited = posited > 0 ? posited : -posited;
posited = __USAT(posited, 27);
posited = __USAT(___SMMUL(param_strength << 3, posited << 3), 27);
posited = (1 << 27) - posited;
int32_t positad =
    ___SMMUL(param_exp << 3, posited << 2) + (1 << 27) - param_exp;
posited = ___SMMUL(posited << 3, positad << 2);
posited = ___SMMUL(posited << 3, positad << 2);
out = ___SMMUL(inlet_in << 3, ((1 << 27) - posited) << 2) +
      ___SMMUL(posited << 2, param_height << 3);
hp = hp + ((out - hp) >> 10);
outlet_out = out - hp;

Privacy

© 2024 Zrna Research