Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member
    Join Date
    Mar 2006
    Location
    London
    Posts
    334

    ReplayGain distortion / REPLAYGAIN_REFERENCE_LOUDNESS

    Two questions

    1) I listen to a lot of classical music and am a bit concerned about getting distortion if I use ReplayGain. If however I set the preamp gain to say -3dB or -6dB, is that likely to reduce the problem. All depends on where ReplayGain and the preamp gain are relative to each other in the chain I guess...

    2) I see in the latest FLAC they have added REPLAYGAIN_REFERENCE_LOUDNESS. What is this and how do I add it to my existing FLACs if necessary (Foobar doesn't seem to do it)?

  2. #2

    ReplayGain distortion /REPLAYGAIN_REFERENCE_LOUDNESS

    --- rbl <rbl.2kjtpb1169027401 (AT) no-mx (DOT) forums.slimdevices.com> wrote:
    > 2) I see in the latest FLAC they have added
    > REPLAYGAIN_REFERENCE_LOUDNESS. What is this and how do I add it to my
    > existing FLACs if necessary (Foobar doesn't seem to do it)?


    this is the (SPL) loudness level used as a reference for the
    replaygain analysis. for anything made with flac.exe it will be
    83dB and I have not seen any other tool that analyzes FLAC files
    that uses a different value, so apps should treat a missing tag
    as 83dB.

    if you want to can use metaflac-1.1.3 to remove the old tags and
    re-analyze, or (faster) just add the loudness tag.

    Josh





  3. #3
    Senior Member
    Join Date
    Mar 2006
    Location
    London
    Posts
    334
    Thanks. So are you saying that I should add this tag before running foobar to work out the ReplayGain numbers, and it will then change the ReplayGain numbers accordingly?

    And presumably then if I set REPLAYGAIN_REFERENCE_LOUDNESS to say 80, the music will play 10dB quieter than if i set it to 90. This could then get around the problems of distortion when using ReplayGain with classical music?

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Quote Originally Posted by rbl View Post
    2) I see in the latest FLAC they have added REPLAYGAIN_REFERENCE_LOUDNESS. What is this and how do I add it to my existing FLACs if necessary (Foobar doesn't seem to do it)?
    If I was to guess, I'd say this was discussed on this forum a bit.

    The original RG standard was 83 dB reference loudness. The "new" RG standard is 89 dB. On programs like MP3Gain, you can set the reference loudness to whatever you like. However the RG algorithm built into the FLAC encoder is fixed at 89 dB.

    Josh Coalson, the FLAC developer, is a member of this forum and I believe he responded to that thread saying he was planning on making the reference loudness adjustable. This could be what he was referring to.

    I would say it could be adjusted with metaflac but I haven't looked into it yet. Theoretically you could adjust it with any program capable of reading arbitrary tags like Mp3tag, but I would think the RG tags would have to be rewritten at the same time if you adjust this? Or perhaps this means that the RG values were generated using reference loudness "X", if the decoder is using reference loudness "Y", add "Z" to the RG values - in which case the decoder would need to be updated, meaning it won't work with Slim Devices products until a firmware update.

  5. #5
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Interesting that the default is 83 dB. I can recall there was some debate on this - what it was and when it was changed. It's kind of a Twilight Zone thing, with some people insisting it was always 89 and never was changed and others insisting it was 83 and never was changed.

    There are older documents on the web that state 83:

    http://replaygain.hydrogenaudio.org/outline.html

    The reference gain is 83dB SPL, as defined in the SMPTE RP 200 standard.
    but the newer and current documents specify 89:

    http://wiki.hydrogenaudio.org/index....tle=Replaygain

    It specifies the reference level of 89dB
    The good news is with this new tag, you can decide what it is you want.
    Last edited by Mark Lanctot; 2007-01-18 at 13:18.

  6. #6
    Senior Member
    Join Date
    Mar 2006
    Location
    London
    Posts
    334
    so to be sure, I specify the REPLAYGAIN_REFERENCE_LOUDNESS before getting say foobar to work out the ReplayGains, and then all the ReplayGains will be caluclated accordingly? If I subsequently change REPLAYGAIN_REFERENCE_LOUDNESS then I have to recalc the ReplayGains again?

    Do you know if it is possible to get EAC to calculate the ReplayGains whilst ripping the CD? Or do I have do it afterwards?

  7. #7
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Quote Originally Posted by rbl View Post
    And presumably then if I set REPLAYGAIN_REFERENCE_LOUDNESS to say 80, the music will play 10dB quieter than if i set it to 90. This could then get around the problems of distortion when using ReplayGain with classical music?
    Presumably, yes. This will make those passages of music quieter overall, but the dynamic peaks will be further away from clipping.

    Note if your reference loudness isn't consistent across your music collection, your tracks won't play at the same volume level, which is the whole point of ReplayGain. However you state that your collection consists of classical and some rock. It's unlikely you'll be playing them one after the other so as long as you're consistent between genres it shouldn't be an issue.

    MP3Gain has a nice feature in that you can tell it to apply the largest gain before the onset of clipping.

  8. #8
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Quote Originally Posted by rbl View Post
    Do you know if it is possible to get EAC to calculate the ReplayGains whilst ripping the CD? Or do I have do it afterwards?
    I believe all you have to do is use --replaygain in your FLAC encoder argument. Note this won't write album gain, only track gain.

    I'm a little confused as to how the decoder interprets this tag. Presumably it needs to be updated so that it looks at the RG value then the reference loudness value and THEN informs the playback hardware/software how to make an adjustment. If that's the case, the Slim Devices embedded (i.e. firmware) FLAC decoder will need to be updated in order to use this - or am I wrong?

  9. #9
    Robin Bowes
    Guest

    ReplayGain distortion / REPLAYGAIN_REFERENCE_LOUDNESS

    Mark Lanctot wrote:
    > rbl;171530 Wrote:
    >> Do you know if it is possible to get EAC to calculate the ReplayGains
    >> whilst ripping the CD? Or do I have do it afterwards?

    >
    > I believe all you have to do is use --replaygain in your FLAC encoder
    > argument. Note this won't write album gain, only track gain.


    Correct.

    To add both, you need to process the files when they are all ripped.

    e.g. http://robinbowes.com/projects/apply_replaygain

    R.


  10. #10
    Senior Member
    Join Date
    Apr 2005
    Location
    UK
    Posts
    332
    Quote Originally Posted by Josh Coalson
    this is the (SPL) loudness level used as a reference for the
    replaygain analysis. for anything made with flac.exe it will be
    83dB and I have not seen any other tool that analyzes FLAC files
    that uses a different value, so apps should treat a missing tag
    as 83dB.

    if you want to can use metaflac-1.1.3 to remove the old tags and
    re-analyze, or (faster) just add the loudness tag.

    Josh
    Is the 83dB you've mentioned twice a typo? My most recently tagged files have 89.0dB in the REPLAYGAIN_REFERENCE_LOUDNESS tag.

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •