p2t

toggle driven by pulses.
Author: robert schirmer
License: BSD
Github: rbrt/control/p2t.axo

Inlets

bool32.rising trigger

Outlets

bool32 output

Declaration
int ntrig;
int p_set;
int p_reset;
int op;
Init
p_set = 0;
p_reset = 0;
op = 0;
Control Rate
if ((inlet_trig > 0) && !ntrig) {
  op = !op;
  ntrig = 1;
}
if (!(inlet_trig > 0))
  ntrig = 0;

outlet_o = (op << 27);

Privacy

© 2024 Zrna Research