lsync

if 'wait' is high,'loop_sync' will wait until the signal at 'pos' reaches the value defined by 'start'. then, a pulse is put out at outlet 'trig'.
Author: robert schirmer
License: BSD
Github: rbrt/testing/lsync.axo

Inlets

bool32.risingfalling wait

frac32.positive pos

frac32.positive sync position

Outlets

bool32.pulse sync trigger

Declaration
int shift;
Init
shift = 1 << 18;
Control Rate
int csample = inlet_pos;
int spos = inlet_start;

if ((inlet_wait) && ((csample > (spos - shift)) && (csample < (spos + shift))))
  outlet_trig = 1;
else
  outlet_trig = 0;

Privacy

© 2024 Zrna Research