frac32 length in fraction of the table
frac32 tempo in hz
bool32.rising reset phase
frac32buffer index in fraction of table size
uint32_t Phase;
uint32_t r;
Phase = 0;
r = 1;
{
if (inlet_reset && r) {
Phase = 0;
r = 0;
} else {
if (!inlet_reset)
r = 1;
Phase += inlet_freq >> 6;
}
outlet_pos = ___SMMUL(inlet_range, (Phase >> 5)) << 5;
}