• ### Understanding ELSE's [lop2~]

I stumbled on this while trying to finally understand the Butterworth filter in the Pd audio examples (see "H13.butterworth.pd"). Studying the calculation of the filter coefficients I was wondering how the locations of the real pole and zero were different from those of the 1st order filter. So I compared it with a one-pole, one-zero lowpass filter, ELSE's [lop2~].

Well, yes, there are differences ... But here's the strange thing: My filter with the coefficients calculated exactly like in the Butterworth filter behaves as I would have expected, whereas ELSE's [lop2~] doesn't work too well in the high frequency range. This is even stated in the help file.

Here's how I tested the filter: lop2-test.pd

Can anyone explain this? Am I missing something?

• Posts 8 | Views 1446
• Still don't fully understand ... Maybe it's just an approximation for computational reasons?

If I plot the feedback coefficient of both versions of the filter, it looks like this:

So for frequencies up to about 1500 Hz the approximation works pretty well, for higher frequencies there's an increasing error, and for frequencies above 2 radians the filter has no action at all (as it says in the help file).

Or maybe I'm completely missing the point ...

Edit: Actually the help file for ELSE's [lop2~] only says that the filter has no action "as you reach nyquist", which is of course true for the filter with the exact coefficient as well.

• @manuels I'm going to study https://forum.pdpatchrepo.info/topic/5927/building-filters-from-difference-equations-using-pd-s-raw-filters plus all the other references that are linked and I'll return back to this thread with your answer. I'm estimating it will take about 5 years unless there's another pandemic and lockdown in the meantime.

• Haha, yes, it takes some time to get into that. And after a few years it's still like if you're just scratching the surface ...

• Here's a thread from the SuperCollider forum that is related to, or perhaps precisely answers, your question. My understanding of it is fairly superficial though.

https://scsynth.org/t/rlpf-vs-blowpass-blowpass-seems-better/2627

hjh

• @ddw_music Thanks for the link! Should probably read the SC forum more often ... This is indeed an exact explanation for what's going on in my version of the filter: As I said, I just used the Butterworth calculation of the filter coefficients, and therefore linear frequency in the S-plane is mapped into the Z-plane using the bilinear transform and frequency warping. Remains the question: What's the disadvantage of this mapping? There must be one, I guess ...

The main reason for asking this question was this: I'm going to post a little update to my pole-zero diagram with some examples, which I all implemented using BLT, and I'm just not sure whether that's a good way to do this.

• @manuels said:

@ddw_music Thanks for the link! Should probably read the SC forum more often ... This is indeed an exact explanation for what's going on in my version of the filter:...

I thought it might I suspect that a number of ELSE signal objects are cribbed from SC, or cribbed from the same source of DSP formulas that SC cribs from (e.g, [resonant~] vs SC's `Ringz` -- note that both reflect a standard DSP algorithm, which also appears in Faust as pm.modeFilter if my memory is correct). Wouldn't surprise me at all if lop2~'s behavior is identical to RLPF's.

I ended up just switching my synths to use BLowPass because the result was more musically useful to me, even if mathematically "warped."

hjh

• @ddw_music said:

Wouldn't surprise me at all if lop2~'s behavior is identical to RLPF's.

But ELSE's [lop2~] isn't even a resonant filter, just a first order low-pass filter! I think it's just named "lop2~" because "lop~" is already used in Pd Vanilla, kinda misleading though.

The resonant low-pass filter in ELSE is called [lowpass~]. Checking its help file, I noticed a somewhat strange preset range for the resonance/Q parameter. (Maybe that's also an issue in SC's RLPF?) Values smaller than 0.5 don't seem all too reasonable to me because the filter is then "overdamped" and the actual cutoff frequency drops far below the specified frequency. In some filters Q = 0.5 is therefore simply defined as zero resonance, which probably adds to the confusion ...

Edit: It's even worse than that, because there are also two different definitions of the Q factor. (Here, I was refering to the "physical" rather than the bandwidth definition.)

Another edit: In the ELSE tutorial only the bandwidth definition of Q is given (or maybe I just overlooked something?). But in Robert Bristow-Johnson's Audio EQ Cookbook, which is the source for some of ELSE's filters, the physical / electrical engineering definition is used. So there might really be a bit of confusion. Or is it just me confusing things here?

Posts 8 | Views 1446
Internal error.

Oops! Looks like something went wrong!