Pink Noise Source
  • I needed a source of pink noise for simulating surf sounds and couldn't find one one the forum, so I put this together. It uses a set of first order filters to create a -3dB per octave low-pass filter to filter white noise to give a pink noise spectrum. See: http://www.firstpr.com.au/dsp/pink-noise/ for details. I adjusted the gain to be approximately equal to the random() node. Be aware that much of the energy is sub-audio, so if you want to use it as an audio source and increase the gain, you might want to use a DC blocker.
    Pink Noise.audulus
    15K
  • Interesting, are those the coefficients from the biquad pinking filter?
  • I like that it's only using 3% of my CPU (Mac) even though it's filled with z[-1] nodes.

    Very nice work, thanks for posting.
  • @RobertSyrett I found the coefficients for a pinking filter but the formula I saw was a third order filter not a biquad (it had a z-3 term). I ended up using the formula from the above reference. It's basically white noise put through five moving average first order filters summed to give -3db combined slope.
  • @jjthrash, with the improvements that Taylor made to the implementation of the unit delay I'm not nearly as reluctant to use them as I once was. In this case it was the best way I saw to make a first order filter since the built in nodes are all second order. I could have used the bi-quad and zeroed out the second order terms, but then I would have had to figure out how to translate the formula I had into bi-quad coefficients which is a bit beyond my current level of understanding. I've been studying digital filter design but I have to admit that it's been many years since I've done any high level math and it's very slow going.