Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion (Read 3986 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Hi,
I want to losslessly equalize volumes of my entire music library of mp3s, wavs, FLACs & MIDIs.
Since foobar can't normalize losslessly, I found wxmp3gain can do this to mp3s, but not other audio types.
I discovered that dbpoweramp does it for wavs and FLACs.
FYI: I don't want to simply edit tags for volume equalizing, because I use apps that don't recognize ReplayGain Tags.

I have googled and just simply don't understand the right numbers and how to convert the two db formats to use equalize FLACs in dbpoweramp (via Volume Normalization whilst converting a FLAC to FLAC) to the same level as my mp3s levelled via wxmp3gain.

I want to achieve either 75db, -14 LUFS (Spotify standard), or 89db.
I haven't decided which one because I want to allow enough headroom for clipping and listen to all genres of music.
Once I've chosen a wxmp3gain target (e.g. 75db), since dbpoweramp operates in -db (0 to -40db), whilst wxmp3gain operates in +db (+75db to +105db), how do I convert back and forth from + to - db in dbpoweramp, so that my FLACs and mp3s play at the same volume?


Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #1
Hello!

Only tags are lossless.
All other processes are technically not lossless.
(But they should not affect the quality at all when working with lossless files.)

I am also targeting -14 LUFS myself and I am very happy with it.
-14 LUFS should be equal to 93 dB.

For MP3 files you can simply use foobar2000 to normalize the files directly. This has one disadvantage.
You can only adjust volume in 1.5 dB steps. This is not ideal but it is still better than re-encoding the MP3 files.

If you want to normalize FLAC files you will need to re-convert them into FLAC. Like I said earlier, this is not lossless,
but in reality, there will be no differences, except the volume, of course.

You mentioned WAV files. Why don't you convert them into FLAC to save some space and have proper metadata support?
If you have some huge files you can easily convert everything to 16-bit / 44.1 kHz. Everything above that is really useless.

I have zero experience with MIDI files so I cannot really help you there, sorry.

Edit: I wanted to explain how ReplayGain works so you can understand numbers more easily.

There are two normalization standards.
They are known as "old ReplayGain / ReplayGain Classic" and "new ReplayGain / EBU R128".
Old ReplayGain is targeting 89 dB. New ReplayGain is targeting -18 LUFS.
So 89 dB is equal to -18 LUFS.

By scanning your file, the program will analyze how loud your track is. Let's say that your track is 96 dB / -11 LUFS loud.
Program will then write that your file needs to be adjusted by -7 dB / -7 LUFS.

You can then setup in foobar's playback settings to apply +4 dB / +4 LUFS to target the 93 dB / -14 LUFS.

Think of 89 dB and -18 LUFS as the reference numbers.

Here comes the tricky part. This only applies to specific programs like foobar2000. In other software, the reference point for new EBU R128 is actually -23 LUFS.
So be careful what you are doing.


gold plated toslink fan

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #2
I cannot edit my previous post. Here's a visual guide how to achieve what you are looking for.

Spoiler (click to show/hide)
gold plated toslink fan

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #3
I cannot edit my previous post. Here's a visual guide how to achieve what you are looking for.

Spoiler (click to show/hide)

Thank you for explaining!
But in your example, isn't foobar going to increase all tracks by +4db, rather than a target db level?
Also, wxmp3gain is documented to make lossless edits, by altering the volume on the actual file without transcoding. Are you sure it's not lossless?
Also, how are you calculating ReplayGain to New ReplayGain? Is there a chart, or conversion table, for each number?

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #4
Quote
But in your example, isn't foobar going to increase all tracks by +4db, rather than a target db level?
He said, "+4 LUFS to target".

Quote
Also, wxmp3gain is documented to make lossless edits, by altering the volume on the actual file without transcoding. Are you sure it's not lossless?
I agree,   It's only a loudness change and it's reversible.

Technically, when you change the volume of a WAV file there are rounding errors and when you reduce the volume you loose resolution.   But it's not considered to be a lossy process.   Mixing & mastering engineers make all kinds of volume adjustments without worrying about if it's "mathematically perfect" or "mathematically reversible"

Quote
Also, how are you calculating ReplayGain to New ReplayGain? Is there a chart, or conversion table, for each number?
I've done an experiment and I don't remember the results but I'll trust Markuza that there's a 107dB difference between the Acoustic SPL level and the digital LUFS level.    I assume this is with pink noise.   With real music there isn't an exact correlation because they use different equal loudness curves and/or a different reference SPL level and it will depend on the frequency content.

Quote
I want to achieve either 75db, -14 LUFS (Spotify standard), or 89db.
I haven't decided which one because I want to allow enough headroom for clipping and listen to all genres of music.
It's a compromise and a lot of people complain that 89dB is "too quiet".    On the other hand if you go to 93dB a lot of your tracks won't be touched unless you allow clipping.    At -75dB you might still have a few tracks that can't hit the target loudness if you don't allow clipping.     You're also never going to get "perfect" loudness matching because your brain doesn't do this kind of "analysis".    You might have one song that starts-soft and ends loud or vice-versa and your brain/perception will do "funny things".   Or you might "hear" heavy metal louder than classical when they are really the same volume.   Two different people might not agree when two different songs sound equally loud.

MP3 can go over 0dB without clipping but you can still clip your DAC if you play it at "full digital volume".    I'm not sure what the upper limit is and it might not be a "simple-fixed" limit.

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #5
...By scanning your file, the program will analyze how loud your track is. Let's say that your track is 96 dB / -11 LUFS loud.
Program will then write that your file needs to be adjusted by -7 dB / -7 LUFS.

You can then setup in foobar's playback settings to apply +4 dB / +4 LUFS to target the 93 dB / -14 LUFS.

How did you calculate that ALL your tracks needed to be loudened by +4db in order for them to reach the same target of 93db?
Also, where can I find all the equivalents for these 2 units of measurement (LUFS to Replay Gain Classic and Replay Gain Classic to LUFS)?

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #6
Hello!

89 dB is the reference number. Every single time you add ReplayGain tags it will target 89 dB.
You cannot change that reference number. This ensures that every single person on this planet will have equally loud files.

Take a look at this photo.



As you can see, it is called Preamp. This tool does exactly what it says - it acts as a preamp.

Since we know that ReplayGain targets 89 dB, and we want 93 dB, we simply have to add +4 dB to it.

If you decided to add +4 dB to files without ReplayGain info, then all of your files will be +4 dB louder
This is dumb because you have no idea how loud your files actually are.

1 dB is equal to 1 LUFS in this case.
89 dB is equal to -18 LUFS.
If you want 86 dB, then you will need -3 dB (89 - 3 = 86) or -3 LUFS (-18 - 3 = -21 LUFS)
If you want 93 dB, then you will need +4 dB (89 + 4 = 93) or +4 LUFS (-18 + 4 = -14 LUFS)

Edit: I just Googled to see how other software does it. This tool by Poikosoft looks very nice.



Maybe you can ask foobar2000 developers if they can implement similar scale to this.
gold plated toslink fan

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #7
Hello!

89 dB is the reference number. Every single time you add ReplayGain tags it will target 89 dB.
You cannot change that reference number. This ensures that every single person on this planet will have equally loud files.


Okay, thank you for this much needed step-by-step thought process. I tried an experiment. I found and copied an mp3 that wxmp3gain reported as being 85db. I used dbpoweramp to convert it to mp3 again (it's probably a lossy conversion, but who cares, it's just a for experiment) and set the replaygain meter to 0db. When I imported this adjusted mp3, wxmp3gain reported it as 89db.

Although I haven't tried this experiment with foobar (because using wxmp3gain, I can be sure there is no quality loss, and I'm concerned of lossy conversion when I actually commit my mp3 & FLAC library if I use foobar for the conversion), this experiment proves to me that a replaygain slider set at 0db in foobar and dbpoweramp (and maybe others too) are a reference for the hard default 89db (as you explained above).

I still don't understand how 1db = 1LUFS, because if that were true, 93db would equal 93LUFS, as opposed to -14LUFS.

Thanks for the Poikosoft tool you screenshotted. It looks like a conversion chart I've been searching for!
Where can I download it?
Is it a lossless normalizer?

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #8
I still don't understand how 1db = 1LUFS, because if that were true, 93db would equal 93LUFS, as opposed to -14LUFS.
Just as 1 °C is equal to 1 Kelvin.

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #9
I don't follow.

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #10
How?

If this forum had awards, I would nominate lvqcl's post as post of the year. Seriously, one of the best answers I have ever seen.

1 Celsius is equal to 1 Kelvin.

Every temperature increase by 1 Celsius means that temperature also increased by 1 Kelvin.
Every temperature decrease by 1 Celsius means that temperature also decreased by 1 Kelvin.

It's just that 0 degrees Celsius is equal to 273 Kelvin.
1 degree Celsius is 274 Kelvin.
2 degrees Celsius is 275 Kelvin.

Always the same, just the scale is different.

Same with music.
1 dB is equal to 1 LUFS.

85 dB = -22 LUFS
86 dB = -21 LUFS
87 dB = -20 LUFS
88 dB = -19 LUFS
89 dB = -18 LUFS
90 dB = -17 LUFS
91 dB = -16 LUFS
92 dB = -15 LUFS
93 dB = -14 LUFS

It always goes by 1 dB or 1 LUFS. Only the scale is different.
gold plated toslink fan

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #11
How?

If this forum had awards, I would nominte lvqcl's post as post of the year. Seriously, one of the best answers I have ever seen.

1 Celsius is equal to 1 Kelvin.

Every temperature increase by 1 Celsius means that temperature also increased by 1 Kelvin.
Every temperature decrease by 1 Celsius means that temperature also decreased by 1 Kelvin.

It's just that 0 degrees Celsius is equal to 273 Kelvin.
1 degree Celsius is 274 Kelvin.
2 degrees Celsius is 275 Kelvin.

Always the same, just the scale is different.

Same with music.
1 dB is equal to 1 LUFS.

85 dB = -22 LUFS
86 dB = -21 LUFS
87 dB = -20 LUFS
88 dB = -19 LUFS
89 dB = -18 LUFS
90 db = -17 LUFS
91 db = -16 LUFS
92 db = -15 LUFS
93 db = -14 LUFS

It always goes by 1 dB or 1 LUFS. Only the scale is different.

Thank you for considerately explaining a concept that isn't commonly expressed in a way that is universally understandable by all ages and backgrounds.

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #12
Is foobar more of a lossier converter than wxmp3gain (since wxmp3gain doesn't transcode and uses algorithm, not tags)?

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #13
Are you talking about MP3?
You can adjust volume in 1.5 dB steps without re-encoding the file, this can be considered lossless.
(Technically speaking, it is not lossless because you are changing bits - but the quality itself is "lossless" since there is no re-encoding.)

This wxMP3gain appears to be nothing more than a GUI for MP3Gain. That program is very old. Is it even using EBU R128 or old ReplayGain?
If it's using old ReplayGain, everything that we posted above is invalid. They are two completely different algorithms.

Stick to foobar2000 please.
gold plated toslink fan

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #14
If either my FLAC or mp3 is -11 LUFS (new replay gain), and I need to normalize it to -14 LUFS, then does foobar normalize losslessly?
Also, wxmp3gain's default is 89db (old replay gain), and allows me to undo/remove the normalization at any time, hence I don't use foobar.
Please clarify what's invalid as  I've just spent the last several days using wxmp3gain to normalize half my mp3 library, based on what I've learned on this thread

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #15
I just did an experiment (I've done a similar experiment before) and it came-out very close...
I generated a (stereo) pink noise file with Audacity and exported it as MP3.
I ran ReplayGain in Winamp, which is old so I'm sure it uses the regular-old ReplayGain algorithm.
I checked the LUFS level with GoldWave.

ReplayGain adjustment is -1.66dB.   (The file is 1.66dB louder than 89dB.)
The LUFS is -12.13dB.   

If we reduce the LUFS by 1.66dB, that's -13.79dB.     Very close to the expected -14dB. 

Again, I'd expect every different music file to be different (because of the way the different algorithms treat the frequency content) but it should be close enough, especially considering that MP3Gain works in 1.5dB steps, so it could be "off" by up to 0.75dB, or 1.5dB if limited by clipping prevention.  

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #16
Like I said, there are two different algorithms.
In theory, they should be equal, but in reality things will be different.
Check this picture below. They are normalized to -14 LUFS or 93 dB.
In the post above I said that -14 LUFS is equal to 93 dB.
So they should be equal, right? Wrong.



This is happening because for the top track I used new ReplayGain (EBU R128) and for the bottom track I used old ReplayGain (Classic).

You can configure which algorithm you want to use in foobar2000.



I created a poll not too long ago. You can find it HERE.
Most people switched to new algorithm.

The reason I said my posts above will be invalid is because you cannot compare the old algorithm (which is used by wxMP3gain) and new algorithm (which is used by default in foobar2000).

So why is foobar2000 showing dB scale instead of LUFS scale even when using new ReplayGain?
Because ReplayGain standard is very old. It is supported by many software and hardware players.
Their tags look like this: replaygain_track_gain and replaygain_track_peak.
Creating new tags makes no sense because support will be minimal.
Both the old and new algorithm are doing the same thing, they just work differently, so you might get different results.

Edit: I just tried your pink noise experiment Doug. Difference is huge.
https://i.imgur.com/cTTtowh.png
gold plated toslink fan

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #17
That experiment shows a louder source file via ReplayGain.
And the poll shows Bass being the difference. Is bass more even compared to non-bass heavy tracks with EBU vs classic?
Semantics aside, wxmp3gain is considered lossless. Is foobar normalization lossless or not?
Other than that, are foobar changes reversible like wxmp3gain?

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #18
Wxmp3gain's reversible changes that I'm looking for is identified here: https://hydrogenaud.io/index.php?topic=120184.msg990418#msg990418
And the unique lossless algorithm normalization I'm looking for is identified here: https://hydrogenaud.io/index.php?topic=68353.msg607312#msg607312
This is because my apps don't read replaygain tags, but they do recognise mp3gain's edits (which I can reverse if I want to).

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #19
EBU R128 is slightly better than the old Replaygain when it comes to calculating the perceived loudness of broadcasted material (https://wiki.hydrogenaud.io/index.php?title=ReplayGain_2.0_specification#cite_note-4). MP3gain uses the old Replaygain.

If you are satisfied enough with the volume normalization of MP3gain, using it would be perfectly fine.

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #20
Okay, thank you for clarifying.
But if I want to use foobar...
Semantics aside, wxmp3gain is considered lossless. Is foobar normalization lossless or not?
And, are foobar changes reversible like wxmp3gain?

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #21
If you are using the Replaygain processing option in the converter setup window, foobar2000 decodes the file, normalizes the decoded result, and re-encodes it to whatever format you selected. If you selected one of the lossy formats, this process is lossy.

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #22
If you are using the Replaygain processing option in the converter setup window, foobar2000 decodes the file, normalizes the decoded result, and re-encodes it to whatever format you selected. If you selected one of the lossy formats, this process is lossy.
Okay and what if I use EBU?

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #23
Quote
Okay and what if I use EBU?
EBU R128 is a loudness measurement standard.    Lossy or lossless editing or adjustment is another unrelated matter.  

BTW - There is another program called MP3directCut that can losslessly make volume adjustments (in 1.5dB steps).   It doesn't have any loudness measurement capability but you can use any application of your choice to measure the loudness and then adjust up or down with MP3directCut.


 

Re: Equalise Volumes via dbPoweramp (-db) & wxMp3gain (+db) conversion

Reply #24
If you are using the Replaygain processing option in the converter setup window, foobar2000 decodes the file, normalizes the decoded result, and re-encodes it to whatever format you selected. If you selected one of the lossy formats, this process is lossy.

The phrasing of this reply suggests to me that if EBU is used in foobar, then your reply would change. Please clarify.