frac32.bipolar pitch
frac32buffer.bipolar sawtooth wave
frac32.s.map.pitch pitch
float p, dp, y;
// Sawtooth EPTR polynomial
float corr(float p, float dp) { return p - p / dp + 1 / dp - 1; }
p = 0;
int32_t idp;
MTOFEXTENDED(param_pitch + inlet_pitch, idp);
dp = idp * (0.25f / (1 << 30));
p += 2 * dp;
if (p > 1 - dp) {
y = corr(p, dp);
p -= 2; // wrap phase
} else {
y = p;
}
outlet_saw = (int32_t)(y * (1 << 27));