bool32.risingfalling recording starts as soon as there's a trigger at inlet wait
bool32.rising toggle wait / rec
bool32.rising trigger rec
bool32.pulse go
bool32 rec
bool32 wait state
bool wtrig;
bool wait;
bool rec;
outlet_go = 0;
if ((wait && inlet_wait) && (!wtrig)) {
wtrig = 1;
wait = 0;
}
if (inlet_wait && (!wtrig)) {
wtrig = 1;
wait = 1;
}
if ((wait && inlet_go) || (wait && inlet_nowait)) {
rec = 1;
wtrig = 1;
}
if (rec && inlet_wait) {
rec = 0;
}
if (rec)
wait = 0;
if ((!inlet_wait) && (!rec))
wtrig = 0;
outlet_waitstate = wait;
outlet_rec = rec;
outlet_go = inlet_go;