Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loudness equalization like on Windows? #621

Closed
ghost opened this issue Jan 30, 2020 · 24 comments
Closed

Loudness equalization like on Windows? #621

ghost opened this issue Jan 30, 2020 · 24 comments

Comments

@ghost
Copy link

ghost commented Jan 30, 2020

Is it possible to turn on dynamic loudness equalization, like on Windows? I tried "Loudness" and "Multiband Compressor", it doesn't seem to do what I want.

@wwmm
Copy link
Owner

wwmm commented Jan 30, 2020

I do not use Windows but based on the description what they seem to be doing is dynamic range compression. Our Loudness plugin does something else https://en.wikipedia.org/wiki/Equal-loudness_contour. What you want could be achieved with one of the following plugins: compressor, multiband compressor or the maximizer. The trick is to find out which parameters will lead to results similar to what Windows is offering in its compressor. I have no idea. Do you have any insight on how to do this @boomshop ?

@boomshop
Copy link

As Wellington already pointed out, Loudness, if implemented like standard, raises/lowers different frequency ranges according to the volume to always give the same impression of frequency distribution regardless of the volume set on the device. This means lower volume levels raise bass and high frequencies since the ear is not as sensitive to those ranges as on higher levels.

Although I haven't heard what Windows is doing to the signal, it seems to be a compressor (maybe a multiband compressor) followed by a limiter. The limiter is needed to prevent from crackling sounds, distortions and physical damage to your speakers, since the compressor has most probably very long attack and release times set.

Generally speaking, a compressor monitors the signal. Having the input below the threshold nothing happens. As soon as the signal raises above that threshold, the signal is lowered by the compressor. At this point attack and release times are important. In a recording studio compressors tend to have comparably quite fast attack and release times, for this task they tend to be higher. Attack defines the amount of time the signal has to be above the threshold for the compressor to reach full compression. Higher time settings mean the signal isn't lowered hastily. Release hits in as soon as the signal falls below the threshold again and defines the amount of time the compressor needs to come back to normal (unmodified) operation. The ratio defines the maximum amount of compression, higher ratios reduce the signal more drastic than lower settings. The makeup setting then raises the signal statically to make up the reduced volume. This way, loud sounds are reduced and the overall signal is amplified afterwards -> quiet sounds become louder.

Multiband compressors split the signal into different frequency ranges first, operating on them exclusively. This means that e.g. a loud detonation in a movie doesn't affect the level of high pitched sounds and vice versa.

This as a general explanation for understanding the settings. Since, as I said, I haven't heard the Windows DSP I cannot give the exact settings, you have to test to get to a result.

Try some higher settings on attack and release and start with the compressor. But don't forget to add a limiter after the compressor, before starting to raise the signal with the makeup setting in the compressor. Otherwise you might damage your speakers. Try input=0dB, limit=-1dB, lookahead=2ms, release=8ms, oversampling=4, ASC=0.5 on the limiter. Try attack=500ms, release=1500ms, threshold=-20dB, ratio=4:1 on the compressor. Watch the reduction meter and set makeup according to it. Try with different signals - movies, songs, podcasts and the like. Leave the limiter as is and play with attack if the compressor acts too fast, release if the reduction stays for too long and ratio if the reduction is not enough/too much. Remember to watch reduction and set makeup accordingly afterwards.

@Digitalone1
Copy link
Contributor

Digitalone1 commented Jan 30, 2020

Hello @avemilia

Try normalizer preset on my repository

Maybe it's a good starting point to find what you are looking for. :)

@ghost
Copy link
Author

ghost commented Jan 31, 2020

Thanks for the answers! Especially @boomshop.

@Digitalone1 I have tried your presets but felt like the sound becomes too "botched" and sounds a bit like it's from the cave. But based on your multiband compressor settings and @boomshop's explanation of settings I've tried to come up with compressor settings that sounded "better" to my ear.

I almost solely use Windows loudness equalization for podcasts (different people have different microphone volumes and volume jumps; annoying) and FPS games (boosts quiet noise like footsteps). But testing on Metallica albums (so mostly making "sharp" noises quieter), these settings seemed okay:
Screenshot_20200131_051318
Screenshot_20200131_051407
Screenshot_20200131_051645

I will also test it further with podcasts, it's just that it is hard to distinguish a difference in a podcast when changing settings.

Feel free to close the issue when necessary.

UPD0: I have to say that I mostly don't know what I'm doing, so take the above with a grain of salt.
UPD1: In my case makeup should be around 30 (instead of 20) to omit volume jumps when turning the effects on/off

@Digitalone1
Copy link
Contributor

Digitalone1 commented Jan 31, 2020

@Digitalone1 I have tried your presets but felt like the sound becomes too "botched" and sounds a bit like it's from the cave.

Did you try all three presets or one in particular?

Try also normalizer with makeup +2 rather than 0 in midband. ;)

Anyway, your preset is very hard, especially 3 seconds of release.

@boomshop
Copy link

Anyway, your preset is very hard, especially 3 seconds of release.

For leveling 3 seconds doesn't sound unusual to me, I'd say.

@Digitalone1
Copy link
Contributor

For leveling 3 seconds doesn't sound unusual to me, I'd say.

I'm a little bit confused. All tutorials on compression I read, said a release of 500 ms is already very high. Your guide on laptops suggested 300 ms of release on sub-band in multiband compressor and minor values in other bands.

@boomshop
Copy link

There's lots of different use cases for compression, e.g. for ducking even higher values are possible (with higher attack times, too). But you're right, normally compression acts faster than in this particular use case. In my tutorial I'm doing more "general" compression, not so much leveling.

@Digitalone1
Copy link
Contributor

In my experience with compression on PE, higher the release, worse the sound. So I never tried so much with high values.

The only case where the sound plays better to me on high release is maximizer, but it acts in a different way.

@ghost
Copy link
Author

ghost commented Jan 31, 2020

I don't remember if it's the release setting, but I remember having issues with "pulsating" sound volume (e.g. lonesome bass drum "dipped" the volume, which would come back to normal level after some time), and I think increasing release helped to overcome it.

Also, I've noticed in multiband compressor knee (whatever that means) can be set to positive values, while in regular compressor it can only be 0 (-6 by default). You have positive values in your preset, so 0 seemed to work better than negative values. And also a bit higher ratio.

Regarding attack and release, after reading some articles I just know that I need fast attack and slow release, but how fast and how slow? Well, I went for extreme values :)

@Digitalone1
Copy link
Contributor

Also, I've noticed in multiband compressor knee (whatever that means) can be set to positive values, while in regular compressor it can only be 0 (-6 by default).

This image explains it well.

I think 0 is hard knee. Higher (absolute) values should be more soft.

@Digitalone1
Copy link
Contributor

Digitalone1 commented Jan 31, 2020

I'm doing some tests. It's true that longer release gives a more steady level, but I also noticed that Peak detection gives an higher volume/loudness in contrast to RMS. Maybe in order to "normalize", it's preferable.

Maximum release of multiband compressor is 2 sec, while sidechain compressor is 3 sec.

@Digitalone1
Copy link
Contributor

Digitalone1 commented Feb 7, 2020

@avemilia

I changed my preset with a new one that should be more similar to the "loudness equalization" shipped with Windows. Give it a try.

@seedship
Copy link

What about Auto Gain? It makes it so softer sound is made louder and louder sound is made softer

@wwmm
Copy link
Owner

wwmm commented Feb 25, 2020

Although the auto gain can change the dynamic range it is not the same as using a compressor. The compressor reduces the amplitude of signals above a threshold and does not touch the ones below. If it is a multiband compressor you can do that in a different way for each frequency range. The auto gain multiplies everything in the audio buffer by the same factor. And the changes to the dynamic range are usually on a larger time scale when compared to the attack/release times usually seen when people configure a compressor. On long classical music it is easy to notice that the auto gain is changing the dynamic range. On other styles those changes are more subtle.

@Mlocik97
Copy link
Contributor

Mlocik97 commented Jun 26, 2020

@wwmm AutoGain is propably worse for dynamic range, but subsequently loudness range can be restored easier, after processing. Yes, it depend on settings, but it's much harder to set Compresor than Autogain to have similiar result, if we want to use it as normalizer.

@sadko4u
Copy link

sadko4u commented Jul 29, 2020

@wwmm
LSP Plugins have loudness compensation contours implementation since 1.1.24.
lsp-plugins/lsp-plugins#81

This will be a bit reworked in further releases but is already ready for use.

@wwmm
Copy link
Owner

wwmm commented Jul 30, 2020

Hi @sadko4u

Interesting. At this moment the MDA loudness plugin is used in PulseEffects:

http://mda.smartelectronix.com/vst/help/loudness.htm
https://gitlab.com/drobilla/mda-lv2/-/blob/master/src/mdaLoudness.cpp

Based on its docs it seems to be correcting only the bass. Is that the difference when comparing to your new plugin?

@Digitalone1
Copy link
Contributor

The lsp one seems more complete referring to different standards.

lsp-plugins/lsp-plugins#81

@ghost
Copy link
Author

ghost commented Aug 4, 2020

LSP Plugins have loudness compensation contours implementation since 1.1.24.

The description says

Implemented Loudness Compensator plugin series (Mono and Stereo).

I have installed the new version of lsp-plugins, but I don't see "Loudness Compensator" in Pulseeffects. How can I try it out?

@Digitalone1
Copy link
Contributor

It's not used by PulseEffects, but could be implemented in the future replacing the actual Loudness plugin.

Another interesting plugin to implement could be the surge filter to avoid initial popping sound in upward compressor.

@wwmm
Copy link
Owner

wwmm commented Aug 4, 2020

This week I will do a few tests with the new loudness plugin.

@wwmm
Copy link
Owner

wwmm commented Aug 4, 2020

I decided to make the move to the new Linux Studio plugin. It is in the master branch. But besides the fact I do not know yet when I will make the next release the plugin documentation still has to be fixed.

@wwmm
Copy link
Owner

wwmm commented Aug 15, 2020

I guess we are as close to the windows loudness equalization as we could be. The plugins are there now it is just a matter of finding the "correct parameters" to mimic its behavior.

@wwmm wwmm closed this as completed Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants