frac32 bright
frac32buffer.bipolar out
frac32.s.map bright
uint32_t r = 137;
uint32_t dp = 1 << 30;
uint32_t p = 0;
int32_t dir = -1;
r = GenerateRandomNumber();
int32_t bright;
MTOFEXTENDED(__SSAT(param_bright + inlet_bright, 28), bright);
if (dp < bright) {
dir = +1;
} else if (dp > (3 << 29)) {
dir = -1;
}
r = r * 69069 + 1;
dp = ___SMMUL(dp, (1 << 30) + dir * (r >> 5)) << 2;
p += dp;
// outlet_out = sine2t[p>>20]>>4;
outlet_out = __SSAT((abs((int32_t)p) >> 2) - (1 << 28), 28);