bool32.rising newSeed
frac32buffer.bipolar ring
int32 nbOsc
static const int NB = 8;
int16_t p[NB];
int16_t c[NB];
int32_t s[NB];
int32_t r;
bool _newSeed;
for (int j = 0; j < NB; j++) {
c[j] = 0;
s[j] = 1;
}
r = GenerateRandomNumber();
for (int i = 0; i < NB; i++) {
r = r * 69069 + 1;
p[i] = 150 + (r >> (31 - 7)); // +-128
}
_newSeed = false;
if (!_newSeed && inlet_newSeed) {
for (int i = 0; i < NB; i++) {
r = r * 69069 + 1;
p[i] = 150 + (r >> (31 - 7)); // +-128
}
}
_newSeed = inlet_newSeed;
int32_t r = 1;
for (int i = 0; i < param_nbOsc; i++) {
if (c[i]-- <= 0) {
c[i] = p[i];
s[i] = -s[i];
}
r *= s[i];
}
outlet_ring = r << 26;