knee s

Continuous slope with two angular coefficients (knee shape). Knob determines the height of the knee. Mod input allows to edit the knee live. S-rate
Author: Sputnki
License: BSD
Github: sptnk/math/knee s.axo

Inlets

frac32buffer.positive in

frac32.bipolar mod

Outlets

frac32buffer.positive out

Parameters

frac32.u.map.gain amp

Declaration
uint32_t param;
Control Rate
param = param_amp + (inlet_mod << 4);
Audio Rate
if (inlet_in < 1 << 26)

  outlet_out = ___SMMUL(param, inlet_in) << 2;

else

{

  int32_t yy = ___SMMUL(inlet_in - (1 << 26), (1 << 31) - param) << 2;
  yy = yy >> 1;
  yy += ((param) >> 5);

  if (yy < 0)

    yy = -yy;

  outlet_out = yy << 1;
}

Privacy

© 2024 Zrna Research