frac32.bipolar pitch
frac32buffer.bipolar sawtooth wave
frac32.s.map.pitch default pitch
float p, dp, dp2, y, D;
p = 0;
int32_t idp;
MTOFEXTENDED(param_pitch + inlet_pitch, idp);
dp = idp * (0.25f / (1 << 30));
dp2 = dp + dp; // 2*dp
p += dp;
p -= (p > 1);
if (p < dp) {
D = p / dp;
y = (dp2 - D) * D + 1;
} // D0
else if (p < dp2) {
D = p / dp;
y = (D + dp2 - 4) * D + 3;
} // D1
else
y = 2 * p - 1; // trivial waveform for all but the first two points
y -= dp2; // frequency dependent DC offset needed for algorithm
outlet_saw = (int32_t)(y * (1 << 27));