Phase generator for the loop recorder object. Essential to avoid horrible noises.
Author: Sputnki
License: BSD
Github: sptnk/looper/pos.axo


int32 last value of the table to read

bool32 set the object to play mode. When released, the phasor resets to 0

bool32 set the object to pause mode


frac32buffer.positive pos signal generator for the rec object

int32 startpos

int32 endpos


int32 numerator for a further subdivision of the loop interval

int32 denominator for a further subdivision of the loop interval

int32 offsets the start position by a factor mulstart*num/den


objref 32b table in which the 4 tracks are stored

uint32_t counter = 0;
uint32_t maxlength = attr_table.LENGTH;

bool play;
bool hold;
Control Rate
uint32_t maxlength = inlet_length ? inlet_length : attr_table.LENGTHMASK;
uint32_t startpos = 0;

uint32_t base = (param_num * maxlength) / param_den;

startpos = (param_mulstart * maxlength) / param_den;
maxlength = startpos + base;

if (startpos > attr_table.LENGTHMASK)
  startpos = 0;
if (maxlength > attr_table.LENGTHMASK)
  maxlength = attr_table.LENGTHMASK;

play = inlet_play;
hold = inlet_hold;

outlet_startpos = startpos;
outlet_endpos = maxlength;
Audio Rate
if (play && !hold)
else if (!play)
  counter = startpos;

if (counter > maxlength)
  counter = startpos;

outlet_pos = counter;


© 2024 Zrna Research