frac32.bipolar pitch
frac32.positive noise
frac32.positive amp
frac32buffer.bipolar sine wave
frac32.s.map.pitch pitch
frac32.u.map noise
frac32.u.map amp
uint32_t p, dpr, dp;
int32_t r;
int32_t amp;
amp = 0;
p = 0;
r = 137 + GenerateRandomNumber();
MTOFEXTENDED(0, dp);
dpr = dp;
MTOFEXTENDED(inlet_pitch + param_pitch, dp);
int32_t namp = (inlet_amp + param_amp) << 1;
int32_t mod = (param_noise + inlet_noise) << 3;
p += dpr;
// change amplitude when value is near zero
if ((p & 0x7FFFFFFFU) < dpr)
amp = namp;
// change pitch when derivative is near zero(
if (((p + 0x40000000U) & 0x7FFFFFFFU) < dpr)
dpr = ___SMMLA(dp, ___SMMUL(r = r * 69069 + 1, mod) << 2, dp);
outlet_wave = ___SMMUL(amp, sine2t[p >> 20]);
/*
Phase += freq + inlet_freq;
int32_t r;
int32_t p2 = Phase + (inlet_phase<<4);
SINE2TINTERP(p2,r)
outlet_wave= (r>>4);
*/