smux8_1

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

Inlets

frac32.positive s

frac32buffer input 0

frac32buffer input 1

frac32buffer input 2

frac32buffer input 3

frac32buffer i4

frac32buffer i5

frac32buffer i6

frac32buffer i7

Outlets

frac32buffer output

Declaration
void proc(int32_t sel, const int32_t *i0, const int32_t *i1, const int32_t *i2,
          const int32_t *i3, const int32_t *i4, const int32_t *i5,
          const int32_t *i6, const int32_t *i7, int32_t *out) {
  const int32_t *s0, *s1;
  switch (sel >> (27 - 3)) {
  case 0:
    s0 = i0;
    s1 = i1;
    break;
  case 1:
    s0 = i1;
    s1 = i2;
    break;
  case 2:
    s0 = i2;
    s1 = i3;
    break;
  case 3:
    s0 = i3;
    s1 = i4;
    break;
  case 4:
    s0 = i4;
    s1 = i5;
    break;
  case 5:
    s0 = i5;
    s1 = i6;
    break;
  case 6:
    s0 = i6;
    s1 = i7;
    break;
  case 7:
    s0 = i7;
    s1 = i0;
    break;
  }
  int32_t a = (sel << 3) & 0x07FFFFFF;
  for (int i = 0; i < BUFSIZE; i++) {
    int32_t _s0 = s0[i];
    out[i] = ___SMMLA(a, s1[i] - _s0, _s0 >> 5) << 5;
  }
}
Control Rate
proc((inlet_s)&0x07FFFFFF, inlet_i0, inlet_i1, inlet_i2, inlet_i3, inlet_i4,
     inlet_i5, inlet_i6, inlet_i7, outlet_o);

Privacy

© 2024 Zrna Research