bang

Generates a single pulse when the button is pressed similar to PD / Max/Msp 'bang'
Author: Robert Schirmer
License: BSD
Github: rbrt/patching/bang.axo

Inlets

None

Outlets

bool32.pulse pulse

Parameters

bool32.mom bang

Declaration
int32_t val;
int ntrig;
Init
val = 0;
ntrig = 0;
Control Rate
if ((param_bang > 0) && !ntrig) {
  ntrig = 1;
  outlet_pulse = 1;
} else {
  if (!(param_bang > 0))
    ntrig = 0;
  outlet_pulse = 0;
}

Privacy

© 2024 Zrna Research