sel 4l 16 8t s

select one out of 16 4-levels, 8 tracks, row selector, chainable
Author: Johannes Taelman
License: BSD
Github: sel/sel 4l 16 8t s.axo

Inlets

int32 in

int32 row selector

int32 default value

Outlets

int32 chain out (in-16)

int32 chain out (row-8)

int32 output

Parameters

int2x16 t0

int2x16 t1

int2x16 t2

int2x16 t3

int2x16 t4

int2x16 t5

int2x16 t6

int2x16 t7

Control Rate
if ((inlet_in >= 0) && (inlet_in < 16)) {
  switch (inlet_row) {
  case 0:
    outlet_o = (param_t0 >> (inlet_in * 2)) & 3;
    break;
  case 1:
    outlet_o = (param_t1 >> (inlet_in * 2)) & 3;
    break;
  case 2:
    outlet_o = (param_t2 >> (inlet_in * 2)) & 3;
    break;
  case 3:
    outlet_o = (param_t3 >> (inlet_in * 2)) & 3;
    break;
  case 4:
    outlet_o = (param_t4 >> (inlet_in * 2)) & 3;
    break;
  case 5:
    outlet_o = (param_t5 >> (inlet_in * 2)) & 3;
    break;
  case 6:
    outlet_o = (param_t6 >> (inlet_in * 2)) & 3;
    break;
  case 7:
    outlet_o = (param_t7 >> (inlet_in * 2)) & 3;
    break;
  default:
    outlet_o = inlet_def;
  }
} else {
  outlet_o = inlet_def;
}
outlet_chain = inlet_in - 16;
outlet_chainrow = inlet_row - 8;

Privacy

© 2024 Zrna Research