bool32.rising trigger
frac32.bipolar delay time modulation
frac32.bipolar pulse length modulation
bool32 pulse output
frac32.s.map.klineartime.exp delay
frac32.s.map.klineartime.exp pulselength
int32_t val;
int ntrig;
val = 0;
ntrig = 0;
if ((inlet_trig > 0) && !ntrig) {
val = 1 << 30;
ntrig = 1;
outlet_pulse = 0;
} else {
if (!(inlet_trig > 0))
ntrig = 0;
if (val > 0) {
int32_t t;
MTOF(-param_delay - inlet_delay, t);
val -= t >> 3;
if (val <= 0) {
outlet_pulse = 1;
val = -1 << 30;
} else
outlet_pulse = 0;
} else if (val < 0) {
int32_t t;
MTOF(-param_pulselength - inlet_pulselength, t);
val += t >> 3;
if (val >= 0) {
outlet_pulse = 0;
val = 0;
} else
outlet_pulse = 1;
} else
outlet_pulse = 0;
}