I am a bit surprised to notice that several red noise generators do not generate signals with the same spectral curve.
Here’s a screen caption of some spectras from signals coming from different modules. Only the ones from Bukavac and VCV’s Noise seem to agree. Isn’t there a strict definition of what a red noise is, that is a noise with spectral density decreasing with 6dB/octave?
Note that I had to reduce the slope of the Colors module to get a full spectrum whereas a 6db/octave slope generates a really narrow band.
I haven’t looked at the code for most of these, but I think I can give an answer: Generating noise with a consistent N dB/octave rolloff is not a completely trivial problem. It can be solved in several ways, and most of those ways are approximations.
I looked into a few for some Surge stuff, and the best results (least ripple etc) I could find were starting with white noise and simply stacking 11 shelf filters an octave apart. That lets you cover the audible range and gets very close to the theoretical ideal. And you can adjust the slope smoothly which is nice, though the recalculation of the coefficients could be considered a little costly depending on the context.
With a fast filter, a constant slope isn’t that expensive. But there are other approximations which, while less accurate, are also cheaper. There may also be other reasons to prefer one method over the other. And most of these approximations are good enough for the majority of cases.
I use an inverse FFT, and am quite accurate. Also very efficient, for other reasons. As you note, it’s not a trivial problem. I was sort of proud of this module, back in the day.
Actually that crazy bump below 100 hz goes away if I re-lead the patch. Don’t know if that’s a bug in colors, or in bogaudio analyzer. I would suspect colors…
the low end of an FFT always looks odd because FFT bin spacing is linear, but it’s displaying on a log scale. So the bottom bins get “stretched”. Or do you mean something else here? Are you maybe talking about the apparent bug in Colors below 100 hz that I mentioned a few times above? Although on your plots it looks like the bug is at 20Hz…
You can see by yourself that the response curve I have with the Speck module is quite narrow with the -6/dB octave curve. It also sounds much duller than the variants from VCV or Bogaudio for instance. I understand there are several ways to code a red noise generator but I am however surprised of all the differences.
Well the creative part of me is glad they all sounda a bit different. More interesting that way.
But this also makes me think we should make a rack module out of the tilt noise module I made for SCXT. I’d want to optimize the coefficient calculation first, it’s very cheap when static but a bit less so when modulated. And there’s like… no shortage of other things to do. But should be doable sometime next year.