frac32.bipolar pitch
frac32buffer.bipolar selfPM wave
frac32.s.map.pitch pitch
float p, dp, _dp2, y0, y1, y2;
float I2(float p) { return p * (1 / 6.0f + p * (-0.5f + p * (1 / 3.0f))); }
p = y0 = y1 = y2 = 0.0f;
int32_t idp;
MTOFEXTENDED(param_pitch + inlet_pitch, idp);
dp = idp * (0.25f / (1 << 30));
_dp2 = (1 << 27) / (dp * dp);
// change of dp => update state variables y1 y2
p -= dp;
p += (p < 0);
y2 = I2(p);
p += dp;
p -= (p > 1);
y1 = I2(p);
p += dp;
p -= (p > 1);
y0 = I2(p);
outlet_wave = (int32_t)((y0 + y2 - 2 * y1) * _dp2);
y2 = y1;
y1 = y0;