boolms

Generates a single pulse after a rising edge on trigger input. A new trigger before the pulse finishes at the output, extends the pulse.
Author: Johannes Taelman
License: BSD
Github: phi/disp/boolms.axo

Inlets

bool32.rising trigger

Outlets

None

Displays

bool32 bool

Declaration
int32_t val;
int ntrig;
Init
val = 0;
ntrig = 0;
Control Rate
if ((inlet_trig > 0) && !ntrig) {
  val = 1 << 30;
  ntrig = 1;
  disp_bool = 1;
} else {
  if (!(inlet_trig > 0))
    ntrig = 0;
  if (val > 0) {
    int32_t t;
    MTOF(-64, t);
    val -= t >> 3;
    if (val <= 0)
      disp_bool = 0;
    else
      disp_bool = 1;
  } else
    disp_bool = 0;
}

Privacy

© 2024 Zrna Research