bool32.rising trigger
bool32 sync
int32 steps
bool32 pulse output
frac32.u.map start
frac32.u.map stop
uint32_t val1;
uint32_t val2;
bool ntrig;
bool trg;
uint32_t timer;
val1 = 0;
val2 = 0;
ntrig = 0;
if ((inlet_sync > 0) && !ntrig) {
ntrig = 1;
timer = val1 * 0.9;
val1 = 0;
} else if (!(inlet_sync > 0)) {
ntrig = 0;
}
if ((inlet_trig > 0) && !trg) {
trg = 1;
val2 = -___SMMUL(param_start << 3, timer << 4);
} else if (!(inlet_trig > 0)) {
trg = 0;
}
val1 += 1;
val2 += 1;
outlet_out = ((val2 / inlet_steps) < ___SMMUL(param_stop << 3, timer << 2)) &&
((val2) > 0);