int32 offset
int32 step
frac32 pitch
frac32buffer phase increment
frac32buffer phase
frac32buffer.positive phasor wave
frac32.s.map.pitch pitch
frac32.s.map fm
int32 quant
int32 offset
int32 step
int32 range
bool32.tgl internal
uint32_t Phase;
uint64_t P1;
uint64_t P2;
int32_t S1;
int32_t S2;
Phase = 0;
uint32_t freq;
MTOFEXTENDED(param_pitch + inlet_pitch, freq);
int32_t step = param_step + inlet_step;
int32_t offset = param_offset + inlet_offset;
Phase += (freq >> 0) +
___SMMUL(___SMMUL(inlet_freq << 4, param_fm << 4) << 3, freq << 2);
uint32_t phase =
(param_internal > 0 ? Phase / param_quant : 0) + (inlet_phase << 5);
P1 = phase;
P1 = (P1 / ((1 << 30) / (param_quant))) >> 2;
P2 = ((phase - (P1 << 2) * (1 << 30) / (param_quant)) * param_quant) >> 5;
int p1 = P1;
int p2 = 1 + P1;
p2 = p2 - (p2 / (param_quant)) * (param_quant);
p1 = (p1 + offset) * step;
p2 = (p2 + offset) * step;
p1 = p1 - (p1 / param_range) * param_range;
p2 = p2 - (p2 / param_range) * param_range;
uint32_t p3 = Phase / param_quant;
SINE2TINTERP(Phase *(1 + p1), S1)
SINE2TINTERP(Phase *(1 + p2), S2)
outlet_phasor = ___SMMUL(S1, ((1 << 27) - P2)) + ___SMMUL(S2, P2);