MarcBoule / Geodesics

A Modular Collection for VCV Rack by Pyer and Marc Boulé
GNU General Public License v3.0
60 stars 13 forks source link

How to generate blue and red noise? #2

Closed Gruftgrabbler closed 3 years ago

Gruftgrabbler commented 3 years ago

Hallo dear Marc Boule. I absolutely love your modules in VCV Rack. For me they are on of the post modules of there and I would love to DIY a couple of them on eurorack. I decided to go for Branes first, but go do Fate as well (I think it would be more easy). How ever I decided to do it in the digital region with a Teensy and the Teensy Audio Library. This way I don't have to care about those things in the background and can only focus on the fun stuff.

But my problem is that I don't really understand how you generated the blue and brownian noise. It really looks like your doing a simple RC Highpass at (4410/44100Hz) to generate blue noise out of white noise and a RC Lowpass at (70/44100Hz) to generate brownian noise out of pink noise. But doing this doesn't worked for me.

So I wanted to ask you about your thoughts on creating those noise colors? If I don't can create them on the teensy I think I would do a much simplified version of Branes completely without them.

You can also read a small conversion about this in the teensy forum: https://forum.pjrc.com/threads/62800-Maximal-I-O-capabilities-of-the-Teensy-Audio-Library?p=251362#post251362

PS: I never engineered a eurorack module before. Just build a DIY Penrose Quantiser. But Now I'm triggered :)

MarcBoule commented 3 years ago

Hi, neat project, glad you like our modules :-)

For the brownian noise (a.k.a. red noise), it's just white noise with a regular RC lowpass on it since red noise has a -6dB/octave slope, and the RC filter is 6dB/octave.

For the blue noise, it's implemented with a trick by using an RC high pass filter, which give a +6db/octave slope, but then followed by a -3dB filter, so in the end it comes out to +3dB/octave, which is what blue noise should be. There is a bit of empirically tuned stuff in there, but it gets the job done.

I think you can definitely create those in whatever environment, since the RC filter is really a simple filter to implement: https://github.com/VCVRack/Rack/blob/v1/include/dsp/filter.hpp#L13-L52

Cheers, and good luck with the project!