dirac

generates a single sample impulse (dirac) by triggering
Author: Johannes Taelman
License: BSD
Github: pulse/dirac.axo

Inlets

bool32.rising trigger

Outlets

frac32buffer.positive dirac impulse

Declaration
int ntrig;
Init
ntrig = 0;
Control Rate
if ((inlet_trig > 0) && !ntrig) {
  ntrig = 1;
  int i;
  outlet_out[0] = 1 << 27;
  for (i = 1; i < BUFSIZE; i++)
    outlet_out[i] = 0;
} else {
  int i;
  for (i = 0; i < BUFSIZE; i++)
    outlet_out[i] = 0;
  if (!(inlet_trig > 0))
    ntrig = 0;
}

Privacy

© 2024 Zrna Research