sel b 16 8t pulseD

select one out of 16 booleans, chainable, 8 tracks, pulse output
Author: Johannes Taelman
License: BSD
Github: jaffa/sel/sel b 16 8t pulseD.axo

Inlets

bool32 default value channel 1

bool32 default value channel 2

bool32 default value channel 3

bool32 default value channel 4

bool32 default value channel 5

bool32 default value channel 6

bool32 default value channel 7

bool32 default value channel 8

int32 in

Outlets

int32 chain out (in-16)

bool32 output channel 1

bool32 output channel 2

bool32 output channel 3

bool32 output channel 4

bool32 output channel 5

bool32 output channel 6

bool32 output channel 7

bool32 output channel 8

Parameters

bin16 p1

bin16 p2

bin16 p3

bin16 p4

bin16 p5

bin16 p6

bin16 p7

bin16 p8

Displays

int32.bar16 in

Declaration
int in_prev;
Init
in_prev = 0;
Control Rate
if ((inlet_in >= 0) && (inlet_in < 16)) {
  outlet_o1 = (in_prev != inlet_in) && (param_p1 & (1 << inlet_in));
  outlet_o2 = (in_prev != inlet_in) && (param_p2 & (1 << inlet_in));
  outlet_o3 = (in_prev != inlet_in) && (param_p3 & (1 << inlet_in));
  outlet_o4 = (in_prev != inlet_in) && (param_p4 & (1 << inlet_in));
  outlet_o5 = (in_prev != inlet_in) && (param_p5 & (1 << inlet_in));
  outlet_o6 = (in_prev != inlet_in) && (param_p6 & (1 << inlet_in));
  outlet_o7 = (in_prev != inlet_in) && (param_p7 & (1 << inlet_in));
  outlet_o8 = (in_prev != inlet_in) && (param_p8 & (1 << inlet_in));
} 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;
in_prev = inlet_in;
disp_in = inlet_in;

Privacy

© 2024 Zrna Research