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: ReplayGain - 1. Where is the vol changed? 2. Is SQ effected? (Read 2224 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Hi all

I've got to grips with most things about Replaygain.  But there are a couple of things which I'm still not sure about....

1.  At what stage in the "audio chain" is the volume adjusted?  Is this universal or different per SW/HW device whihc is making use of it?

2.  Does it effect SQ.  Once I'm up and running I'll try an ABX.  But would be interested to hear the consensus in the meantime.

Many thanks

Max

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Reply #1
1. The software playing the file, assuming it is RG compatible, scales the data accordingly. Depending on the software this may then be dithered back to 16 bits, or it may go to the hardware at higher precision.

2. You can't do a proper ABX test unless the samples are equally loud. Adjusting the non-RG sample to match loudness will do exactly the same thing that RG does, so there is not likely to be any audible difference.

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Reply #2
Thanks for the quick response. 

1.  I'll be using foobar if anyone knows how that program handles RG?
2.  That makes sense, I'll forget about the ABX then.  But would still be interesting to hear what people think about the effect SQ implications of using ReplayGain.

Cheers

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Reply #3
The only way sound quality would be affected is when RG adjustment will make it clip - but that's what clipping protection is for.
Ideally, RG adjustment has the same effect as you manually in/decreasing the volume. The advantage of RG over other methods is that the modification is done at runtime, so your files are not affected at all.

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Reply #4
Positive gain may result in clipping unless clipping prevention is enabled.

Negative gain brings content closer to the noise floor, but even with a gain of -12 dB (which is not uncommon but rather extreme), it's unlikely to make an audible difference, especially since the kind of content that gets that kind of gain, is very "loud" to begin with.

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Reply #5
But, it's just like any volume control (digital or analog*).  When you turn-down the volume, there is some noise that doesn't get turned-down so the signal-to-noise ratio is degraded.   

Normally this isn't a problem unless you later re-boost the gain, which then boosts the noise also.    Analog amplification adds more noise, since there are no absolutely noise-free amplifiers.      i.e.  It's a bad idea to attenuate a line-level signal and then run it through a microphone preamp to re-boost it.

There are LOTS of volume changes (both ways) during audio production & mixing, and as long as the levels remain "reasonable" everything comes-out fine!  And of course, every playback system has a volume control and we rarely have it set as loud as it will go without clipping/distortion.  Don't be afraid of volume control! 

And with ReplayGain, the actual audio data is not touched and you can always turn it off!





* Digital quantization noise is different from analog noise, but in the end the results are similar.

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Reply #6
1.  I'll be using foobar if anyone knows how that program handles RG?


On playback: It handles it well. Just as good as it handles the volume control you would have to use manually if not RG'ing. You can choose between track gain and album gain, and max the plusses
  • to avoid clipping.

    On scanning: fb2k can group for album gain by folders, by tags, by selection (or not at all).


  • Skamp points out that positive numbers may make peaks crash through the 0 dB maximum. However, for floating-point formats like mp3 even a non-RG'ed file can have peaks above that.

ReplayGain - 1. Where is the vol changed? 2. Is SQ effected?

Reply #7
Players do vary in how they apply RG. Winamp, for example, does its RG processing on the integer LPCM data coming in from the input plug-in. So if the input plug-in is reading/generating floating-point samples (e.g. you are playing an MP3), they're always getting cast to integer before Winamp's stock RG processor ever sees them. The typical result, with a loud MP3 and negative RG, is that the MP3 clips like normal and then the volume is turned down on that clipped signal; the distortion remains.

Foobar2000, in contrast, keeps the audio in the floating-point domain as long as possible, so the RG processing can actually prevent the clipping that would normally occur. Whether this is audibly advantageous for any music in your collection, I don't know.

(There's an alternative input plug-in for Winamp that can work around the issue; it uses FFmpeg to decode whatever file types you configure, and it has its own RG processor that supersedes the one built into Winamp. I've been using it for a couple of months now; works great.)