pos2phase

Converts a position input to a phase (percent) output. Useful for visual indication of the loop position.
Author: Sputnki
License: BSD
Github: sptnk/looper/pos2phase.axo

Inlets

frac32buffer position input

int32.positive start position

int32.positive end position

Outlets

frac32 percent of the loop (phase)

Control Rate
float num = inlet_pos[0] - inlet_startpos;
float den = inlet_endpos - inlet_startpos;
float frac = num / den;
outlet_percent = (1 << 27) * frac;

Privacy

© 2024 Zrna Research