timepoint

puts out a pulse when 'phase' reaches the value defined by 'pos'
Author: Robert Schirmer
License: BSD
Github: rbrt/old/timepoint.axo

Inlets

frac32.positive phase

frac32.positive position to reach

Outlets

bool32.pulse pulse when phase == pos

Declaration
int32_t _ap;
int32_t phase;
Init
_ap = 0;
Control Rate
outlet_trig = 0;

phase = (inlet_phase - inlet_pos) & ((1 << 27) - 1);
if ((phase - _ap) <= 0)
  outlet_trig = 1;
_ap = phase;

Privacy

© 2024 Zrna Research