bool32 gateext
bool32 s
int32 in
int32 o
int32 g
int32 chain out (in-16)
int32 output
int32 gate
bool32 g
bool32 slide
int2x16 o
int2x16 g
bin16 s
int32.bar16 in
int ntrig;
int latch;
int gate;
int slide;
ntrig = 0;
latch = 0;
gate = 0;
slide = 0;
outlet_chain = inlet_in - 16;
disp_in = inlet_in;
if ((inlet_in >= 0) && (inlet_in < 16))
outlet_oct = ((param_o >> (inlet_in * 2)) & 3) * 12;
else
outlet_oct = inlet_o;
if ((inlet_in >= 0) && (inlet_in < 16))
gate = ((param_g >> (inlet_in * 2)) & 3) * 21;
else
gate = inlet_g;
if ((inlet_in >= 0) && (inlet_in < 16))
slide = param_s & (1 << inlet_in);
else
slide = inlet_s;
outlet_chain = inlet_in - 16;
// latch slide
if ((slide > 0) && !ntrig) {
latch = gate;
ntrig = 1;
}
if (!(slide > 0))
ntrig = 0;
outlet_gate = (slide) ? latch && gate : gate;
// when slide is on keep accent and sustaian gate when accent on
outlet_g = slide ? slide && gate : gate && inlet_gateext;
outlet_slide = slide;