I’ve been using Peace on Windows for a while. It’s a system wide equaliser with peak, shelf, and low/high-pass filters, all with configurable frequency and bandwidth. Now, I’ve finally found something that offers the same functionality on Linux: EQ10Q. EQ10Q isn’t an all-in-one solution like Peace, though. It’s designed as a plug-in for audio workstations such as Ardour. But combined with a standalone LV2 plug-in host (Jalv.GTK) and JACK, it can be used as a system-wide equaliser. So here’s how…
Installing the required components
This guide will assume you already have PulseAudio working on top of ALSA. On Ubuntu, you can install most of the required software with this line:
apt-get install jalv jack qjackctl pulseaudio-module-jack
EQ10Q itself must be built from source. The instructions on the EQ10Q website are fairly straightforward, but you may find the following line useful for installing dependencies:
apt-get install libgtkmm-2.4-dev lv2-dev cmake fftw3-dev
Running EQ10Q on Jalv
EQ10Q is a plugin built on the LV2 API. Jalv is a standalone container for LV2 plugins that plumbs I/O with JACK. Use
lv2ls to list the URIs of all installed LV2 plugins. EQ10Q comes with quite a few: EQ10Q is the de facto version with up to 10 filters, but if there’s also EQ6Q, EQ4Q, or even EQ1Q if your needs are smaller. The “S” and “M” suffixes are for the stereo and mono versions. You’ll most likely want stereo. EQ10Q also includes a dynamic range compressor, and a noise gate for recording microphone input. To run a plugin on jalv, use the command
jalv [URI]. You can replace
jalv.gtk to use the GUI version, which you’ll probably want to do, as EQ10Q has a very nice GUI. You can pass EQ settings on start-up with
-c "param=value". The command-line version of jalv will show a readout of the current parameters and their values so you can get an idea of how to construct your settings.
Redirecting audio to JACK
Almost all of the applications on your computer will be expecting to output their sound to PulseAudio. Run
pacmd load-module module-jack-sink to start up a dummy sound card for PulseAudio to output to that can be read by JACK. Then make sure it’s selected as PulseAudio’s default output in pavucontrol or similar.
Connecting the Dots
Back to QJackCtl now, we’re going to use the Patchbay to set up a connection preset. On the output side of the patchbay (left), use the “Add” button to add output sockets for EQ4Q and the PulseAudio JACK Sink. Be sure to select both plugs within each socket (these are the left and right channels) and give your sockets an easy to understand name. Then on the input side, add sockets for EQ4Q and “system” (ALSA).
Now you’re ready to create the connections. Select your JACK Sink on the output side and EQ4Q on the input side of the patchbay, and hit “Connect”. This instructs JACK to run the sound from PulseAudio into EQ4Q. Now connect the output side of EQ4Q to ALSA, so that JACK will take the equalised sound from EQ4Q and send it to your sound card through ALSA. Be sure JACK’s output is configured correctly in the QJackCtl setup panel. You might also want to take this opportunity to configure QJackCtl to start minimized to the system tray.
Now all that’s left to do is save the patchbay preset so you can recall it later, then hit “Activate” to connect everything up according to your layout. You should see the level meters bouncing up and down in the EQ10Q GUI as it receives sound, and you should hear equalised output from your sound card. The best way to check whether it’s working is to twiddle the output gain knob in EQ10Q. The output volume should vary accordingly.
Automating it all
Of course, starting qjackctl, then starting EQ10Q on jalv, then activating the patchbay preset every time you want to use your EQ is a bit of a pain, so I’ve automated the process with the script below. You should of course substitute your own EQ parameters.
nohup jackd -d alsa & pacmd load-module module-jack-sink pacmd set-default-sink jack_out nohup jalv.gtk -c "filter1_type=9" -c "filter1_freq=120" -c "filter1_q=0.7" -c "filter1_gain=3" -c "filter1_enable=1" -c "filter2_type=11" -c "filter2_freq=240" -c "filter2_q=3" -c "filter2_gain=-2" -c "filter2_enable=1" -c "filter3_type=11" -c "filter3_freq=6000" -c "filter3_q=3" -c "filter3_gain=3" -c "filter3_enable=1" -c "filter4_type=10" -c "filter4_freq=12000" -c "filter4_q=0.7" -c "filter4_gain=2" -c "filter4_enable=1" -c "input_gain=-3.5" http://eq10q.sourceforge.net/eq/eq4qs & nohup qjackctl -a ~/EQ4Q.xml clear
To bring everything down again, you can use the script below. After you kill the JACK sink PulseAudio should automatically switch back to the last sound card it was outputting to.
pacmd unload-module module-jack-sink killall jackd killall qjackctl killall jalv.gtk