# 3dB and 6dB Per Octave Rolloff Digital Filters / Generating Pink and Brown Noise

So I would like to have a design method for filters with 3dB and 6dB per octave roll off -- for generating pink and brown noise respectively.

I know the following 'pinking' filters exist: Filter to add 3dB per octave?

But the poster says he doesn't remember the value for A, nor does he give any idea of how he did it in the first place.

So my main question is:

How do we pick the poles and zeros of such a filter?

• oh, the dude's talking about me. just groked that. Jan 27, 2016 at 18:45

-6 dB / octave is trivial.

a common reference for a pinking filter is http://www.firstpr.com.au/dsp/pink-noise/

• Wow you are super helpful. What would we ever do without you? Jan 27, 2016 at 21:07
• Btw, that was sarcasm. You failed to answer the question, completely, [and also linked something which I also linked in my original post] so you don't deserve that +1 there. Jan 27, 2016 at 21:24
• okay, Dude, it's a slope of about -3 dB/octave. you can make whatever value for $A$ for however loud you wanna make it. it isn't equally loud at all frequencies. the 3 poles and 3 zeros in the link above with an $A=0.923$ will have that -3 dB/octave ramp cross 0 dB at about 0.322 Nyquist or $\omega \approx 1$. decide where you want whatever gain you want at whatever frequency and set $A$ with respect to that. Jan 27, 2016 at 21:58
• you would have the same kinda issue with a simple 1-pole LPF to do brown or red noise. where do you want the -6 dB/octave ramp to cross the 0 dB level? Jan 27, 2016 at 21:59
• Now we may be getting somewhere. So, if I want to do brown noise, I need to design a simple 1 pole LPF. So I let my cutoff frequency be wc = 2 * pi * fc, with fc in hertz. I take wc, prewarp it, and design a 1st order Butterworth filter. Using the bilinear transform, I convert it into a discrete filter, and there I am. This filter should cross the 3dB level at wc. But, how do I do -3dB/octave? Why did you pick 3 poles and 3 zeros? What filter design did you use? Jan 28, 2016 at 14:52

here's what to do for -3 dB/octave (what i remember from 1985):

first take your 1/sqrt(f) magnitude function and inverse-warp that frequency response to what it will look like in the analog s-domain. instead of only a -3 dB/oct ramp (which is what you after BLT frequency warping) you have a -3 dB/oct ramp that starts to level out a little in the s-domain.

Then apply straight line ramps at -6 dB/oct and 0 dB/oct (like with "Bode plots, remember them from electronics class?) to approximate your pre-warped ramp. convert those alternating poles and zeros to digital using the BLT. then your pre-warped ramp will come out like a straight ramp after BLT frequency warping. then adjust the pole or zero that is on the edges to minimize the maximum error in the log-log plot in the digital domain.

So I have figured out the answer, thanks to a little prodding by RBJ.

Creating -6dB/octave Filters and Brown Noise:

1. Generate a White Noise Sequence.
2. Design a 1st Order Butterworth Filter
3. Apply 1st Order Buttworth to the White Noise Sequence [Use the Bilinear Transform to convert the analog coefficients to digital, and apply the digital filter to the white noise sequence].

Creating -3dB/octave Filters and Pink Noise:

1. Generate a White Noise Sequence
2. Generate arbitrary interleaved poles and zeros on the positive real line within the unit circle. Such that $|p_{i}| > |z_{i}|$ and $|z_{i}| > |p_{i+1}|$. Set the first pole close to the unit circle.
3. Convert these roots to coefficients, and use these coefficients as the coefficients of a digital filter.
4. Apply said digital filter to the White Noise Sequence.

What I am still not sure of is why we need to interleave the poles and zeros, but that isn't exactly what the question asked. Can anybody elaborate?

• Browning filter: should be 1-pole LPF with the zero at $z=-1$. all such 1-pole filters are, strictly speaking, a Butterworth, but they are also a 1-pole Tchebyshev, etc. the "Butterworth" distinction is not relevant until you get to 2nd-order filters and above, so Q or resonance becomes an issue. Jan 29, 2016 at 21:42