• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Loudness compression, loudness wars.. What exactly it is and why is it happening?

Guermantes

Senior Member
Joined
Feb 19, 2018
Messages
486
Likes
562
Location
Brisbane, Australia
For those who may be interested in how the "dynamic range" (DR) is calculated at the Dynamic Range website, the algorithm is here.
Note, the banner at the site intimates that perhaps this algorithm has been retired?

The algorithm divides a track into 3 second buckets, calculates RMS and peak values for each bucket, then considers the top (loudest) 20% of the RMS signal range for its final output value.

It has been discussed elsewhere (maybe here too?) that this algorithm is more of a crest factor than a dynamic range indicator.
It's my understanding that, as such, it is more of a worst case figure.

Still, it is at least some figure of merit. As in, better than nothing.
And if it has had any influence in producers releasing less squashed tracks, IMO that's a very good thing.

That is different to the algorithm used to calculate the LU Range (LRA) in standard loudness meters -- I had thought they may be equivalent. The DR and LRA both use a 3 second window but the LRA has cascaded gating that eliminates quieter sounds from the calculation.

From the EBU tech note https://tech.ebu.ch/docs/tech/tech3342.pdf:
A cascaded gating scheme is employed which uses an absolute threshold of very low level, in combination with a relative threshold of higher, signal-dependent, level.

The purpose of the relative-threshold gating is to gate out any periods of silence or background sounds, using a method that is independent of any level-normalisation of the input signal. The lower edge of Loudness Range should not be defined by the noise floor (which may be inaudible), but should instead correspond to the weakest ‘real’ signal. The relative threshold is set to a level of −20 LU relative to the absolute-gated loudness level. The purpose of the absolute-threshold gate is to make the conversion from the relative threshold to an absolute level robust against longer periods of silence or low-level background noise. The absolute threshold is set to −70 LUFS, because no relevant signals are generally found below this loudness level.

It is noted that measurement of very short programmes, where leading or trailing silence is included, or of programmes consisting, for example, of isolated utterances, could result in misleadingly high values of LRA.

The application of the cascaded gating leaves only the loudness levels of the sliding-window blocks that contain foreground and (medium-level) background sounds, eliminating low-level signals, background noise, and silence. The width of the distribution of these loudness levels is then quantified using a percentile range. Percentiles belong to non-parametric statistics and are employed in the computation of Loudness Range because the loudness levels cannot in general be assumed to belong to a particular statistical distribution.

LRA is defined as the difference between the estimates of the 10th and the 95th percentiles of the distribution. The lower percentile of 10%, can, for example, prevent the fade-out of a music track from dominating Loudness Range. The upper percentile of 95% ensures that a single unusually loud sound, such as a gunshot in a movie, cannot by itself be responsible for a large Loudness Range.
 

Guermantes

Senior Member
Joined
Feb 19, 2018
Messages
486
Likes
562
Location
Brisbane, Australia
Here is a comparison of the track "The Race" by YELLO using the DR measurement and Waves WLM loudness meter.

Waveform of the track as ripped from CD in LPCM WAV format -- notice it is not peak limited:
YELLO - The Race - Waveform.jpg


DR analysis:
YELLO - The Race - DR values.jpg


Loudness analysis:
YELLO - The Race - EBU.jpg


The loudness range is 6 LU vs a DR value of 14, so definitely not equivalent.

The long term (or integrated) loudness of this track is -20 LUFS with a true peak of -1 dB, so to be streamed on Spotify or TIDAL it may be need to be peak compressed before loudness normalisation to their target of -14 LUFS.
 

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
980
Likes
1,523
FWIW, I recently found out that it's not that easy for me to detect 6dB of compression applied to highly dynamic track. The track I tried has DR13 and after applying compression it was reduced to DR9, so still quite ok. But somehow I expected that it would change the "character" of the track, make it more tiring to listen loud. That was not the case, it sounded the same and only in a few places I could hear additional distortion (crackling and such).

(the screenshot in the post from the link is actually from version compressed by 12 dB, I was testing what I should hear)
 

Guermantes

Senior Member
Joined
Feb 19, 2018
Messages
486
Likes
562
Location
Brisbane, Australia
OK, simply hypothetically, here is the same YELLO track gained up with peak limiting to a target of -14 LUFS and -1 dBTP (the Spotify recommendations).

Waveform:
YELLO - The Race - Waveform -14 LUFS.jpg


DR analysis:
YELLO - The Race - DR values -14 LUFS.jpg


Loudness Analysis:
YELLO - The Race - EBU -14 LUFS.jpg


And here are the limiter settings I used (I don't have the Plus version of the WLM which has in-built limiting):
YELLO - The Race - L1+ Ultra -14 LUFS.jpg
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
That is different to the algorithm used to calculate the LU Range (LRA) in standard loudness meters -- I had thought they may be equivalent. The DR and LRA both use a 3 second window but the LRA has cascaded gating that eliminates quieter sounds from the calculation.

From the EBU tech note https://tech.ebu.ch/docs/tech/tech3342.pdf

Thanks for posting this info.
I'm a total noob in this area, having never researched this area of audio reproduction.

IMO, the tech note you've linked has a much more analytically sound footing than the relatively crude analysis of the dr14 algorithm.
I was a bit surprised when I dug a little bit into the info presented on the loudness wars database site.

I found some software with the intent of using or adapting it to analyze my small library for DR problems.
Given that I listen to it all the time, I know the issues are there :)
I would just like to put some quantities on, "that sounds like a terrible recording"...
 

TBone

Major Contributor
Joined
Mar 16, 2016
Messages
1,191
Likes
348
Well, if Spotify is maxing @~DR9 ... most tracks from the well respected Eva Cassidy Live at Blues Alley recording survives, however ...
 

Guermantes

Senior Member
Joined
Feb 19, 2018
Messages
486
Likes
562
Location
Brisbane, Australia
IMO, the tech note you've linked has a much more analytically sound footing than the relatively crude analysis of the dr14 algorithm. I was a bit surprised when I dug a little bit into the info presented on the loudness wars database site.

But the Loudness Range doesn't appear to be a good indicator of Dynamic Range. If you look at the before and after loudness values of the YELLO track I posted you can see that the range for the track is the same after compression. The loudness target is about deciding on an average perceptual level and so dynamic range may benefit or suffer depending on the track.
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
But the Loudness Range doesn't appear to be a good indicator of Dynamic Range. If you look at the before and after loudness values of the YELLO track I posted you can see that the range for the track is the same after compression. The loudness target is about deciding on an average perceptual level and so dynamic range may benefit or suffer depending on the track.

Two things:
1) I said the algorithm looks to have more analytical weight (less crude). I didn't say it could produce "the right answer". I've no idea what that may be.
2) I also said I am a complete noob in this area :)

If you have some ideas as to what a good metric for dynamic range may be, or can explain what that might look like if none exists, I would be grateful to learn.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,706
Likes
37,443
DR values are tricky somewhat. Some songs around 9 or 10 or higher start sounding okay. Most anything at 11 or more is okay. The algorithm for DR readings isn't very good in my opinion, but it has a history and people know it. I also find when something gets below 9 on the DR meter it is being harmed by compression/limiting sound quality wise.

Used with an understanding of what it is the LUFs have a chance to be better, but I don't fully agree with it either. A step in the right direction. I do think the levels picked for LUFs was done at a time of heavy compression and an eye to setting the desired LUF value so highly compressed material wouldn't be in need of a huge amount of modification. Personal opinion I don't have any facts.

I seem to recall spoken words (speech) is easily followed, understood and without tiring out the listener if it has a dynamic range of 50 db. Perhaps surprisingly much music can seem relatively unharmed in as little as 30 or 35 db dynamic range. You get below 30 db dynamic range and it seems you can't make it sound okay or at least not to my liking.
 

Guermantes

Senior Member
Joined
Feb 19, 2018
Messages
486
Likes
562
Location
Brisbane, Australia
Sorry @dc655321 , I wasn't being argumentative, I'm also still coming to grips with the differences between these approaches to the "loudness war".

The DR algorithm is primarily about crest factor but trying to approach it in a methodical way, so I agree that it is of merit and provisionally the best measure we have. Interestingly the Waves site suggests that crest factor is a good practical determinant for dynamic range:
By the way, the difference between the maximum peak level and the RMS level provides a good approximation of the amount of dynamics in the master. If you don’t want to squash the life out of the mix, try to maintain at least a 6 dB gap between the two at all times.
In the case of DR, the higher the number the better it seems. But I don't think that is the case for all genres or combinations of instruments. Baroque harpsichord music is not very dynamic because of the mechanics of the instrument. J-Pop is not very dynamic because the star talent don't have much professional training and the song arrangements don't lend themselves to much dynamic variation.

The CALM Act and the EU broadcast standards are trying to fix a problem with perceptual levels in people's lounge rooms or in theatres. Remember when you would rush to turn down the volume every time a TV commercial came on? Those ads were and still are horribly compressed and in-your-face. The loudness targets try to keep things under control.
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
Sorry @dc655321 , I wasn't being argumentative

No need for apologies. I took it more as an educational than argumentative tone. Cheers.

I'm also still coming to grips with the differences between these approaches to the "loudness war".

Me too.

The DR algorithm is primarily about crest factor but trying to approach it in a methodical way, so I agree that it is of merit and provisionally the best measure we have.

It may very well turn out to be "provisionally the best measure we have". My skepticism (and maybe just intuition) is that the manner in which the DR algorithm selects data to present as a "ranking" may be too conservative, and therefore not accurately/realistically representative.

From the DR algorithm paper - "Each RMS and Peak value is entered into a histogram with 10,000 discrete values ranging from -100 dB to 0 dB in steps of 0.01 dB."

And then this - "The DR value for each channel j can then be derived as the difference between the second largest Peak value and the RMS-sum over the upper 20% histogram values converted to dB... The overall DR is finally calculated as the average of the channel DR values rounded to the next integer value."

The author(s) qualifies this with - "Limiting the DR-measurement to the upper 20% of the blocks with maximum RMS is a compromise that allows to somewhat compare a wide variety of different material in a quantitative way. Also in highly dynamic Material only the loudest parts, which usually best reflect the processing of the material (compression etc.), contribute to the DR measurement."

In my admittedly limited understanding of this, DR values would therefore almost always be calculated exclusively from information in the range -20 dB to 0 dB (i.e. upper 20% of histogram bins). Maybe there is typically not much information present outside of that range anyway?

I think I need to instrument my own music library to find out :)
Sounds like a project for a rainy weekend...
 

danadam

Addicted to Fun and Learning
Joined
Jan 20, 2017
Messages
980
Likes
1,523
In my admittedly limited understanding of this, DR values would therefore almost always be calculated exclusively from information in the range -20 dB to 0 dB (i.e. upper 20% of histogram bins). Maybe there is typically not much information present outside of that range anyway?
(as far as I can tell...)
The values that enter the histogram are computed from 3-seconds blocks, so for 5-minute track there will be 100 values put in the histogram (assuming that all blocks are different from one another by more than 0.01 dB). Then the sum over 20% of histogram values ignores empty bins in the histogram, so it sums 20% of those values that we actually computed in the previous step. The dB range they fall into will depend entirely on the track content and certainly not always -20 dB to 0 dB.
 

TBone

Major Contributor
Joined
Mar 16, 2016
Messages
1,191
Likes
348
DR values are tricky somewhat. Some songs around 9 or 10 or higher start sounding okay. Most anything at 11 or more is okay. The algorithm for DR readings isn't very good in my opinion, but it has a history and people know it. I also find when something gets below 9 on the DR meter it is being harmed by compression/limiting sound quality wise.

So few audiophiles understand, or want to understand, or care, of the DR db. Funny, older audiophile tend to be set in their old ways ... when they visit they are rarely interested in talking about DR in terms of a values/ratings, they'd rather discuss the amps/turntables and argue about DR subjectively. Tires me no end ...

Younger audiophiles seem far more willing listen/learn, and correlate what they hear with the data. I've changed the opinion of many younger 'philes, often radically, about formats, and about the industry in general. Once they understand the value of DR (and the db) they near always shift their attention, from formats/equipment, to musical content. This has been nothing but a boon for my own musical library, the more they learn about better mastering/pressings, the more they share.

I should also point out that DR#, whatever algorithm you prefer, is often more useful (to me anyway) when parsed per channel. I've often seen relatively big differences, ex: a DR14 in one channel, and a DR10 in another, in a recent Buffalo Springfield track. When comparing vinyl rips to the CD, you'll get a far more accurate description of your analog rigs ability. resonance, incorrect bias and azimuth issues often skew the vinyl based DR numbers; and that fact alone, can be used as a tool/indicator for further setup.
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
Then the sum over 20% of histogram values ignores empty bins in the histogram, so it sums 20% of those values that we actually computed in the previous step.

That may be true. I'll take a look at the only implementation of the algorithm I have access to (linked to previously).

The dB range they fall into will depend entirely on the track content and certainly not always -20 dB to 0 dB.

While I have great taste in music :rolleyes:, I whipped up some code over lunch to look at the rms/peak distributions in my music library.
Here is a random sampling of five tracks:

Figure_1.png
 

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,880
Likes
16,667
Location
Monument, CO
If you can plot the y-axis logarithmically it might help pull the lower levels above the floor, which may or may not make it more clear...
 

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
If you can plot the y-axis logarithmically it might help pull the lower levels above the floor, which may or may not make it more clear...

Done. Thanks for the suggestion. I was waiting for @RayDunzl to nab me on that...

Note, the bin-size I'm using is 101 and this is a different set of tracks (I did say "random" selection :) ).
Code is here.

Figure_1.png
 
Top Bottom