wrp b

wrap to 0..64 range
Author: Robert Schirmer
License: BSD
Github: rbrt/math/wrp b.axo

Inlets

frac32 a

Outlets

frac32.positive quant(a)

Declaration
int32_t v;
int32_t max = 1 << 27;
int32_t min = (-max);
Control Rate
v = inlet_a;
if (inlet_a > max)
  v = min + (inlet_a - max);
if (inlet_a < min)
  v = max - (min - inlet_a);
outlet_b = v;

Privacy

© 2024 Zrna Research