pulse delay

delays a pulse by a period specified in 'k-ticks'.
Author: robert schirmer
License: BSD
Github: rbrt/control/pulse delay.axo

Inlets

int32 kticks

bool32.rising reset phase

Outlets

bool32.pulse trig

Attributes

spinner kticks

Declaration
int32_t Phase;
int ntrig;
Init
Phase = 0;
Control Rate
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;
}

Privacy

© 2024 Zrna Research