Add a Loudness Normalizer by default

Hello Manjaroos,

what do you think about to include a loudness normalizer by default to provide a even more awesome experience on Manjaro out of the box?

required steps:

  • Include swh-plugins(community) in the default ISO
  • Change /etc/pulse/default.pa to include either mono or stereo normalization at the end of the file:

Mono Normalization:
### PulseAudio Dynamic Range Compression
.ifexists module-ladspa-sink.so
.nofail
load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
.fail
.endif

Stereo Normalization:
### PulseAudio Dynamic Range Compression
.ifexists module-ladspa-sink.so
.nofail
load-module module-ladspa-sink sink_name=compressor-stereo plugin=sc4_1882 label=sc4 control=1,1.5,401,-30,20,5,12
.fail
.endif

The benefit would be to have added another sound output method which can be used to get a volume normalization for all applications.

Update: I have added the configuration for Stereo Normalization after testing it successfully over the last view months.

4 Likes

Does anyone know why the mono C4 compressor is used?

Why not the stereo C4 (sc4_1882).

http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html#tth_sEc2.91

And does someone know how the control numbers relate to the options listed under the C4 Mono compressor?

http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html#tth_sEc2.92

5 Likes

I’d always leave it off by default myself just like I do with all other apps (Spotify for example), but could be nice for others.

2 Likes

You have to install pulseaudio-equalizer-ladspa too:

4 Likes

Wouldn’t it just be easier to use Linux media players that support this already. I believe the better players include volume normalization.

1 Like

It’d help in other cases too though, like through a program, web browser, or game (assuming).

3 Likes

I don’t see the need to include this as default. Few systems need it IMHO. For example, I use an equalizer or my desktop because it has lousy speakers, but I don’t need it in any other machine I use. It would be just another service taking up RAM for nothing.

5 Likes

I can’t see any difference in RAM usage with the above described method, and if there is one, it’s not noticeable.

1 Like

According to the guy who provides this config on Github it’s like this:

    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.

He also points to Steve Harris’ LADSPA Plugin Docs.

1 Like

Maybe it isn’t noticeable RAM wise, but it surely consumes more CPU. I just don’t see the benefit of including it by default. The option is there for who ever wants it. I think tuning pulseaudio to the best audio capabilities of the machine would be a better effort. Many times poor audio quality can be solved like that, because pulseaudio sets 16bit / 44100Hz by default.

1 Like

@mbb
I think this is slightly drifting off. The more CPU usage you talk about would be only noticeable if you active use this output (if at all), which should not be a default option for a sound output, but a option.

About the question if something is needed or not, well everyone has his/her own use cases, and here is one:

Please try to watch a live-stream with 5 or more people talking at the same time. You will most likely quit trying to config puslaudio because it’s imo a pita.

This would at least provide a sane default setting for those who don’t want to fiddle with pulse or don’t know how to do that manually. And you can switch every time back to the default settings without to mess it up.

1 Like

Hence setting it up by default in every Manjaro flavor. I wasn’t suggesting every user should do that manually.

Do you think this is a regular use case. How many users do you think have this kind of use?

I think otherwise. It is specifically related with sound quality. Setting pulseaudio correctly could even solve your stream problem.

I’ll refrain to repost on this topic anyway, as I’ve already expressed my opinion, which is what you really asked.

Sorry I think otherwise…

2 Likes

I would like to agree with you here, but I don’t see that happening.
Apart of that I would be interested to know if there are simply technical disadvantages you may have in mind which I don’t know of or didn’t think about.

I just don’t see a bad thing in having another option. :smiley:

1 Like

I’m not saying it a bad thing to implement, but I don’t see it being that useful to the average person. The only time I’d ever use that option is if I lived in a small apartment and noise late at night was a factor. Even then it’s not that great at making loud explosions etc significantly quieter in a movie. In this case I think you’re better off just turning the volume down low and enabling subtitles.

I find using the volume normalization option gives strange sounding audio when watching movies (and I never use it personally). Just my opinion, YMMV.

2 Likes

The only technical disadvantage I see is one more package potentially unneeded for most users and extra CPU cycles reducing battery life on laptops. But most importantly, I think using an equalizer is, in many cases, if not the most, just a workaround for a badly configured pulseaudio. With an equalizer you are effectively resampling the sound twice. One to resample to the equalizer’s settings, and a second to the pulseaudio’s/card’s settings. In fact, there can be even more resampling depending on the equalizer’s settings/complexity. Without the equalizer you only resample once. It doesn’t bother me on a desktop, but I definitely don’t want it on my laptop.

EDIT: I also find pulseaudio-equalizer (qpaeq) to be more reliable than other equalizers, but that could be my personal experience, as I didn’t pay much attention to it when I tried it on my desktop.

2 Likes

I agree with you that this should not be a default setting.

But please don’t mix an equalizer, like pulseaudio-equalizer, and a compression filter, like sc4m_1916 or sc4_1882. This are different things. The effect might be similar but they affect the audio in different ways.

I am not a expert but in simple words, a equalizer works on the frequencies, make them louder or moves them to other frequencies. But only on specific frequencies. That is the reason you have this many sliders on an equalizer.

A compression filter, on the other hand makes loud sounds quieter and quite sounds louder, so that the loudness of all signals equals more or less.

So a compressor doesn’t help with bad speakers, but it might help watching Action movies at night without waking everybody up and still understanding the bad dialogs.


2 Likes

You’re right, I’m mixing the concepts (I was thinking on a freq equalizer), but keep in mind those differences on movies are there because a) the movie was encoded with multi-channel support which isn’t available on the machine setup or b) you’re using the wrong output socket (namely HDMI) and can’t get the advantage of multi-channel. These problems mostly occur on pirated movies because only one “sound track” in encoded to reduce size. Either way, the option is there for anybody to use it.

2 Likes

You have all heard those adds that sound 10 times louder than anything else well that is compression and what it is used for, rock bands use it for that reason as well.

1 Like

That is true and maybe a movie isn’t the best example for the use of a compression filter.

I personally use this kind of filer on music playlist that contain older and newer music. Because for some reason newer CD’s are mixed louder than older one. Even form the same band and Genre. With this kind of filter I don’t need to reencode files and I don’t need to change the volume.

2 Likes

You are now talking about a normalise so what is this thread about 1 equalizer, 2 compressor, 3 normalise.
3 different concepts that do 3 different things don’t get them mixed up

2 Likes

Forum kindly sponsored by