smux4_1k

Smooth multiplexer. Works like multiple cross fades.
Author: Smashed Transistors
License: LGPL
Github: tiar/mux/smux4_1k.axo

Inlets

frac32 input 0

frac32 input 1

frac32 input 2

frac32 input 3

frac32.positive s

Outlets

frac32 output

Control Rate
int32_t sel = inlet_s & 0x07FFFFFF;
int32_t a = (sel << 2) & 0x07FFFFFF;
switch (sel >> (27 - 2)) {
case 0:
  outlet_o = ___SMMLA(a, inlet_i1 - inlet_i0, inlet_i0 >> 5) << 5;
  break;
case 1:
  outlet_o = ___SMMLA(a, inlet_i2 - inlet_i1, inlet_i1 >> 5) << 5;
  break;
case 2:
  outlet_o = ___SMMLA(a, inlet_i3 - inlet_i2, inlet_i2 >> 5) << 5;
  break;
case 3:
  outlet_o = ___SMMLA(a, inlet_i0 - inlet_i3, inlet_i3 >> 5) << 5;
  break;
}

Privacy

© 2024 Zrna Research