frac32 pitch
frac32buffer phase increment
frac32buffer.positive phasor wave
frac32.s.map.pitch pitch
frac32.s.map fm
int32 quant
int32 offset
int32 step
int32 range
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);
Phase += (freq >> 0) +
___SMMUL(___SMMUL(inlet_freq << 4, param_fm << 4) << 3, freq << 2);
P1 = Phase;
P1 = (P1 / ((1 << 30) >> (param_quant))) >> 2;
P2 = ((Phase - ((P1 << 2) * ((1 << 30) >> (param_quant))) << param_quant)) >> 1;
SINE2TINTERP(P2 - (1 << 30), P2)
P2 = (P2 >> 5) + (1 << 26);
int p1 = P1;
int p2 = 1 + P1;
p2 = p2 - ((p2 >> (param_quant)) << (param_quant));
p1 = (p1 + param_offset) * param_step;
p2 = (p2 + param_offset) * param_step;
p1 = p1 - ((p1 / param_range) * param_range);
p2 = p2 - ((p2 / param_range) * param_range);
SINE2TINTERP(Phase *(1 + p1), S1)
SINE2TINTERP(Phase *(1 + p2), S2)
outlet_phasor = ___SMMUL(S1, ((1 << 27) - P2)) + ___SMMUL(S2, P2);