Does ReplayGain affect Sound Quality?

Discussion in 'Audio Hardware' started by wolfram, Nov 7, 2009.

Thread Status:
Not open for further replies.
  1. wolfram

    wolfram Slave to the rhythm Thread Starter

    Location:
    Berlin, Germany
    Hi! I listen to most of my music by using Flacs on Foobar through the quite decent DAC of my CD-Player. One of the most useful features for me is ReplayGain, especially when listening to playlists. But I never really understood how Foobar lowers the volume (sth. with reducing the number of bits?). I even read that Linn is not offering ReplayGain in their Streamers because of the degrading effect.
    Before someone tells me to use my ears, I don't hear any negative effects. I'm just curious. Also, it's hard to compare music with and without ReplayGain, because of the different volume levels.
    So, does anyone know how RG works and if it theoretically might harm sound quality?
     
  2. Spirit Crusher

    Spirit Crusher Forum Resident

    Location:
    Mad Town, WI
    Barry Diament has posted about this around here. I can't remember the technicality of it - a volume change (or any processing, I think) in the digital realm before DA conversion affects the word-length. (that's why Audition, Audacity, etc have a 32-bit float option, if I understand correctly). I think he said a 3 db? reduction in volume before DA reduces bit-depth by some number of bits, degrading the resolution (?).
    I've made a CD-R compilation using Replay Gain and the music sounded very degraded - if I cranked the volume way up it's like it had little effect, if that makes any sense.
     
  3. wolfram

    wolfram Slave to the rhythm Thread Starter

    Location:
    Berlin, Germany
    Well, that's what I always thought. That reducing the volume in the digital realm degrades the quality and you should always have your media player at full volume. But I'm not sure if RP only lowers the volume, or if there is some upsampling added (what's that 32-bit float option, I think I heard that in connection with foobar before).

    What do you mean? Cranking up the volume didn't make it seem louder, or cranking up the volume made the degrading effect disappear?
    Using RP shouldn't make the music sound very degraded, but you have to turn the volume much higher than you're used to.

    Anyway, thanks so far...
     
  4. ROLO46

    ROLO46 Forum Resident

    Use I-Volume

    Its good
     
  5. wolfram

    wolfram Slave to the rhythm Thread Starter

    Location:
    Berlin, Germany
    Never heard of I-Volume before. Just googled it and it seems to do basically the same as RG only it's not free. And my question for this thread would be the same for I-Volume.
    And besides, I'm totally happy with RG, just want to make sure...
     
  6. Liquid Snake

    Liquid Snake Member

    Location:
    Brooklyn, NY
    I'm pretty sure foobar does DSP and processing at 32-bit or higher. The folks at hydrogenaudio would know for sure. That aside, I feel the convenience RG offers outweighs any potential degradation in SQ (I've never heard any).
     
  7. mattdm11

    mattdm11 Forum Resident

    Location:
    Cleveland, OH
    agreed....I'm on the "replaygain actually improves the sound" bandwagon...there's no chance for the peaks to get clipped.
     
  8. bdiament

    bdiament Producer, Engineer, Soundkeeper

    Location:
    New York
    Hi Spirit Crusher,

    Please allow me to clarify.
    It has nothing to do with a 3 dB reduction or any other specific amount.
    It is simpler than that.

    When you process a digital file, you increase its wordlength. The process can be anything, even dropping the level by 100th of a dB. <i>Any</i> change lengthens the digital word. That's the whole story.

    So what does this mean?
    If you process a 16-bit file, this means there are only 16-bits to store every digital word. If you lengthen the word to say, 17-bits and can only store 16-bits, you lose the low order bit and with it, some information. This lost information is what would have been low level details, reverb tails, room sound, the subtleties of instrumental harmonics.

    This is why many programs will lengthen the digital word for their internal processing or why many engineers will create a copy of a file, at a longer wordlength, in order to accommodate processing, such as that encountered in mastering.

    The above covers no having a big enough "bucket" to hold the longer words. Now the problem is getting the bucket back down to say, 16-bits and still keeping that information. In my experience, the rounding in most applications programs (as well as most dither algorithms) does not do a great job at this. It preserves <i>some</i> of that low level information but exacts a sonic price of its own. For example, you might keep the reverb tails but they get a bit cloudy. I suppose this might be seen as better than losing the reverb tails altogether but the sonic price is larger than this. More often than not, aspects of the sound that are louder (i.e. not the low level details) will be compromised by the rounding or the dither. Imaging solidity and soundstage focus are among the first things to go, along with some aspects instrumental timbre (in english, sounds <i>change</i>).

    Keep in mind, this is not true of all programs and all dither. Just most (in my experience). :rolleyes:

    So, as with most other things, my take on this is one must decide how much ultimate quality they are willing to trade in order to get increased convenience. Personally, I'd rather use my volume control.

    Best regards,
    Barry
    www.soundkeeperrecordings.com
    www.barrydiamentaudio.com
     
  9. mattdm11

    mattdm11 Forum Resident

    Location:
    Cleveland, OH
    I'm not going to doubt your knowlege on the subject is 100000x more than mine....but I was always under the impression that RG merely lowered the volume on an automated basis, the same as hitting the volume control (well, the volume slider on foobar, winamp, etc.). For MP3s (at least MP3gain), it attached the volume adjustment as a tag, not really affecting the file. I assumed RG did the same thing, just by not attaching itself to the actual file. It just read how loud the volume of the file was and adjusted accordingly.

    For whatever little bit of details that may be lost from using RG, I think it's still worth it for me, because going from something from the 70s or 80s to present day can make you jump out of your chair if you aren't ready for it.
     
  10. wolfram

    wolfram Slave to the rhythm Thread Starter

    Location:
    Berlin, Germany
    Barry, thanks for your input. I was afraid of something like that, but I had to ask, didn't I? Still I find myself sharing Liquid Snake's view:

    At least for Playlists mixing older and newer music, there really is no alternative. And sometimes when I listen to albums only, I turn RG off, just to be safe. But still I don't really think I can hear a difference...
     
  11. bdiament

    bdiament Producer, Engineer, Soundkeeper

    Location:
    New York
    Hi wolfram,


    As I mentioned, it is a tradeoff between quality and convenience. If one does not experience any change in quality, going for the convenience makes a lot of sense. Nothing is lost and convenience is gained. ;-}

    Best regards,
    Barry
    www.soundkeeperrecordings.com
    www.barrydiamentaudio.colm
     
  12. wolfram

    wolfram Slave to the rhythm Thread Starter

    Location:
    Berlin, Germany
    I'm pretty sure that's all RG does, but that already changes the bits as far as I know. There is this bit-perfect test, where you put out a dts-wav to your av-receiver and it only decodes correct if there is no changing the slightest bit. It doesn't work with the volume slider other than 100%. Or with ReplayGain on. So some changes must be made.
     
  13. I Am The Lolrus

    I Am The Lolrus New Member

    Location:
    LA, CA, US
    it can make an imperceptibly small difference , especially when running at 24 bits... the interpolation will be OK, but if you are doing this at 16bit then it can be quite a large difference... the data is either truncated or just diminished because of the lack of resolution.

    If the host program converts the 16bit to 24bit and then does interpolated volume adjustment, it will be pretty good because you can fit the scaled range within the resolution of the 24 bits well without significant loss... so it depends upon the implementation.
     
  14. DragonQ

    DragonQ Forum Resident

    Location:
    The Moon
    ReplayGain doesn't affect the actual digital information because it is a tag but during playback, the volume adjustment is obviously in the digital domain. However, this is true of any volume adjustment on your PC (the main system volume slider, the volume control of your media application, etc.) so if you don't hear any problems normally you won't hear any more problems when using ReplayGain.

    Also be aware that ReplayGain does all of its calculations in 32-bit but I guess it's up to the application whether it outputs the data in 24-bit or dithers back down to 16-bit before it gets played.
     
  15. I Am The Lolrus

    I Am The Lolrus New Member

    Location:
    LA, CA, US
    yep, that covers it.
     
  16. wolfram

    wolfram Slave to the rhythm Thread Starter

    Location:
    Berlin, Germany
    Well, I output through ASIO because I want my bits unchanged. But I'm not sure anymore what bit-rate I have after applying RG in Foobar. :confused:
     
  17. Grant

    Grant Life is a rock, but the radio rolled me!


    But, if one only wants to create a comp made with CD tracks, there is no hope, because, even if one converts his CD track to 24-bit, he's still going to dither an already dithered track. It's better than truncation, but...
     
  18. bdiament

    bdiament Producer, Engineer, Soundkeeper

    Location:
    New York
    Hi Grant,

    True but a lot will depend on the particular dither algorithm.

    Then again, if I were assembling a comp from CD tracks, I just do it and use my volume control as needed, like I always do.

    Just my perspective.

    Best regards,
    Barry
    www.soundkeeperrecordings.com
    www.barrydiamentaudio.com
     
  19. DragonQ

    DragonQ Forum Resident

    Location:
    The Moon
    Might not be the best idea at motorway speeds. ;)
     
  20. saundr00

    saundr00 Bobby

    Hi Barry,

    I kinda see what you are saying here but let me ask this. Isn't one of the main problems that 16 bit and even 24 bit files are integer formats?

    In that case any division would cause loss of low level information if the answer turned out to be fractional. Simple addition, subtraction and multiplication would not cause loss of the lowest order bit.

    Multiplication, addition and subtraction could cause you to lose the high order bit(s) if you exceeded the boundaries of a 16 bit signed integer.

    The way to lessen the problem, as you say, is to convert to float format, do the calcs, then convert back to the integer format with rounding or some other algorithm.

    Whether this process is audible, while fun to debate, would be totally implementation dependent IMO.

    Here's a question: Couldn't a signal process that consists only of subtraction, be lossless in nature? i.e. If my signal process was to subtract 1 from every 16 bit signed integer, it seems to me I would be fine as long as the result didn't go below -32,767. If that were the case, couldn't you lower volume without causing loss of information?

    I'm no signal processing expert, so I don't know if lowering volume uses simple subtraction or needs to use division in some cases. Common sense tells me it would be subtraction, but who knows...

    I'm curious of your take on all of this.

    Thanks as always.
     
  21. DragonQ

    DragonQ Forum Resident

    Location:
    The Moon
    The fact that they are integer formats means nothing, you still have the same number of bits to play with. If you convert from 16-bit to 24-bit, you don't just add 8 zeros to the front of each number (the same as adding 16711681), you add 8 zeroes to the end of each number (the same as multiplying them all by 256). The change from 16-bit integer to 24-bit integer is the same as if you went from 16-bit integer to a 16.8 fixed point format, in terms of possible precision.

    When you reduce the volume, you don't subtract, you divide. That is the only way to retain the signal's shape whilst lowering the volume. When dividing, you end up with non-integer numbers, which is where you get rounding errors. However, if you convert to 24-bit first then far less rounding is required as there are more points to round to.
     
  22. SgtMacca

    SgtMacca New Member

    Location:
    Columbia
    Sorry to ask, but what's the point of using RG???

    I never needed it... if music is too low/loud I simply use the volume knob.
     
  23. bdiament

    bdiament Producer, Engineer, Soundkeeper

    Location:
    New York
    Hi Bobby,


    To be clear, I never suggested "The way to lessen the problem...is to convert to float format, do the calcs, then convert back to the integer format with rounding or some other algorithm."

    I don't believe 16 and 24-bit being integer formats is the issue. I think it has to do with applying a process to a file without having the room to hold a longer word, particularly in the case of 16-bit. In other words, good software might operate at 64-bit integer (like soundBlade does) or 80-bit integer (like the Metric Halo Console does) and produce excellent results.

    If you're going to apply a process - any process, you just have to have a larger "bucket" than the final size will be. The bucket does not have to be floating point (though it tends to be in most of the less expensive software designed for home use).

    Best regards,
    Barry
    www.soundkeeperrecordings.com
    www.barrydiamentaudio.com
     
  24. saundr00

    saundr00 Bobby

    Are you saying that converting 16 bits to 24 bits of this number:

    1111 1111 1111 1111

    You would end up with 1111 1111 1111 1111 0000 0000? I had always assumed you would end up with 0000 0000 1111 1111 1111 1111.

    If this is true, I had NO IDEA. That would mean that going to 24 bit would give you much more room for small levels of detail indeed.

    Is this because of the logarithmic nature of audio signals?
     
  25. saundr00

    saundr00 Bobby

    Sorry Barry. I didn't mean to put words in your mouth. I've been trying to understand the 16 to 24 bits and back thing for a while now.
     
Thread Status:
Not open for further replies.

Share This Page

molar-endocrine