To obtain a fairly normalized sound output level independent of the input level we may use an LADSPA-pugin to filter the sound output through pulseaudio.
As a minimum we need a compressor plugin such as theĀ dysonCompressorĀ fromĀ swh-pluginsĀ which need to be installed if not yet present.
After having found out the name of our default sink with
pacmd list-sinks
and theĀ exactĀ name of the plugin as it is stored inĀ /usr/lib/ladspa/
Ā (with my system hereĀ dyson_compress_1403
) we can issue the following command
pacmd load-module module-ladspa-sink sink_name=ladspa_sink master=<alsa_output> plugin=dyson_compress_1403 label=dysonCompress control=0,1,0.5,0.99
ReplaceĀ <alsa_output>
Ā with theĀ exactĀ name of the output sink (in my system this wasĀ alsa_output.pci-0000_00_14.2.analog-stereo
).
The compressed output can now be listened on the newly created output sinkĀ ladspa_sink
accessible from theĀ Sound SettingsĀ menu.
Control settings for the compressor plugin are as follows:Ā peak limit, release time, fast ratio, ratio. See in theĀ plugin documentationĀ for more details, defaults and minimal resp maximal values for these controls.
To avoid clipping of playback we may also combine this plugin with a limiter after compression. We may use theĀ fast_lookahead_limiter
Ā for this with the master sink being now our just created lasdpa_sink from above:
pacmd load-module module-ladspa-sink sink_name=ladspa_normalized master=ladspa_sink plugin=fast_lookahead_limiter_1913 label=fastLookaheadLimiter control=10,0,0.8
Source:Ā settings above were adapted to pulseaudio fromĀ brienās blog on miscfits
Credit toĀ TakkatĀ onĀ askubuntu.comĀ for this great guide.