Windows' Loudness Equalization for PipeWire, reverse engineered from WMALFXGFXDSP.dll. It evens out the volume of each application, so quiet and loud parts play at a similar level.
modules/loudness/: the PipeWire module and the DSP plugin. It processes every app's playback stream.modules/limiter/: the output limiter of Windows' audio engine (AudioEng.dll), on every playback device. It keeps the boost from clipping.app/: an optional window (GTK3) to turn it on or off, globally or per app, and set the release time.Requires PipeWire ≥ 1.4, and GTK 3 for the window.
make sudo make install systemctl --user restart pipewire pipewire-pulse wireplumber
To install only one part, use make -C modules/loudness, make -C modules/limiter or make -C app. To uninstall, run sudo make uninstall and restart the same services.
Open Loudness Equalization from your application menu, or run pw-loudness-eq.
The settings live in a PipeWire metadata object, so they can also be scripted:
pw-metadata -n loudness-eq 0 enabled false # turn off pw-metadata -n loudness-eq 0 release 6 # release time, 2 (fast) to 7 (slow) pw-metadata -n loudness-eq 0 disabled-apps '["Discord"]' Spa:String:JSON # leave these apps alone pw-metadata -n loudness-eq # show settings
Changes apply immediately and are kept across restarts.
Defaults are in /usr/share/pipewire/pipewire.conf.d/60-loudness-eq.conf. To override them, copy it to ~/.config/pipewire/pipewire.conf.d/.
| Arg | Default | |
|---|---|---|
enabled |
true |
Start enabled |
release |
4 |
Windows "Release Time", 2 (fast) to 7 (slow). 4 is the Windows default |
stream.rules |
Never process some apps: [ { matches = [ { application.name = "Discord" } ] actions = { loudness-eq = false } } ] |
Settings changed at runtime are saved in ~/.local/state/pw-loudness-eq/state.conf and take precedence over this file.
The loudness module sets audioconvert.filter-graph.90 on each app's playback stream, so the plugin runs inside that stream, before its volume and before mixing, like a Windows stream effect.
The limiter module does what Windows' audio engine does on every playback device: after the mix and the software volume, it runs the output through a look-ahead limiter. It's always on, independent of Loudness Equalization, as on Windows.
Not processed: JACK clients, streams with more than 8 channels, and Flatpak apps that use PipeWire directly (those going through PulseAudio are processed).
A broadband automatic gain control. Despite the name, it doesn't equalize the spectrum.
w[n] = 16384·(1 − cos(2π(n+½)/N)) / (N/2) and run through a real FFT to get the power spectrum.L = 1.72 · Σ max(E_b − T_b, 1e-32)^0.25, with T = 1000, 100, 31.6, 10, 3.16, 2, 1, 1, .316, .316, 1×11, 4, 10, 100, 1000.= min((1300/L)^1.6, 10), so at most +20 dB.w = (N/128)·(44100/fs)·0.1^min(r,3)·0.316^(min(r,7)−min(r,3)) per block. At r = 4 that's a time constant of about 4.6 s.The boost can push pure tones such as a whistle well above full scale; the limiter catches that.
Ported from CAudioLimiter in AudioEng.dll. audiodg.exe puts it on every render device, after its effects, before the device.
0.985 / peak, reaching it as that frame leaves. All channels share one gain.e^(2.205/fs) per frame (about 19 dB/s) while the tracked peak decays by the same factor.On Windows the device's software volume comes before the limiter; in PipeWire it comes after the device's filter graphs. So the plugin gets the volume of each channel (kept in sync by the module), measures peaks on the signal as it will be after the volume, and applies only its gain. Once PipeWire applies the volume, the result is the same as Windows'. Hardware volume comes after the limiter on both.
make check # DSP and plugin tests, both modules modules/loudness/build/leq-wav [-r release] in.wav out.wav # process a file offline