int32 kticks
bool32.rising reset phase
bool32.pulse trig
spinner kticks
int32_t Phase;
int ntrig;
Phase = 0;
outlet_trig = 0;
if (inlet_trig > 0) {
Phase = 0;
ntrig = 1;
}
if (ntrig)
Phase++;
if (ntrig && (Phase >= (attr_kticks + inlet_kticks))) {
outlet_trig = 1;
ntrig = 0;
}