2

My current speakers have some frequency response deficiencies and I want to compensate for them through system-wide equalization in Xubuntu 14.04.

The first solution I tried was to enable the integrated equalizer that comes with PulseAudio, since that one allows the control of a more than generous number of frequency bands once you maximize the GUI (qpaeq). The problem is that that solution created all kinds of ugly dysfunctions in my system sound and I didn't want to go down the rabbit hole of trying to fix them all, so I gave up on it.

Later when I tried to solve this again I found another solution with a GUI called pulseaudio-equalizer, using the mbeq_1197.so LADSPA plugin to do its magic. That one was well-behaved, it dutifully re-inserted itself into any PulseAudio chain I'd create and worked with any audio hardware I would decide to redirect my sound to and generally gave me no trouble at all. But! The LADSPA plugin doing the work is locked to 15 frequency bands that offer very poor control where I need it the most: in the high-frequency region (only has 5 kHz, 10 kHz and 20 kHz bands and that's it).

So I need another solution that doesn't break my system sound and offers either adjustable frequency bands or parametric equalization.

3

The solution I finally found involves the use of another LADSPA plugin and offers parametric equalization with 4 controllable bands. It's something called "FIL Plugins" by Fons Adriaensen and (assuming you already have what you need for LADSPA plugin support) installation goes as follows:

  1. Install the fil-plugins package from the Ubuntu Software Center (this should give you the plugin file /usr/lib/ladspa/filters.so).

  2. Set the equalizer plugin as the default sink by adding these lines to the end of your ~/.config/pulse/default.pa (to be applied every time PulseAudio restarts):

load-module module-ladspa-sink sink_name=FonsParamEQ master=alsa_output.pci-0000_03_06.0.analog-stereo plugin=filters label=Parametric1 control=1,0,1,49,0.5,3,1,1000,0.5,2,1,10000,0.5,3,1,13500,0.5,-12

set-default-sink FonsParamEQ

set-sink-mute alsa_output.pci-0000_03_06.0.analog-stereo 0

  1. Stop any sound playback you have running, wait about 10 seconds and restart PulseAudio with "pulseaudio -k" in a console. Alternatively, you can do a system logoff-logon or a restart.

Where:

  • "FonsParamEQ" is whatever you want to call the EQ sink

  • the "plugin=filters label=Parametric1" needs to be exactly like that

  • you find out what to use as master= by typing "pactl list-sinks | grep master" into a console and looking for the master_device value

  • the effects of the control= values are described in the output of "analyseplugin filters.so | grep control"

  • I'm not sure the last line doing the set-sink-mute...0 is really necessary, I just copied it from the same kind of setup I had before in default.pa for mbeq_1197. I think it's useful when I plug in my external DAC as I remember at first that could lead to all audio getting muted (but hasn't done that in a long time).

Now at first I thought this kind of setup would only work if you wanted to set-and-forget a single equalizer profile specific to your speakers and/or room, as changing the settings seemed to require that you manually edit default.pa and restart PulseAudio every time you wanted to tweak something. As it turns out, you can create multiple instances of module-ladspa-sink based on the same plugin, with different settings, which would allow you to have different equalizer "presets" with this plugin and switch between them in real-time. What I have now looks like this:

load-module module-ladspa-sink sink_name=FonsParamEQ1 master=alsa_output.pci-0000_03_06.0.analog-stereo plugin=filters label=Parametric1 control=1,0,1,49,0.5,4,0,400,1,0,1,6500,0.15,-3,0,13800,0.15,0

load-module module-ladspa-sink sink_name=FonsParamEQ2 master=alsa_output.pci-0000_03_06.0.analog-stereo plugin=filters label=Parametric1 control=1,0,1,49,0.5,4,0,400,1,0,1,6500,0.15,-6,0,13800,0.15,0

load-module module-ladspa-sink sink_name=FonsParamEQ3 master=alsa_output.pci-0000_03_06.0.analog-stereo plugin=filters label=Parametric1 control=1,0,1,49,0.5,4,0,400,1,0,1,6500,0.15,-9,0,13800,0.15,0

set-default-sink FonsParamEQ1

set-sink-mute alsa_output.pci-0000_03_06.0.analog-stereo 0

So now when I open PulseAudio Volume Control, in addition to the hardware sinks I see 3 different LADSPA plugin-based sinks - alas, all having the same name -, of which the first is set to be the default. And even though the name shown on all of them is the same, I can remember the settings I used and the order in which I created them and I know that as I move down the list I can get more and more attenuation of the 6.5 kHz band. The names shown on the Volume Control GUI can't be changed as far as I can tell, since they seem based on a string baked into the filters.so plugin itself, but if you need just a few such "presets" that you can easily remember the settings of, at least you know that it's possible to have them.

3

My GUI program Pulseaudio Parametric Equalizer uses a set of ladspa-plugins specifically written for this task to do the equalization. Insertion of the eq is system-wide and does not need the GUI to run, settings are persisted even in case of system restart. Changing parameters in real time, i.e. results can be heard immediately.

  • I postponed trying this out until I had my Xubuntu reinstall running, but now your link is broken - there's nothing to be found at "t-5.eu". – Don Joe Feb 8 at 22:10
  • 1
    The site is hosted at home with a all connection which at times is not the most stable... Please try again now – T-5 Feb 9 at 8:25
  • OK, I've got it installed, but it doesn't show up when I launch it. Thing is, Teamviewer 14 is doing the same to me on this weird little Xubuntu 14.04 I'm trying to keep going with a pretty old kernel (don't ask). Will have to give your plugin a shot at some later date, when I grow out of this 14.04 and upgrade to something more current. – Don Joe Feb 10 at 0:11
  • 14.04 is very old, yes. You can still try to launch it in a console window and send me the error message via pm... – T-5 Feb 10 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.