sel 4l 16 8t

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

Inlets

int32 in

int32 default value track 1

int32 default value track 2

int32 default value track 3

int32 default value track 4

int32 default value track 5

int32 default value track 6

int32 default value track 7

int32 default value track 8

Outlets

int32 chain out (in-16)

int32 output track 1

int32 output track 2

int32 output track 3

int32 output track 4

int32 output track 5

int32 output track 6

int32 output track 7

int32 output track 8

Parameters

int2x16 t1

int2x16 t2

int2x16 t3

int2x16 t4

int2x16 t5

int2x16 t6

int2x16 t7

int2x16 t8

Control Rate
if ((inlet_in >= 0) && (inlet_in < 16)) {
  outlet_o1 = (param_t1 >> (inlet_in * 2)) & 3;
  outlet_o2 = (param_t2 >> (inlet_in * 2)) & 3;
  outlet_o3 = (param_t3 >> (inlet_in * 2)) & 3;
  outlet_o4 = (param_t4 >> (inlet_in * 2)) & 3;
  outlet_o5 = (param_t5 >> (inlet_in * 2)) & 3;
  outlet_o6 = (param_t6 >> (inlet_in * 2)) & 3;
  outlet_o7 = (param_t7 >> (inlet_in * 2)) & 3;
  outlet_o8 = (param_t8 >> (inlet_in * 2)) & 3;
} else {
  outlet_o1 = inlet_def1;
  outlet_o2 = inlet_def2;
  outlet_o3 = inlet_def3;
  outlet_o4 = inlet_def4;
  outlet_o5 = inlet_def5;
  outlet_o6 = inlet_def6;
  outlet_o7 = inlet_def7;
  outlet_o8 = inlet_def8;
}
outlet_chain = inlet_in - 16;

Privacy

© 2024 Zrna Research