mux 4

input multiplexer. Output is i1 when s < 1, i[i] when....
Author: Johannes Taelman
License: BSD
Github: mux/mux 4.axo

IO Variants: 5


Variant: 1

Inlets

int32.positive select

charptr32 input 0

charptr32 input 1

charptr32 input 2

charptr32 input 3

Outlets

charptr32 output

Control Rate
switch (inlet_s > 0 ? inlet_s : 0) {
case 0:
  outlet_o = (char *)inlet_i0;
  break;
case 1:
  outlet_o = (char *)inlet_i1;
  break;
case 2:
  outlet_o = (char *)inlet_i2;
  break;
case 3:
  outlet_o = (char *)inlet_i3;
  break;
default:
  outlet_o = (char *)inlet_i3;
  break;
}

Variant: 2

Inlets

frac32 input 0

frac32 input 1

frac32 input 2

frac32 input 3

int32.positive select

Outlets

frac32 output

Control Rate
switch (inlet_s > 0 ? inlet_s : 0) {
case 0:
  outlet_o = inlet_i0;
  break;
case 1:
  outlet_o = inlet_i1;
  break;
case 2:
  outlet_o = inlet_i2;
  break;
case 3:
  outlet_o = inlet_i3;
  break;
default:
  outlet_o = inlet_i3;
  break;
}

Variant: 3

Inlets

bool32 input 0

bool32 input 1

bool32 input 2

bool32 input 3

int32.positive select

Outlets

bool32 output

Control Rate
switch (inlet_s > 0 ? inlet_s : 0) {
case 0:
  outlet_o = inlet_i0;
  break;
case 1:
  outlet_o = inlet_i1;
  break;
case 2:
  outlet_o = inlet_i2;
  break;
case 3:
  outlet_o = inlet_i3;
  break;
default:
  outlet_o = inlet_i3;
  break;
}

Variant: 4

Inlets

int32.positive select

int32 input 0

int32 input 1

int32 input 2

int32 input 3

Outlets

int32 output

Control Rate
switch (inlet_s > 0 ? inlet_s : 0) {
case 0:
  outlet_o = inlet_i0;
  break;
case 1:
  outlet_o = inlet_i1;
  break;
case 2:
  outlet_o = inlet_i2;
  break;
case 3:
  outlet_o = inlet_i3;
  break;
default:
  outlet_o = inlet_i3;
  break;
}

Variant: 5

Inlets

frac32buffer input 0

frac32buffer input 1

frac32buffer input 2

frac32buffer input 3

int32.positive select

Outlets

frac32buffer output

Audio Rate
switch (inlet_s > 0 ? inlet_s : 0) {
case 0:
  outlet_o = inlet_i0;
  break;
case 1:
  outlet_o = inlet_i1;
  break;
case 2:
  outlet_o = inlet_i2;
  break;
case 3:
  outlet_o = inlet_i3;
  break;
default:
  outlet_o = inlet_i3;
  break;
}

Privacy

© 2024 Zrna Research