Is there a way of leveling/compressing the sound system-wide? The 2019 Stack Overflow...

Do working physicists consider Newtonian mechanics to be "falsified"?

How do spell lists change if the party levels up without taking a long rest?

How to determine omitted units in a publication

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

Is this wall load bearing? Blueprints and photos attached

Why can't devices on different VLANs, but on the same subnet, communicate?

Keeping a retro style to sci-fi spaceships?

Was credit for the black hole image misappropriated?

Python - Fishing Simulator

Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?

Would an alien lifeform be able to achieve space travel if lacking in vision?

Drawing vertical/oblique lines in Metrical tree (tikz-qtree, tipa)

Could an empire control the whole planet with today's comunication methods?

How to handle characters who are more educated than the author?

should truth entail possible truth

Button changing its text & action. Good or terrible?

Can each chord in a progression create its own key?

Can we generate random numbers using irrational numbers like π and e?

What's the point in a preamp?

Does Parliament need to approve the new Brexit delay to 31 October 2019?

One-dimensional Japanese puzzle

Loose spokes after only a few rides

"... to apply for a visa" or "... and applied for a visa"?

My body leaves; my core can stay



Is there a way of leveling/compressing the sound system-wide?



The 2019 Stack Overflow Developer Survey Results Are In
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraIs there any Sound enhancers/equalizer?How can I apply a LADSPA plugin to a PulseAudio stream?Automatically switch equalizer preset based on audio output (internal speaker or external)Real-Time Volume Leveling & Audio OutputsTweeter destroyed by ultra high volume. Any kind of protection?Sound normalizationpulseaudio: Why is there no sound?Playing audio stream not showing in pavucontrolHow can I force a gradual volume increase when any sound begins playback?No sound over HDMI running 15.04 on NUC D54250WYKIf I put the volume under +- 40%, the sound stopsPulseaudio USB MicrophoneLubuntu 16.04 no audio after installing OSSListening to audio played on a turntableCan't increase volume after changing Left-Right audio balancePulseAudio removes sound from Ubuntu if it can't find a server





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







22















As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function.



We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio.



Any suggestion?










share|improve this question























  • Regarding "pulseaudio plugin for equalization system-wide" these links might be relevant: pulseaudio - Is there any Sound enhancers/equalizer? - Ask Ubuntu and pulseaudio - Automatically switch equalizer preset based on audio output (internal speaker or external) - Ask Ubuntu

    – Stéphane Gourichon
    May 28 '15 at 9:19




















22















As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function.



We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio.



Any suggestion?










share|improve this question























  • Regarding "pulseaudio plugin for equalization system-wide" these links might be relevant: pulseaudio - Is there any Sound enhancers/equalizer? - Ask Ubuntu and pulseaudio - Automatically switch equalizer preset based on audio output (internal speaker or external) - Ask Ubuntu

    – Stéphane Gourichon
    May 28 '15 at 9:19
















22












22








22


14






As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function.



We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio.



Any suggestion?










share|improve this question














As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function.



We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio.



Any suggestion?







sound pulseaudio compression system






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 '11 at 23:14









JethroDawnfineJethroDawnfine

111115




111115













  • Regarding "pulseaudio plugin for equalization system-wide" these links might be relevant: pulseaudio - Is there any Sound enhancers/equalizer? - Ask Ubuntu and pulseaudio - Automatically switch equalizer preset based on audio output (internal speaker or external) - Ask Ubuntu

    – Stéphane Gourichon
    May 28 '15 at 9:19





















  • Regarding "pulseaudio plugin for equalization system-wide" these links might be relevant: pulseaudio - Is there any Sound enhancers/equalizer? - Ask Ubuntu and pulseaudio - Automatically switch equalizer preset based on audio output (internal speaker or external) - Ask Ubuntu

    – Stéphane Gourichon
    May 28 '15 at 9:19



















Regarding "pulseaudio plugin for equalization system-wide" these links might be relevant: pulseaudio - Is there any Sound enhancers/equalizer? - Ask Ubuntu and pulseaudio - Automatically switch equalizer preset based on audio output (internal speaker or external) - Ask Ubuntu

– Stéphane Gourichon
May 28 '15 at 9:19







Regarding "pulseaudio plugin for equalization system-wide" these links might be relevant: pulseaudio - Is there any Sound enhancers/equalizer? - Ask Ubuntu and pulseaudio - Automatically switch equalizer preset based on audio output (internal speaker or external) - Ask Ubuntu

– Stéphane Gourichon
May 28 '15 at 9:19












4 Answers
4






active

oldest

votes


















16














I had success with the example shown in this answer.





  1. Install Steve Harris's LADSPA plugins Install swh-plugins



    sudo apt install swh-plugins



  2. Run pacmd and then this commands:



    load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
    set-default-sink compressor



This answer explains how to load the plugin permanently.





The parameters (the control=1,1.5,401,-30,20,5,12 part above) for this compressor are described in Steve Harris' LADSPA Plugin Docs:






  1. RMS/peak: The balance between the RMS and peak envelope followers.RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.


  2. Attack time (ms): The attack time in milliseconds.


  3. Release time (ms): The release time in milliseconds.


  4. Threshold level (dB): The point at which the compressor will start to kick in.


  5. Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.


  6. Knee radius (dB): The distance from the threshold where the knee curve starts.


  7. Makeup gain (dB): Controls the gain of the makeup input signal in dB's.


  8. Amplitude (dB): The level of the input signal, in decibels.


  9. Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.




Due to a limitation of PulseAudio, it is not possible to adjust them in real time.



To experiment with different parameters, I also loaded the compressor as a real-time adjustable ALSA plugin via Alsaequal Install libasound2-plugin-equal by creating the following ~/.asoundrc:



ctl.compressor {
type equal;
library "/usr/lib/ladspa/sc4m_1916.so";
module "sc4m";
}

pcm.plugcompressor {
type equal;
slave.pcm "plug:pulse";
library "/usr/lib/ladspa/sc4m_1916.so";
module "sc4m";
}

pcm.compressor {
type plug;
slave.pcm plugcompressor;
}


A sample MP3 file can be played through the compressor using mpg321 Install mpg321,



mpg321 -a hw:compressor "04 - Love Song for Yoshimi.mp3"


while alsamixer -D compressor can be used to adjust parameters in real-time.






share|improve this answer


























  • If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_equal.so on Ubuntu 14.10 try apt-get install libasound2-plugin-equal

    – Stéphane Gourichon
    May 28 '15 at 9:17











  • I use Ubuntu-Studio 16.04 LTS and I installed the swh-plugins package, but... the lines: "pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,5,9,3,0,0 pacmd set-default-sink compressor" don't work. It isn't a parameters issue because the system gives me the error: "Module not found". So... something is missed from the plugin package, but... What???

    – Juan
    Sep 20 '17 at 2:25





















4














I recommend Pulse Effects. It's an application, where you have lots of tools to manipulate sound system-wide (includes compressor). Pretty easy to use.



For me this setup works best in movies:
enter image description here






share|improve this answer

































    3














    These have been extremely helpful. Thank you for the inspiration. Although it is imperfect at the moment, I have a bit to contribute back. I looked in The Steve Harris Documentation to find that there are several flavors of the compressor, and I chose to use the stereo one. It did complicate using Pulse Audio Volume Control to place the compressor on multiple applications like Chrome and VLC, but I like the result. My motivation for using a compressor is to place a very strict lower and upper limit on volume. In order to not wake anyone in the house late at night, I didn't want to be constantly turning up the volume to hear the characters speaking in media, only to rush to turn it back down whenever superhero action happens or a commercial comes on. I followed the inspiration here and adjusted the values in realtime. Then I took my desired values and put them back into the sample code. In sum, the sample code I am contributing shamelessly borrows from the above example, but features the stereo compressor with a pretty strict upper and lower volume limit. Lastly, I put it into the form of a script, which is not fully working. It does not like the set_default line. I hope this is useful to the community.



    #!/bin/sh
    # ComperssorScript.sh
    # Script to start PulseAudio Compressor with desired settings
    # Original: 2016 September 17

    pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=9,5,63,-6,15,3,49
    set-default-sink compressor

    # The parameters (the control=1,1.5,401,-30,20,5,12 for example) for this compressor are described in Steve Harris' LADSPA Plugin Docs:
    # RMS/peak: The balance between the RMS and peak envelope followers. RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.
    # 9, Attack time (ms): The attack time in milliseconds.
    # 5, Release time (ms): The release time in milliseconds.
    # 63, Threshold level (dB): The point at which the compressor will start to kick in.
    # 6, Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.
    # -15, Knee radius (dB): The distance from the threshold where the knee curve starts.
    # 3, Makeup gain (dB): Controls the gain of the makeup input signal in dB's.
    # 49, Amplitude (dB): The level of the input signal, in decibels.
    # no value was placed here
    # Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.
    # Due to a limitation of PulseAudio, it is not possible to adjust them in real time.
    # no value was placed here





    share|improve this answer


























    • In my analysis of <github.com/swh/ladspa/blob/master/sc4_1882.xml#L116> it seems like there are some ranges applied to the parameters. It looks like your example is a bit out of range on some of the parameters. Since the documentation - from the author Steve Harris - is rather thin and lacking examples, I could be completely wrong.

      – Ale
      Aug 1 '17 at 22:40



















    0














    Here is the stereo plugin with better control settings (Much less clipping) following ændrük's answer that uses the mono plugin example.



    load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,300,-20,3,1,10





    share|improve this answer


























    • your extample still do clip aon my notebook setup. gotbletu on google+ once recommended using this settings, and they worked best for me so far. load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12

      – Axel Werner
      Jun 22 '18 at 5:24














    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f31580%2fis-there-a-way-of-leveling-compressing-the-sound-system-wide%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    16














    I had success with the example shown in this answer.





    1. Install Steve Harris's LADSPA plugins Install swh-plugins



      sudo apt install swh-plugins



    2. Run pacmd and then this commands:



      load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
      set-default-sink compressor



    This answer explains how to load the plugin permanently.





    The parameters (the control=1,1.5,401,-30,20,5,12 part above) for this compressor are described in Steve Harris' LADSPA Plugin Docs:






    1. RMS/peak: The balance between the RMS and peak envelope followers.RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.


    2. Attack time (ms): The attack time in milliseconds.


    3. Release time (ms): The release time in milliseconds.


    4. Threshold level (dB): The point at which the compressor will start to kick in.


    5. Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.


    6. Knee radius (dB): The distance from the threshold where the knee curve starts.


    7. Makeup gain (dB): Controls the gain of the makeup input signal in dB's.


    8. Amplitude (dB): The level of the input signal, in decibels.


    9. Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.




    Due to a limitation of PulseAudio, it is not possible to adjust them in real time.



    To experiment with different parameters, I also loaded the compressor as a real-time adjustable ALSA plugin via Alsaequal Install libasound2-plugin-equal by creating the following ~/.asoundrc:



    ctl.compressor {
    type equal;
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.plugcompressor {
    type equal;
    slave.pcm "plug:pulse";
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.compressor {
    type plug;
    slave.pcm plugcompressor;
    }


    A sample MP3 file can be played through the compressor using mpg321 Install mpg321,



    mpg321 -a hw:compressor "04 - Love Song for Yoshimi.mp3"


    while alsamixer -D compressor can be used to adjust parameters in real-time.






    share|improve this answer


























    • If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_equal.so on Ubuntu 14.10 try apt-get install libasound2-plugin-equal

      – Stéphane Gourichon
      May 28 '15 at 9:17











    • I use Ubuntu-Studio 16.04 LTS and I installed the swh-plugins package, but... the lines: "pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,5,9,3,0,0 pacmd set-default-sink compressor" don't work. It isn't a parameters issue because the system gives me the error: "Module not found". So... something is missed from the plugin package, but... What???

      – Juan
      Sep 20 '17 at 2:25


















    16














    I had success with the example shown in this answer.





    1. Install Steve Harris's LADSPA plugins Install swh-plugins



      sudo apt install swh-plugins



    2. Run pacmd and then this commands:



      load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
      set-default-sink compressor



    This answer explains how to load the plugin permanently.





    The parameters (the control=1,1.5,401,-30,20,5,12 part above) for this compressor are described in Steve Harris' LADSPA Plugin Docs:






    1. RMS/peak: The balance between the RMS and peak envelope followers.RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.


    2. Attack time (ms): The attack time in milliseconds.


    3. Release time (ms): The release time in milliseconds.


    4. Threshold level (dB): The point at which the compressor will start to kick in.


    5. Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.


    6. Knee radius (dB): The distance from the threshold where the knee curve starts.


    7. Makeup gain (dB): Controls the gain of the makeup input signal in dB's.


    8. Amplitude (dB): The level of the input signal, in decibels.


    9. Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.




    Due to a limitation of PulseAudio, it is not possible to adjust them in real time.



    To experiment with different parameters, I also loaded the compressor as a real-time adjustable ALSA plugin via Alsaequal Install libasound2-plugin-equal by creating the following ~/.asoundrc:



    ctl.compressor {
    type equal;
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.plugcompressor {
    type equal;
    slave.pcm "plug:pulse";
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.compressor {
    type plug;
    slave.pcm plugcompressor;
    }


    A sample MP3 file can be played through the compressor using mpg321 Install mpg321,



    mpg321 -a hw:compressor "04 - Love Song for Yoshimi.mp3"


    while alsamixer -D compressor can be used to adjust parameters in real-time.






    share|improve this answer


























    • If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_equal.so on Ubuntu 14.10 try apt-get install libasound2-plugin-equal

      – Stéphane Gourichon
      May 28 '15 at 9:17











    • I use Ubuntu-Studio 16.04 LTS and I installed the swh-plugins package, but... the lines: "pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,5,9,3,0,0 pacmd set-default-sink compressor" don't work. It isn't a parameters issue because the system gives me the error: "Module not found". So... something is missed from the plugin package, but... What???

      – Juan
      Sep 20 '17 at 2:25
















    16












    16








    16







    I had success with the example shown in this answer.





    1. Install Steve Harris's LADSPA plugins Install swh-plugins



      sudo apt install swh-plugins



    2. Run pacmd and then this commands:



      load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
      set-default-sink compressor



    This answer explains how to load the plugin permanently.





    The parameters (the control=1,1.5,401,-30,20,5,12 part above) for this compressor are described in Steve Harris' LADSPA Plugin Docs:






    1. RMS/peak: The balance between the RMS and peak envelope followers.RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.


    2. Attack time (ms): The attack time in milliseconds.


    3. Release time (ms): The release time in milliseconds.


    4. Threshold level (dB): The point at which the compressor will start to kick in.


    5. Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.


    6. Knee radius (dB): The distance from the threshold where the knee curve starts.


    7. Makeup gain (dB): Controls the gain of the makeup input signal in dB's.


    8. Amplitude (dB): The level of the input signal, in decibels.


    9. Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.




    Due to a limitation of PulseAudio, it is not possible to adjust them in real time.



    To experiment with different parameters, I also loaded the compressor as a real-time adjustable ALSA plugin via Alsaequal Install libasound2-plugin-equal by creating the following ~/.asoundrc:



    ctl.compressor {
    type equal;
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.plugcompressor {
    type equal;
    slave.pcm "plug:pulse";
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.compressor {
    type plug;
    slave.pcm plugcompressor;
    }


    A sample MP3 file can be played through the compressor using mpg321 Install mpg321,



    mpg321 -a hw:compressor "04 - Love Song for Yoshimi.mp3"


    while alsamixer -D compressor can be used to adjust parameters in real-time.






    share|improve this answer















    I had success with the example shown in this answer.





    1. Install Steve Harris's LADSPA plugins Install swh-plugins



      sudo apt install swh-plugins



    2. Run pacmd and then this commands:



      load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
      set-default-sink compressor



    This answer explains how to load the plugin permanently.





    The parameters (the control=1,1.5,401,-30,20,5,12 part above) for this compressor are described in Steve Harris' LADSPA Plugin Docs:






    1. RMS/peak: The balance between the RMS and peak envelope followers.RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.


    2. Attack time (ms): The attack time in milliseconds.


    3. Release time (ms): The release time in milliseconds.


    4. Threshold level (dB): The point at which the compressor will start to kick in.


    5. Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.


    6. Knee radius (dB): The distance from the threshold where the knee curve starts.


    7. Makeup gain (dB): Controls the gain of the makeup input signal in dB's.


    8. Amplitude (dB): The level of the input signal, in decibels.


    9. Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.




    Due to a limitation of PulseAudio, it is not possible to adjust them in real time.



    To experiment with different parameters, I also loaded the compressor as a real-time adjustable ALSA plugin via Alsaequal Install libasound2-plugin-equal by creating the following ~/.asoundrc:



    ctl.compressor {
    type equal;
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.plugcompressor {
    type equal;
    slave.pcm "plug:pulse";
    library "/usr/lib/ladspa/sc4m_1916.so";
    module "sc4m";
    }

    pcm.compressor {
    type plug;
    slave.pcm plugcompressor;
    }


    A sample MP3 file can be played through the compressor using mpg321 Install mpg321,



    mpg321 -a hw:compressor "04 - Love Song for Yoshimi.mp3"


    while alsamixer -D compressor can be used to adjust parameters in real-time.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 8 mins ago









    Pablo Bianchi

    3,12521636




    3,12521636










    answered May 20 '11 at 5:39









    ændrükændrük

    42.4k61195343




    42.4k61195343













    • If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_equal.so on Ubuntu 14.10 try apt-get install libasound2-plugin-equal

      – Stéphane Gourichon
      May 28 '15 at 9:17











    • I use Ubuntu-Studio 16.04 LTS and I installed the swh-plugins package, but... the lines: "pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,5,9,3,0,0 pacmd set-default-sink compressor" don't work. It isn't a parameters issue because the system gives me the error: "Module not found". So... something is missed from the plugin package, but... What???

      – Juan
      Sep 20 '17 at 2:25





















    • If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_equal.so on Ubuntu 14.10 try apt-get install libasound2-plugin-equal

      – Stéphane Gourichon
      May 28 '15 at 9:17











    • I use Ubuntu-Studio 16.04 LTS and I installed the swh-plugins package, but... the lines: "pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,5,9,3,0,0 pacmd set-default-sink compressor" don't work. It isn't a parameters issue because the system gives me the error: "Module not found". So... something is missed from the plugin package, but... What???

      – Juan
      Sep 20 '17 at 2:25



















    If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_equal.so on Ubuntu 14.10 try apt-get install libasound2-plugin-equal

    – Stéphane Gourichon
    May 28 '15 at 9:17





    If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_ctl_equal.so on Ubuntu 14.10 try apt-get install libasound2-plugin-equal

    – Stéphane Gourichon
    May 28 '15 at 9:17













    I use Ubuntu-Studio 16.04 LTS and I installed the swh-plugins package, but... the lines: "pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,5,9,3,0,0 pacmd set-default-sink compressor" don't work. It isn't a parameters issue because the system gives me the error: "Module not found". So... something is missed from the plugin package, but... What???

    – Juan
    Sep 20 '17 at 2:25







    I use Ubuntu-Studio 16.04 LTS and I installed the swh-plugins package, but... the lines: "pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,5,9,3,0,0 pacmd set-default-sink compressor" don't work. It isn't a parameters issue because the system gives me the error: "Module not found". So... something is missed from the plugin package, but... What???

    – Juan
    Sep 20 '17 at 2:25















    4














    I recommend Pulse Effects. It's an application, where you have lots of tools to manipulate sound system-wide (includes compressor). Pretty easy to use.



    For me this setup works best in movies:
    enter image description here






    share|improve this answer






























      4














      I recommend Pulse Effects. It's an application, where you have lots of tools to manipulate sound system-wide (includes compressor). Pretty easy to use.



      For me this setup works best in movies:
      enter image description here






      share|improve this answer




























        4












        4








        4







        I recommend Pulse Effects. It's an application, where you have lots of tools to manipulate sound system-wide (includes compressor). Pretty easy to use.



        For me this setup works best in movies:
        enter image description here






        share|improve this answer















        I recommend Pulse Effects. It's an application, where you have lots of tools to manipulate sound system-wide (includes compressor). Pretty easy to use.



        For me this setup works best in movies:
        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 17 '18 at 10:50

























        answered Sep 15 '18 at 21:19









        kujawkujaw

        916




        916























            3














            These have been extremely helpful. Thank you for the inspiration. Although it is imperfect at the moment, I have a bit to contribute back. I looked in The Steve Harris Documentation to find that there are several flavors of the compressor, and I chose to use the stereo one. It did complicate using Pulse Audio Volume Control to place the compressor on multiple applications like Chrome and VLC, but I like the result. My motivation for using a compressor is to place a very strict lower and upper limit on volume. In order to not wake anyone in the house late at night, I didn't want to be constantly turning up the volume to hear the characters speaking in media, only to rush to turn it back down whenever superhero action happens or a commercial comes on. I followed the inspiration here and adjusted the values in realtime. Then I took my desired values and put them back into the sample code. In sum, the sample code I am contributing shamelessly borrows from the above example, but features the stereo compressor with a pretty strict upper and lower volume limit. Lastly, I put it into the form of a script, which is not fully working. It does not like the set_default line. I hope this is useful to the community.



            #!/bin/sh
            # ComperssorScript.sh
            # Script to start PulseAudio Compressor with desired settings
            # Original: 2016 September 17

            pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=9,5,63,-6,15,3,49
            set-default-sink compressor

            # The parameters (the control=1,1.5,401,-30,20,5,12 for example) for this compressor are described in Steve Harris' LADSPA Plugin Docs:
            # RMS/peak: The balance between the RMS and peak envelope followers. RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.
            # 9, Attack time (ms): The attack time in milliseconds.
            # 5, Release time (ms): The release time in milliseconds.
            # 63, Threshold level (dB): The point at which the compressor will start to kick in.
            # 6, Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.
            # -15, Knee radius (dB): The distance from the threshold where the knee curve starts.
            # 3, Makeup gain (dB): Controls the gain of the makeup input signal in dB's.
            # 49, Amplitude (dB): The level of the input signal, in decibels.
            # no value was placed here
            # Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.
            # Due to a limitation of PulseAudio, it is not possible to adjust them in real time.
            # no value was placed here





            share|improve this answer


























            • In my analysis of <github.com/swh/ladspa/blob/master/sc4_1882.xml#L116> it seems like there are some ranges applied to the parameters. It looks like your example is a bit out of range on some of the parameters. Since the documentation - from the author Steve Harris - is rather thin and lacking examples, I could be completely wrong.

              – Ale
              Aug 1 '17 at 22:40
















            3














            These have been extremely helpful. Thank you for the inspiration. Although it is imperfect at the moment, I have a bit to contribute back. I looked in The Steve Harris Documentation to find that there are several flavors of the compressor, and I chose to use the stereo one. It did complicate using Pulse Audio Volume Control to place the compressor on multiple applications like Chrome and VLC, but I like the result. My motivation for using a compressor is to place a very strict lower and upper limit on volume. In order to not wake anyone in the house late at night, I didn't want to be constantly turning up the volume to hear the characters speaking in media, only to rush to turn it back down whenever superhero action happens or a commercial comes on. I followed the inspiration here and adjusted the values in realtime. Then I took my desired values and put them back into the sample code. In sum, the sample code I am contributing shamelessly borrows from the above example, but features the stereo compressor with a pretty strict upper and lower volume limit. Lastly, I put it into the form of a script, which is not fully working. It does not like the set_default line. I hope this is useful to the community.



            #!/bin/sh
            # ComperssorScript.sh
            # Script to start PulseAudio Compressor with desired settings
            # Original: 2016 September 17

            pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=9,5,63,-6,15,3,49
            set-default-sink compressor

            # The parameters (the control=1,1.5,401,-30,20,5,12 for example) for this compressor are described in Steve Harris' LADSPA Plugin Docs:
            # RMS/peak: The balance between the RMS and peak envelope followers. RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.
            # 9, Attack time (ms): The attack time in milliseconds.
            # 5, Release time (ms): The release time in milliseconds.
            # 63, Threshold level (dB): The point at which the compressor will start to kick in.
            # 6, Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.
            # -15, Knee radius (dB): The distance from the threshold where the knee curve starts.
            # 3, Makeup gain (dB): Controls the gain of the makeup input signal in dB's.
            # 49, Amplitude (dB): The level of the input signal, in decibels.
            # no value was placed here
            # Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.
            # Due to a limitation of PulseAudio, it is not possible to adjust them in real time.
            # no value was placed here





            share|improve this answer


























            • In my analysis of <github.com/swh/ladspa/blob/master/sc4_1882.xml#L116> it seems like there are some ranges applied to the parameters. It looks like your example is a bit out of range on some of the parameters. Since the documentation - from the author Steve Harris - is rather thin and lacking examples, I could be completely wrong.

              – Ale
              Aug 1 '17 at 22:40














            3












            3








            3







            These have been extremely helpful. Thank you for the inspiration. Although it is imperfect at the moment, I have a bit to contribute back. I looked in The Steve Harris Documentation to find that there are several flavors of the compressor, and I chose to use the stereo one. It did complicate using Pulse Audio Volume Control to place the compressor on multiple applications like Chrome and VLC, but I like the result. My motivation for using a compressor is to place a very strict lower and upper limit on volume. In order to not wake anyone in the house late at night, I didn't want to be constantly turning up the volume to hear the characters speaking in media, only to rush to turn it back down whenever superhero action happens or a commercial comes on. I followed the inspiration here and adjusted the values in realtime. Then I took my desired values and put them back into the sample code. In sum, the sample code I am contributing shamelessly borrows from the above example, but features the stereo compressor with a pretty strict upper and lower volume limit. Lastly, I put it into the form of a script, which is not fully working. It does not like the set_default line. I hope this is useful to the community.



            #!/bin/sh
            # ComperssorScript.sh
            # Script to start PulseAudio Compressor with desired settings
            # Original: 2016 September 17

            pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=9,5,63,-6,15,3,49
            set-default-sink compressor

            # The parameters (the control=1,1.5,401,-30,20,5,12 for example) for this compressor are described in Steve Harris' LADSPA Plugin Docs:
            # RMS/peak: The balance between the RMS and peak envelope followers. RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.
            # 9, Attack time (ms): The attack time in milliseconds.
            # 5, Release time (ms): The release time in milliseconds.
            # 63, Threshold level (dB): The point at which the compressor will start to kick in.
            # 6, Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.
            # -15, Knee radius (dB): The distance from the threshold where the knee curve starts.
            # 3, Makeup gain (dB): Controls the gain of the makeup input signal in dB's.
            # 49, Amplitude (dB): The level of the input signal, in decibels.
            # no value was placed here
            # Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.
            # Due to a limitation of PulseAudio, it is not possible to adjust them in real time.
            # no value was placed here





            share|improve this answer















            These have been extremely helpful. Thank you for the inspiration. Although it is imperfect at the moment, I have a bit to contribute back. I looked in The Steve Harris Documentation to find that there are several flavors of the compressor, and I chose to use the stereo one. It did complicate using Pulse Audio Volume Control to place the compressor on multiple applications like Chrome and VLC, but I like the result. My motivation for using a compressor is to place a very strict lower and upper limit on volume. In order to not wake anyone in the house late at night, I didn't want to be constantly turning up the volume to hear the characters speaking in media, only to rush to turn it back down whenever superhero action happens or a commercial comes on. I followed the inspiration here and adjusted the values in realtime. Then I took my desired values and put them back into the sample code. In sum, the sample code I am contributing shamelessly borrows from the above example, but features the stereo compressor with a pretty strict upper and lower volume limit. Lastly, I put it into the form of a script, which is not fully working. It does not like the set_default line. I hope this is useful to the community.



            #!/bin/sh
            # ComperssorScript.sh
            # Script to start PulseAudio Compressor with desired settings
            # Original: 2016 September 17

            pacmd load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=9,5,63,-6,15,3,49
            set-default-sink compressor

            # The parameters (the control=1,1.5,401,-30,20,5,12 for example) for this compressor are described in Steve Harris' LADSPA Plugin Docs:
            # RMS/peak: The balance between the RMS and peak envelope followers. RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.
            # 9, Attack time (ms): The attack time in milliseconds.
            # 5, Release time (ms): The release time in milliseconds.
            # 63, Threshold level (dB): The point at which the compressor will start to kick in.
            # 6, Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.
            # -15, Knee radius (dB): The distance from the threshold where the knee curve starts.
            # 3, Makeup gain (dB): Controls the gain of the makeup input signal in dB's.
            # 49, Amplitude (dB): The level of the input signal, in decibels.
            # no value was placed here
            # Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.
            # Due to a limitation of PulseAudio, it is not possible to adjust them in real time.
            # no value was placed here






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 16 mins ago









            Pablo Bianchi

            3,12521636




            3,12521636










            answered Sep 18 '16 at 5:47









            ShoNuffShoNuff

            311




            311













            • In my analysis of <github.com/swh/ladspa/blob/master/sc4_1882.xml#L116> it seems like there are some ranges applied to the parameters. It looks like your example is a bit out of range on some of the parameters. Since the documentation - from the author Steve Harris - is rather thin and lacking examples, I could be completely wrong.

              – Ale
              Aug 1 '17 at 22:40



















            • In my analysis of <github.com/swh/ladspa/blob/master/sc4_1882.xml#L116> it seems like there are some ranges applied to the parameters. It looks like your example is a bit out of range on some of the parameters. Since the documentation - from the author Steve Harris - is rather thin and lacking examples, I could be completely wrong.

              – Ale
              Aug 1 '17 at 22:40

















            In my analysis of <github.com/swh/ladspa/blob/master/sc4_1882.xml#L116> it seems like there are some ranges applied to the parameters. It looks like your example is a bit out of range on some of the parameters. Since the documentation - from the author Steve Harris - is rather thin and lacking examples, I could be completely wrong.

            – Ale
            Aug 1 '17 at 22:40





            In my analysis of <github.com/swh/ladspa/blob/master/sc4_1882.xml#L116> it seems like there are some ranges applied to the parameters. It looks like your example is a bit out of range on some of the parameters. Since the documentation - from the author Steve Harris - is rather thin and lacking examples, I could be completely wrong.

            – Ale
            Aug 1 '17 at 22:40











            0














            Here is the stereo plugin with better control settings (Much less clipping) following ændrük's answer that uses the mono plugin example.



            load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,300,-20,3,1,10





            share|improve this answer


























            • your extample still do clip aon my notebook setup. gotbletu on google+ once recommended using this settings, and they worked best for me so far. load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12

              – Axel Werner
              Jun 22 '18 at 5:24


















            0














            Here is the stereo plugin with better control settings (Much less clipping) following ændrük's answer that uses the mono plugin example.



            load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,300,-20,3,1,10





            share|improve this answer


























            • your extample still do clip aon my notebook setup. gotbletu on google+ once recommended using this settings, and they worked best for me so far. load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12

              – Axel Werner
              Jun 22 '18 at 5:24
















            0












            0








            0







            Here is the stereo plugin with better control settings (Much less clipping) following ændrük's answer that uses the mono plugin example.



            load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,300,-20,3,1,10





            share|improve this answer















            Here is the stereo plugin with better control settings (Much less clipping) following ændrük's answer that uses the mono plugin example.



            load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,300,-20,3,1,10






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 17 '17 at 14:59









            Zanna

            51.3k13140243




            51.3k13140243










            answered Nov 17 '17 at 10:37









            RootCookieRootCookie

            11




            11













            • your extample still do clip aon my notebook setup. gotbletu on google+ once recommended using this settings, and they worked best for me so far. load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12

              – Axel Werner
              Jun 22 '18 at 5:24





















            • your extample still do clip aon my notebook setup. gotbletu on google+ once recommended using this settings, and they worked best for me so far. load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12

              – Axel Werner
              Jun 22 '18 at 5:24



















            your extample still do clip aon my notebook setup. gotbletu on google+ once recommended using this settings, and they worked best for me so far. load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12

            – Axel Werner
            Jun 22 '18 at 5:24







            your extample still do clip aon my notebook setup. gotbletu on google+ once recommended using this settings, and they worked best for me so far. load-module module-ladspa-sink sink_name=compressor plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12

            – Axel Werner
            Jun 22 '18 at 5:24




















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f31580%2fis-there-a-way-of-leveling-compressing-the-sound-system-wide%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

            Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

            Simple Scan not detecting my scanner (Brother DCP-7055W)Brother MFC-L2700DW printer can print, can't...