3dB/0.5 pole filter?

DSP, Plug-in and Host development discussion.
User avatar
897 posts since 20 Dec, 2010

Post Thu Aug 16, 2018 3:21 am

juha_p wrote:
Richard_Synapse wrote:Mathematica costs like $4000 so they won't give you the same functionality online for free.

Hmm... Home Edition starting from 320€ ... and it includes all functionality found in pro version.
Having the same feature set is quite usual for home or student editions. But such versions are almost always for non-commercial use only, so there's a reason they are much more affordable.

Synapse Audio Software - www.synapse-audio.com

2494 posts since 17 Apr, 2005 from S.E. TN

Series and parallel filter curves

Post Fri Aug 17, 2018 11:54 am

S0lo wrote:Thats why I'm saying "Variable Slope" not "Variable Asymptotic Value" if that makes any sense. There is no notion of a constant slope over a long range of frequencies in this situation. I'm aware of that.
Yes the ultimate slope of a lowpass filter above a couple of octaves above the cutoff frequency is its order * -6 dB per oct. -6 for 1st order, -24 for 4th order, etc.

If you want to carve out "interesting" slopes over a few octaves in the middle then if your synth architecture will allow it you can do it by feeding filter blocks in series. And you can do it by feeding filter blocks in parallel and then mixing the filter outputs together, possibly also mixing-in some of the original input signal. There are many ways to carve out interesting slopes in the middle. When you start parallel-mixing-in some of the original input signal, the responses can sometimes be various "shelf" shapes.

If your synth architecture will allow it, when parallel mixing it gives more freedom if you can mix each branch either inverted or non-inverted. In simple mixing code, it is convenient to think of positive and negative gain-- For instance something like if Gain_1 = 1.0, Gain_2 = -0.5, etc-- The mixing of each sample would be Output = (Signal_1 * 1.0) + (Signal_2 * -0.5); Which is basically subtracting half of Signal_2 from Signal_1.

Dealing with a "common" mixer GUI calibrated in dB, positive vs negative gain tends to "mean something else": +6 dB multiplies the signal by 2.0 and -6 dB multiplies the signal by 0.5. Both cases are "Positive Gain" in the multiplier sense, but positive dB just multiply to bigger results and negative dB muiltiply to smaller results. So if using a "dB oriented" mixer GUI, maybe the easiest way to include the option of "subtracting rather than adding" is to give each channel strip a phase invert button. Push the phase invert button and then a setting of +6 dB SUBTRACTS [ signal * 2.0 ].

Mixing parallel filters can have lots of shapes, some hard to intuitively predict, because if the filters are tuned different, they have different phase shifts, and when you mix them together the effect of phase shifts can make some frequencies louder or quieter than you may have "intuitively expected". Also why "mixer channel phase invert" for subtraction can be useful, because if the phase differences are radical enough, then subtracting signals may give louder (or more interesting) results than adding the signals!

Apologies belaboring simple obvious points.

The parameter "Q" is most meaningful with 2nd order filters. If series-connecting or parallel-connecting higher order filters, or any filter with something like "resonance" or "bandwidth" knob rather than a Q knob, if not just tuning by ear, it is helpful to watch a spectrum analyzer because it is hard to predict what "middle frequency shape" certain resonance or bandwidth settings would give, and a resonance setting of 0.5 in one synth might not do exactly the same thing as the same resonance setting in some other synth. Each synth designer might have something different in mind when defining his terms.

But if implemented correctly, Q of 2nd order filters we can talk about purt reliably. For lowpass and highpass 2nd order filters, often the value of Q is also the filter gain at the center frequency. A Q of 0.707 is 2nd order butterworth with "sharpest rolloff which is also smoothly falling into the stopband" or something like that. The gain at the center frequency is -3 dB and for the 2nd order lowpass filter, as you trace up from low freq to high freq, the curve steadily decreases all the way up.

Below Q = 0.707 the transition in the middle is more gradual before it settles down to -12 dB per octave. At Q = 0.5, gain - -6 dB at Fc. It takes a couple of octaves below Fc to fall to -6 dB, and it will take a couple of octaves above Fc before the response settles down into -12 dB / oct.

For "carving interesting midrange responses" the Q range from 0.707 to 1.414 deserves attention. I suspect people often either use "little or no resonance" or immediately jump the Q significantly bigger than 1.414, not noticing the subtlty available in that 0.707 < Q < 1.414 range.

At Q = 1.0, Gain at Fc is 1.0. There is a smooth little "bump" approaching from below up to Fc, then it falls off a little faster above Fc, but not a lot.

Here is a dumb example-- If you have two series LP 2nd order filters-- If you set the second LP Q = 1.414 then there is a fairly wide gentle +3 dB gain bump at Fc. There will be SOME noticeable gain going down at least one octave below Fc and gain will stay positive for awhile above Fc before it starts falling off initially "a little steeper" than -12 dB / oct, eventually settling at -12 dB / oct in the high freqs.

So if you tune the Fc of the second LP filter to the -9 dB point of the first LP filter, then the curve is made "more gradual" in the couple of octaves around LP_1's -9 dB point, because of that gentle +3 dB gain bump added by LP_2. But eventually up in the higher frequencies the ultimate falloff is steeper with the two series filters rather than just one.

Higher Q's can also sculpt responses of course, but higher Q's also get narrower and more drastic in effect, so they might not be as useful to sculpt up to a couple of octaves in a cumulative frequency response.

Also of note, if the filters are NOT significantly distorting then the result would be the same feeding [LP_1 -> LP_2 -> Out] OR [LP_2 -> LP_1 -> Out]. So it is only a matter of "easier convenient thinking" to consider that you are using LP_2 to further modify LP_1. OTOH if you distort the filters then different filter routings may give significantly different-sounding results.

User avatar
661 posts since 31 Dec, 2008

Re: 3dB/0.5 pole filter?

Post Sat Aug 18, 2018 1:05 pm

Thank you JCJR for your elaborate explanation. I tried to grasp the main concept you explained here and I will try to put it in a nutshell, so please correct me if I'm wrong.

The approach you descried is to use the transitional range that starts before and at Fc briefly to around 9db slope and mix (or cascade) multiple filters with varying Fc to eventually sculpt a different fractional steepness slope during these consecutive transitional ranges.

I'll try to go through your description again and see if I missed something. I actually tried it briefly in my synth and indeed I came with reasonable results.

I will also try here to explain what was it that I'm trying to do with the video mentioned above. I will use graphs as it appears I'm not really good with words :). Consider, the following 4th order Chebyshev Type 1 Low pass detailed in the graph below. Please ignore magnitude (db) values shown on left as these are expressed in a different scale than the usual 20log-base10 (I Think it's 20log-base2, but not sure. I'll have to dig out that).

Image Image

Nothing special here. Now have a look at what happens if we add 4 zeros (2 conjugate pairs) at 20Khz and 21Khz.

Image Image

The slope between 4Khz and 10Khz has abruptly gone steeper. Thats expected. we'll consider that to be the start-up slope. Lets also call this 4khz to 10khz range the intermediate range to avoid confusion.

Now have a look at what happens if we pull the 4 zeros (2 conjugate pairs) to lower frequencies at 10Khz and 12Khz.

Image Image

Our intermediate range slope has radically gone steeper. Notice that this wouldn't be an abrupt change, because we have not added any new zero. This change can happen smoothly from where the zero started at 20Khz and 21Khz down to the new frequencies at 10Khz and 12Khz. Which means that all fractional slopes in between are reachable just by positioning the zeros differently!!. Although now there is some ripple on the right where the zeros reside. But if we can keep the ripple bellow audible level (i.e at high SNR) we could ignore it.

Lets see what happens if we lower the frequencies of the 4 zeros (2 pairs) even further reaching say 6.5Khz and 9Khz.

Image Image

The slope continues to go steeper but unfortunately the ripple is now within our intermediate range and is higher in db which may or may not become audible.

However, Further experimentation shows if we add more zeros (conjugate pairs), the ripple can be brought down and hence the slope of the intermediate range can go steeper without problems. Now the problem I'm facing is really determining how many zeros are enough to make the ripple inaudible. As I'm still not sure about the db scale used in the Y-axis in this piece of software. I've managed to get some practical results as shown on the video above with notch filters, but, then I'm not sure how it will do with pure zeros, it has to be formulated properly.

I hope I have made it clear. Please feel free to comment if you have any thoughts or concerns about this or even if you think that this would not work because of other reasons that I might have missed.

2494 posts since 17 Apr, 2005 from S.E. TN

Re: 3dB/0.5 pole filter?

Post Wed Aug 22, 2018 8:37 am

Thanks S0lo. I didn't have much specific point to the previous message, was discussing series/parallel sculpting a bit so far as I know-- In case it would be useful. Your earlier example used a series notch and I was just attempting to illustrate other possibilities.

On the topic of series notches, in case you haven't seen the info. Maybe you already know all about it.

There are Elliptical or Cauer filters. Some modern definitions of Elliptical filter seem to demand that the passband ripple and the stopband ripple should be exactly the same before we call it an elliptical filter. However when I long ago read about it in analog filter books that was not necessarily the case, especially the lower-order "what was called" elliptical analog filters.

Here is the closest to an "old style" description I found: http://sound.whsites.net/articles/active-filters.htm#s7 Just scroll down the page to section 7.3 - Cauer (Elliptic)

That example has a 2nd order lowpass in series with an "elliptical" filter. Often ellipticals were made by parallel summing the LP and HP of a SVF, probably because one was "guaranteed" that the Fc of both outputs would be the same with an analog SVF. Something harder to guarantee with separate LP and HP analog filters, because it was expensive to match 4 capacitors that closely. But could be done in DSP with separate LP and HP filters, RBJ cookbooks or whatever. If using DSP SVF, best to use a modern ZDF type rather than an old Chamberlin type.

So anyway, if you parallel mix 2nd order LP and HP you get the perfect notch because at FC the LP is -90 degree phase shifted and the HP is +90 degree phase shifted. They are 180 degrees apart and completely cancel at FC if the two filters' frequency and Q are well-matched.

The "cute" thing happens if you mix non-equal amounts of LP and HP together. For example if you keep the LP mix the same and gradually reduce the level of HP, the ultimate High Frequency level begins to fall (of course) but the center of the notch starts tuning higher in frequency and getting less deep at its deepest point.

You can get the elliptical Highpass by keeping HP level hot and gradually reducing the LP mix level.

That way, you can fine-tune the steepness of the slope and the frequency of the deepest cut just by adjusting the LP + HP mix coefficients.

The drawback to using ONLY a stage of elliptical like that, is that at very high frequencies for the lowpass version, the gain comes back up to whatever is your HP mix coefficient. That is why they were often paired in series with lowpass filters as shown in that linked example circuit. The LP filter would keep the high frequency gain from coming back up so loud, and the elliptical filter could impart a very steep initial cutoff slope without needing a real big Q and its consequent big amplitude ripples and ringing.

Which seems similar to what you were earlier demonstrating, but substituting a variable LP + HP mix for the notch filter, you get more flexibility in what you can sculpt.

Return to “DSP and Plug-in Development”