## 3dB/0.5 pole filter?

DSP, Plug-in and Host development discussion.
aciddose
KVRAF
12128 posts since 7 Dec, 2004
That's only because you're moving the fc around though. It's important not to insert these types of "magical belief" about "the slope being sloppy" which simply isn't true.

In my post I had the math going wrong in my head: a decade separation is the basic "tight" method and looser is approximating. So 100, 1000, 10000, 100000 will have you a damn near perfect -3 dB slope between 20Hz to 20kHz with only two filters giving a "slightly wobbly" slope that drops off too fast in the high range, but this is totally acceptable in many applications.

This is near perfect but not entirely. That is because apparently the ideal mix level is not in powers of sqrt(1/2) for some reason. I believe it can be compensated by tweaking the mix levels by hand but I'm not sure of the mathematical reason for the issue.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

aciddose
KVRAF
12128 posts since 7 Dec, 2004
Here is what you can get by using two filters:

The parameters are:
• Stages
• Frequency step
• Starting frequency
• Amplitude rolloff (decrease per stage)
In this graph I've used:
• 2 stages
• 10 ^ 1.88 = ~75.86
• 10 ^ 2.1 = ~125 Hz (stage 1) * 75.86 = ~9550 Hz (stage 2)
• ~0.61

This one trades worse low frequency slope for better high frequency with:
• 2 stages
• 10 ^ 2.18 = ~151.36
• 10 ^ 2.03 = ~107 Hz (stage 1) * 151.36 = ~16218 Hz (stage 2)
• ~0.52
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

Smashed Transistors
KVRist
132 posts since 10 Oct, 2014
Maybe a multitap "running sum"/box/"moving average" filter can lead to a cheap solution.
With carefully chosen taps it may be possible to mostly get rid of the nasty notches induced by box filtering.

JCJR
KVRAF
2489 posts since 17 Apr, 2005 from S.E. TN
aciddose wrote:That's only because you're moving the fc around though. It's important not to insert these types of "magical belief" about "the slope being sloppy" which simply isn't true.
Thanks aciddose. Well sure it would move the individual Fc's around, among other stuff.

I don't understand how it is "magical belief" that the easiest way to get "idealized" RC response is to buffer it so that the input and output impedances can be neglected. And that if you happen to need a "sloppy curve" and if loading the filter will accomplish that, then what's so magical?

Your description is like mystran's description of cascaded shelving filters. Which may be smartest way to do it in digital, dunno. An analog series cascade of shelving filters would probably want 1 opamp for each stage of shelving filters to make it "easiest to design" without having to worry about parts interactions.

I recall making at least one passive pinking filter that was copied from a National Semiconductor appnote book or some other place. About 1978 in a homemade test set that included shift register white noise pinked with the simple passive filter. The single-channel analyzer metering section was tunable to 100 frequencies from 24 to 17 kHz, state variable filter and two decade push button switches. One decade switch for octaves and the other decade switch for tenths of an octave. Matched caps on the octaves decade switch and matched resistors on the tenth-octave decade switch.

So anyway I used the thang many years before it wore out and it was purt close to pink. If it was anywhere closer to red or brown then I wouldn't have been able to use the instrument for practical purposes. But plug the pink noise out direct to the analyzer in, it measured within a dB of flat. There were some minor variances but I couldn't say whether the minor variances were in the pinking filter, the analyzer filter, the metering or what. Or maybe a combination.

So far as I recall it was "in the ballpark" of the passive filter I earlier linked--

That one could be interpreted maybe as a parallel network of shelving filters. But being unbuffered, would guess that every part interacts with every other part so you might not be able to adjust "just one thing" without also affecting other things.

OTOH if it is "pink enough for purpose" then simpler/cheaper than throwing a bunch of opamps at a series network of shelving filters.

aciddose
KVRAF
12128 posts since 7 Dec, 2004
JCJR wrote: Your description is like mystran's description of cascaded shelving filters. Which may be smartest way to do it in digital, dunno.
It's the ideal way in both and it's the same method that mystran described.

You just don't realize it: the schematic you've linked is the same thing with four stages/poles.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

JCJR
KVRAF
2489 posts since 17 Apr, 2005 from S.E. TN
aciddose wrote: You just don't realize it: the schematic you've linked is the same thing with four stages.
I realize it is "about the same thing" that gets the job done as a passive parallel network of shelves, not an active series network of shelves.

Or were you describing running a bunch of shelving filters in "parallel subtractive" mode somehow?

I would have to test both approaches to find out if each result would be "identical" or if there would be differences. Maybe smart people would just know without actually testing it.

aciddose
KVRAF
12128 posts since 7 Dec, 2004
The only difference is the resulting gain and fc. You can get identical results from both but it's very difficult with a passive network because everything interacts.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.

mystran
KVRAF
5155 posts since 12 Feb, 2006 from Helsinki, Finland
aciddose wrote:
JCJR wrote: Your description is like mystran's description of cascaded shelving filters. Which may be smartest way to do it in digital, dunno.
It's the ideal way in both and it's the same method that mystran described.
Here's the paper I picked up the technique from: http://hal.in2p3.fr/in2p3-00024797v3/document

It's specifically about noise generation, but the same concept obviously applies to any situation where you need to tilt the spectrum in a continuous fashion. It's also true that the ear is not necessarily that precise and you can probably get away with just a few poles if you just want it to sound right (where as I found that paper when I was looking for a solution to generate something that would be "near perfect" for analysis purposes)... and to be honest, if you want something like a continuously adjustable filter for artistic purposes, simply cross-fading between different numbers of poles ends up working quite well, even if the resulting slopes aren't really anywhere near what you'd want in the mathematical sense.
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

mda
KVRist
62 posts since 24 Oct, 2000 from Bremen, Germany
Here is an old page with similar filters to aciddose's
http://www.firstpr.com.au/dsp/pink-noise/

Maybe having less stages but randomly modulating the cutoffs could get a flatter result?

S0lo
KVRian
656 posts since 31 Dec, 2008
@CinningBao

I'm sure I got you wrong here, but as the title says, a slope of 3db/0.5 octave is pretty much the same as 6db/1 octave. What did you mean?
Last edited by S0lo on Tue Aug 14, 2018 12:16 am, edited 1 time in total.

S0lo
KVRian
656 posts since 31 Dec, 2008

juha_p
KVRian
519 posts since 21 Feb, 2006 from FI

BertKoor
KVRAF
10920 posts since 8 Mar, 2005 from Utrecht, Holland
S0lo wrote:@CinningBao

I'm sure I got you wrong here, but as the title says, a slope of 3db/0.5 octave is pretty much the same as 6db/1 octave. What did you mean?
Having read more than just the thread title, but the first post also, I think he meant arbitrary dB's per octave, other than the staple multiples of 6dB/oct, where the gain reduction is lower than 6dB/oct.
We are the KVR collective. Resistance is futile. You will be assimilated.
My MusicCalc is back online!!

matt42
KVRian
1077 posts since 9 Jan, 2006
S0lo wrote:I'm sure I got you wrong here, but as the title says, a slope of 3db/0.5 octave is pretty much the same as 6db/1 octave. What did you mean?
3db / 0.5 pole filter. 3db is the slope 0.5 the number of poles presumably

mystran
KVRAF
5155 posts since 12 Feb, 2006 from Helsinki, Finland
mda wrote:Here is an old page with similar filters to aciddose's
http://www.firstpr.com.au/dsp/pink-noise/

Maybe having less stages but randomly modulating the cutoffs could get a flatter result?
I feel like whether you are doing DSP or building an actual analog circuit, it's probably cheaper (in terms of CPU time and/or component cost) to just throw in a few extra poles compared to making everything time-varying.

I mean the fact is, static one-poles of any type are not particularly costly...

ps. I suppose if you have a variable frequency filter to begin with, then it might be worth another thought, but even then fast PRNGs tend to have statistical problem so.. like... I don't know
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.