int32 in
bool32 default value channel 1
bool32 default value channel 2
bool32 default value channel 3
bool32 default value channel 4
int32 chain out (in-16)
bool32.pulse output channel 1
bool32.pulse output channel 2
bool32.pulse output channel 3
bool32.pulse output channel 4
bin16 p1
bin16 p2
bin16 p3
bin16 p4
int32.bar16 in
int in_prev;
in_prev = 0;
if ((inlet_in >= 0) && (inlet_in < 16)) {
outlet_o1 = (inlet_in != in_prev) && (param_p1 & (1 << inlet_in));
outlet_o2 = (inlet_in != in_prev) && (param_p2 & (1 << inlet_in));
outlet_o3 = (inlet_in != in_prev) && (param_p3 & (1 << inlet_in));
outlet_o4 = (inlet_in != in_prev) && (param_p4 & (1 << inlet_in));
} else {
outlet_o1 = inlet_def1;
outlet_o2 = inlet_def2;
outlet_o3 = inlet_def3;
outlet_o4 = inlet_def4;
}
outlet_chain = inlet_in - 16;
disp_in = inlet_in;
in_prev = inlet_in;