Closed tnbnicer closed 3 years ago
why does r128gain calculate a different gain and peak value?
You guessed right, the algorithm to compute loudness in Replay Gain v2, EBU_R_128, is different from ReplayGain v1, and it is expected and normal to get different values.
Does the r128gain-calculated track gain follow the same formula "ten raised to the power of one-twentieth of replay gain", applying it to every sample in a track to attenuate or increase replay gain?
The ReplayGain specification only defines how to compute the loudness of a track, and describes the value (to be stored in tags) to offset it to a normalized level. It is then up to the media players to choose what to do with this value. Depending on the players and their current settings, some may apply the track gain, the album gain, add a "preamp" offset, etc. 10^(gain/20) is just the formula to apply gain to a signal.
Can you outline why ReplayGain version 2 is better than version 1?
The algorithm to compute the perceived loudness is different, and it uses a weighting curve that better represents the perception of the human ear, and is therefore more accurate. The RGv2 spec has more details on that: https://wiki.hydrogenaud.io/index.php?title=ReplayGain_2.0_specification#Loudness_measurement
Thanks for the swift reply.
I had to look up 'weighting curve' to understand what it meant. I'm still unsure what it does. I'm going to run more comparisons on the two sets of values. My impression is that ReplayGain version two decreases loudness by overall less. (I wonder how that figures in to the benchmark 89 dB target.) That said, I only tried it on negative gain. I have a few positive gain trials ahead. It should be interesting to see if positive gains are also lower, meaning less loudness increase?
As my goal is only to normalize tracks and albums in the best way possible for personal musical enjoyment, not because its Spotify telling me to, I think the smaller the changes to the original CD loudness the better. RG v2 most likely will meet my requirements.
Now I can also run the commandline from a script making it more convenient than always opening up Winamp.
Thank you.
Hi > To leave a comment, if I may?
I compared several MP3s with positive gain values in several Windows players. One track already had an 11.26 dB gain. R128gain pushes the value up even more to 13.6 dB.
There's no difference when I listen to the two files. RG v1 tags and RG v2 tags seem to boost the positive loudness in a similar manner, distinctly louder than without ReplayGain. I'm happy that players are able to prevent clipping. Negative loudness gains remain louder and better in my opinion,
So the outcome of comparing ReplayGain values is that RG version 2 is a success. Hopefully the news will get out and more encoders will make the switch. R128gain is the right kind of tool.
Hi> I have two or three questions.
I used r128gain-win32 to generate ReplayGain tags on an MP3 file already tagged in Winamp (5.8) to test what would happen.
I'll copy the extended tags here, some old, some newly generated:
REPLAYGAIN_ALBUM_GAIN -5.41 dB REPLAYGAIN_ALBUM_PEAK 1.014365435 REPLAYGAIN_TRACK_GAIN -4.40 dB REPLAYGAIN_TRACK_GAIN -5.26 dB REPLAYGAIN_TRACK_PEAK 0.996887 REPLAYGAIN_TRACK_PEAK 0.996883988
Track gain -4.40 dB and track peak 0.996887 were added by r128gain.
I can remove tags on all MP3s -- I have many -- and it takes about 2 seconds, so that is not an issue. I'm wondering though, why does r128gain calculate a different gain and peak value?
Winamp: -5.26; r128gain: -4.40 -- a pretty big difference.
I assume it has to do with ReplayGain version 2 versus version 1 that I believe Winamp still uses. Maybe I'm wrong. Winamp's documentation makes no mention of ReplayGain versions.
My second question>
According to the ReplayGain documentation, gain is applied by players that support ReplayGain by multiplying each sample value by a constant. The formula "ten raised to the power of one-twentieth of replay gain". For -5.26 dB, 0.54575786109127092251134492267094. For -4.4 dB, 0.60255958607435774697130296573509. I'm interested in the formula. (I sometimes I want to normalize WAV files that were encoded to MP3.) Does the r128gain-calculated track gain follow the same formula "ten raised to the power of one-twentieth of replay gain", applying it to every sample in a track to attenuate or increase replay gain?
Last but not least>
Can you outline why ReplayGain version 2 is better than version 1?
I look forward to a reply. I hope your reply can be soon, because I'm postponing switching from Winamp to r128gain.
Thanks.
Best regards, Tom