slew

symetric slew rate limiter (not bandwidth limited)
Author: Johannes Taelman
License: BSD
Github: dist/slew.axo

IO Variants: 2


Variant: 1

Inlets

frac32 input

Outlets

frac32 output

Parameters

frac32.u.map slew

Declaration
int32_t acc;
Init
acc = 0;
Control Rate
if (inlet_in > acc) {
  if ((inlet_in - acc) > param_slew)
    acc += param_slew;
  else
    acc = inlet_in;
} else {
  if ((acc - inlet_in) > param_slew)
    acc -= param_slew;
  else
    acc = inlet_in;
}
acc = __SSAT(acc, 28);
outlet_out = acc;

Variant: 2

Inlets

frac32buffer input

Outlets

frac32buffer output

Parameters

frac32.u.map slew

Declaration
int32_t acc;
Init
acc = 0;
Audio Rate
if (inlet_in > acc) {
  if ((inlet_in - acc) > param_slew)
    acc += param_slew;
  else
    acc = inlet_in;
} else {
  if ((acc - inlet_in) > param_slew)
    acc -= param_slew;
  else
    acc = inlet_in;
}
acc = __SSAT(acc, 28);
outlet_out = acc;

Privacy

© 2024 Zrna Research