Chainable Demux

Demultiplexer. Chainable for extension. Just connect outlet send to inlet s in the next object.
Author: Gavin
License: BSD
Github: gav/demux/Chainable Demux.axo

Inlets

frac32 i

frac32 d0

frac32 d1

frac32 d2

frac32 d3

int32.positive select

Outlets

frac32 o0

frac32 o1

frac32 o2

frac32 o3

int32 send

Control Rate
outlet_send = inlet_s - 4;
switch (inlet_s > 0 ? inlet_s : 0) {
case 0:
  outlet_o0 = inlet_i;
  outlet_o1 = inlet_d1;
  outlet_o2 = inlet_d2;
  outlet_o3 = inlet_d3;
  break;
case 1:
  outlet_o0 = inlet_d0;
  outlet_o1 = inlet_i;
  outlet_o2 = inlet_d2;
  outlet_o3 = inlet_d3;
  break;
case 2:
  outlet_o0 = inlet_d0;
  outlet_o1 = inlet_d1;
  outlet_o2 = inlet_i;
  outlet_o3 = inlet_d3;
  break;
case 3:
  outlet_o0 = inlet_d0;
  outlet_o1 = inlet_d1;
  outlet_o2 = inlet_d2;
  outlet_o3 = inlet_i;
  break;
default:
  outlet_o0 = inlet_d0;
  outlet_o1 = inlet_d1;
  outlet_o2 = inlet_d2;
  outlet_o3 = inlet_d3;
}

Privacy

© 2024 Zrna Research