None
frac32buffer.bipolar pink noise
combo octaves
static const int noct = attr_octaves;
int32_t obuf[noct];
int32_t sum;
uint32_t seed;
int index;
const int8_t *dyadictree(void) {
static const int8_t dtree[] = {
0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1,
0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2,
0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1,
0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3,
0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1,
0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 7};
return dtree;
}
int i;
for (i = 0; i < noct; i++)
obuf[i] = 0;
index = 0;
sum = 0;
seed = 0x830af41e + GenerateRandomNumber();
int o = dyadictree()[index++];
if (o == attr_octaves) {
index = 0;
} else {
sum -= obuf[o];
seed = (seed * 196314165) + 907633515;
obuf[o] = ((int32_t)seed) >> 7;
sum += obuf[o];
}
seed = (seed * 196314165) + 907633515;
outlet_out = sum + (((int32_t)seed) >> attr_octaves);