[pulseaudio-discuss] New Module: module-lfe-lp

Matthew Robbetts wingfeathera at gmail.com
Tue Mar 19 12:55:59 PDT 2013

On 19 Mar 2013, at 18:34, "Alexander E. Patrakov" <patrakov at gmail.com> wrote:

> 2013/3/19 Justin Chudgar <justin at justinzane.com>:
>> I've created a module to ensure that only low frequencies are sent to devices
>> at the end of an "lfe"/"subwoofer" channel. This module allows the user to
>> select the master channel, the low pass cutoff frequency (aka corner freq, -3dB
>> freq) and the number of filter poles.
> Sorry, I cannot sign off this filter implementation.

The filter implementation looks fine to me. Do you mean the coefficient calculation?

> First, the filter currently fails the "attenuation must be 3 dB at the
> cut-off frequency" test that all Butterworth filters must pass.

[That's not a very clear way to describe things. A filter is either a Butterworth or it isn't, and that is determined by ts transfer function. Specfic aspects of its frequency response are really side-effects of its Butterworthiness.]

Anyway: in what way does the filter not roll off correctly? The coefficient calculation looks to me like a quick swipe from the Audio EQ cookbook (I haven't verified that). Those formulae work pretty well, so if this filter isn't working right then presumably Justin has made a small error in that somewhere.

Justin, a relatively easy way to verify your coefficient generation is to use Matlab's (well, Octave's!) 'butterworth' function. This will get you the coefficients you need directly.

> Second, Q=sqrt(2) is only valid for a 2nd order Butterworth filter.

Well, to be clear, it *makes* it a Butterworth filter. The Q in the transfer function is the only thing distinguishing a Butterworth from any other filter you can make with a biquad.

Although, since you want him to use a cascade of Butterowrth filters, he surely *should* use Q=2?

Overall, I would agree that LR crossovers are a nice choice for this application. I would possibly use higher-order ones, such as LR6 or even LR8, as these quicker rolloffs are quite popular for crossing over to subwoofers (it can make them harder to localise). But as Alexander has described, that is just a case of casading the right filters together.
It is possibly not worth the extra hassle of making this user-settable in the end, also. I would expect one arrangement to work well for pretty much all uses of this module.

I can't comment on any if the Pulseaudio specific stuff, but from a DSP perspective it looks like you're pretty much there.

More information about the pulseaudio-discuss mailing list