Posted in Everything

In search of pink noise

I had a lot of free time after back surgery, so I spent some time looking into a project a guy at work was interested in.

I can’t talk about that project because it’s a big secret (in the event that it’s worth something), but it had pink noise in it. Dr. Burrus never talked about pink noise, I’m fairly sure, so I went to Wikipedia for answers.

The first thing it talks about is power spectrum, but the real thing I wanted to know is why pink? (because that’s what it looks like as a color)

Pink Noise

The red is pink and the orange is white (obviously). The enormous DC value is apparently not an issue for floating point numbers, but I’m pretty sure it’ll make PCM saturate.

So you’d think that Wiki was the final word, but it turns out that there isn’t a lot of actual research into pink noise; just a bunch of research that compares things to pink noise.

Using Wikipedia’s formula doesn’t help much.

So I happen to know that white noise is Gaussian noise, (because of DSP in grad school). In sampled signals, each subsequent number is completely independent of the last one and can be from zero to infinity, but more likely zero-ish.

I happen to know these Gaussians are pretty because an expert told me.

Pink noise, not so much. In fact, it’s hard to calculate. Random number generators give us perfectly fine white noise, but none of them generate the right mix of numbers for pink noise.

So some guys on the internet worked out a method.

1. Take the fft of a signal, then multiply the output spectrum by a slanted line, then make inverse fft. There are a dozen reasons this is wrong – don’t do it.

Slanted line.

Some other guys used a plain old FIR filter set up to make more or less a slanted line, but with math that can be proven.

Those same guys came up with a fairly efficient algorithm based on additive random number generators at different octaves. Other guys wrote python code for it.

Pink Noise Found

Posted in DSP