it-artikel:how-to-enable-audio-normalization-a.k.a.-audio-compression-a.k.a.-audio-dynamic-range-compression-under-linux

How to enable audio normalization a.k.a. audio compression a.k.a. audio dynamic range compression under Linux?

Under Windows its been around for many years already, installed by default and icluded pretty much with every sound driver. The user would just need to click a checkbox to enable it. With Linux it isnt that easy yet and most people are not even aware of it. But Linux offers a vast variety of messing with the audio path and signals in real time. Way more and better than you can with windows. However, as always with linux, it requires some research and reading/learning first.

With Linux we make use the pulseaudio audio server, which is default with pretty much every Linux distro these days, and the Steve Harris' LADSPA Plugins, available from your distro's online repository. Then we just tell the pulseaudio daemon (our local audio server) to add in an audio compressor plugin into our audio path and make it the “default audio sink” or “default audio output device”. And voila! From now on you'll have proper clean leveled audio on your Linux installation. No more games, videos or music suddenly “screaming” or shouting at you.

Well, that might not be a thing for audiophiles and lovers of classic music, who prefer to have a large dynamic audio range. But for anyone else who prefer so “set audio level and forget”, THIS is a very nice, easy and fast solution, that is been tested on any Ubuntu Linux starting from 16 to 18 so far.

Installation and Setup:

  1. Since “pulseaudio” is already preinstalled for us, all we need are the ladspa plugins and the pulseaudio mixer (optional but good for debugging and testing):
    sudo apt install swh-plugins pavucontrol
  2. Next, backup your main systemwide pulseaudio configuration file and then add some lines to its end, add a simple stereo audio compressor to it and make it the default audio output device:
    sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.$(date "+%Y-%m-%d")
    cat >> /etc/pulse/default.pa << EOF
    
    .ifexists module-ladspa-sink.so
    .nofail
    # mono compressor
    #load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
    # stereo compressor
    load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12
    .fail
    .endif
    set-default-sink compressor
    
    EOF
  3. Now either reboot or just restart your pulseaudio daemon within your session, to make it reload the new configuration to activate it. THATS IT!

btw: BIG THANKS to +Gotbletu on YouTube and Google+ for finding and showing me this awesome solution!! THANKS MATE!

Axel Werner 2018-06-25 06:26

it-artikel/how-to-enable-audio-normalization-a.k.a.-audio-compression-a.k.a.-audio-dynamic-range-compression-under-linux.txt · Last modified: 2018-06-25 07:14 by mail@awerner.myhome-server.de