Hey Anyone, For the past 2 years I have been using Media Monkey to Organize and play my music collection which is now about 42,000 tracks about 75% of my collection has Replay gain Values....I am making the switch over to Foobar2000 and was about to replay gain the other 25% with it (Foobar) when I discovered that for the same album I was getting 2 different values...and it is making me wonder does Media Monkey use a different algorithm or is there something I am overlooking...both are set to tag by ALBUM with the track value put in there also. Here are my results:

Hey Anyone, For the past 2 years I have been using Media Monkey to Organize and play my music collection which is now about 42,000 tracks about 75% of my collection has Replay gain Values....I am making the switch over to Foobar2000 and was about to replay gain the other 25% with it (Foobar) when I discovered that for the same album I was getting 2 different values...and it is making me wonder does Media Monkey use a different algorithm or is there something I am overlooking...both are set to tag by ALBUM with the track value put in there also. Here are my results:

I've seen this too and was wondering if it is a Replay Gain thing or a Media Monkey thing. Seems like it's a Replay Gain thing.

Replay Gain reports a gain compensation number. This number depends on how much headroom you want to give your system to reproduce quiet but dynamic material. Originally, the standard called for a "83 dB" reference which I gather is with respect to an unconventional 0 to 96 dB scale for 16-bit audio. Most systems (bowing to the loudness war?) now implement a 89 dB reference by default. Many systems allow you to adjust the reference.

The 89 dB reference works well for popular music produced or mastered within the last 15-20 years. A lower reference is required to accommodate the dynamic range of older recordings and other generes. I personally use a 85 dB reference. The gain compensation numbers reported on my system are different than what people using an 89 dB reference report.

I've just had a look at the Replay Gain specification and find that three numbers are stored as meta data in sound files: peak level, radio (track) gain compensation, audiophile (album) gain compensation.

This means that the reference setting is only comes into play when the file is initially scanned. If I copy a file that was scanned on my (85 dB) system to a system set for an 89 dB reference, it's going to play back at the wrong (lower) level with respect to any files that have been scanned by this second system.

If I'm understanding it correctly, interoperability wise, this seems a bit broken. Wouldn't it be better to store: peak level, perceived track level, perceived album level and then compute the gain compensation immediately prior to playback based on the system's reference setting?

I have to agree. Notat, by using numbers against your ad-hoc reference, it is you who has broken replaygain.

Take this from someone who normalizes everything to 92dB prior to encoding. If you were to scan my collection you would see that my album gain would be -3dB. Playing these albums back in a RG-compliant player would bring the level down so they play at the standard reference of 89dB. If you wish to use something else you use a preamp setting. If you're worried about clipping with dynamic music, use the option that gives you clipping prevention. If your player doesn't provide these options then request that they get added or find one that does.

My take on this discussion is that MM has been unknowingly configured to give a different result, MM has a broken implementation (which I doubt), or apples are being compared with oranges because of different masterings or possible differences in HDCD decoding (as krabapple is alluding).

This post has been edited by greynol: Sep 4 2010, 18:22

--------------------

Breath is found in waveform and spectral plots;DR figures too, of course.

I have to agree. Notat, by using numbers against your ad-hoc reference, it is you who has broken replaygain.

Take this from someone who normalizes everything to 92dB prior to encoding. If you were to scan my collection you would see that my album gain would be -3dB. Playing these albums back in a RG-compliant player would bring the level down so they play at the standard reference of 89dB. If you wish to use something else you use a preamp setting. If you're worried about clipping with dynamic music, use the option that gives you clipping prevention. If your player doesn't provide these options then request that they get added or find one that does.

My take on this discussion is that MM has been unknowingly configured to give a different result, MM has a broken implementation (which I doubt), or apples are being compared with oranges because of different masterings or possible differences in HDCD decoding (as krabapple is alluding).

Well I just found out that "Sound track to the film Jack Johnson" is one of those HDCD's that is HDCD but they don't tell you like "TIME OUT" by Brubeck...both on Columbia Legacy HMMMMMMM......!!! That explains the -6db ..But I am also sure that I have had others come back with a differing level... I do not have the time right now to test and post the results...I will try to get to that later today...Thanks for everyones interest..not a day goes by that I don't learn some thing new on this forum.

Assuming you want to have universally compatible replay gain tags I'd recommend to analyze the files for replay gain without having the HDCD component installed in foobar.

IMHO, the only technically correct solution would be to create a system that would analyze and store a set of alternative replaygain tags for HDCD decoding and make HDCD decoder & foobar to use these alternative tags when the files are played.

Notat, by using numbers against your ad-hoc reference, it is you who has broken replaygain.

Take this from someone who normalizes everything to 92dB prior to encoding. If you were to scan my collection you would see that my album gain would be -3dB. Playing these albums back in a RG-compliant player would bring the level down so they play at the standard reference of 89dB. If you wish to use something else you use a preamp setting. If you're worried about clipping with dynamic music, use the option that gives you clipping prevention. If your player doesn't provide these options then request that they get added or find one that does.

My take on this discussion is that MM has been unknowingly configured to give a different result, MM has a broken implementation (which I doubt), or apples are being compared with oranges because of different masterings or possible differences in HDCD decoding (as krabapple is alluding).

MediaMonkey does not have a preamp setting. MediaMonkey does have clipping prevention. I'd like not to have to use clipping prevention because my understanding is that it lowers the gain of a track to prevent clipping. The tracks subject to this will not clip but they will be played at a noticeably lower level.

I guess I was trying to work around lack of a preamp setting by setting a different target volume. It does seem to work. What I don't understand about your comments is that if I have broken RG by using a non-standard target, why allow the target adjustable. MM is not the only application that allows you to adjust this. MM help system does not explain this setting and I don't see anything authoritative on the issue on the MM forms.

I'd like not to have to use clipping prevention because my understanding is that it lowers the gain of a track to prevent clipping.

I thought this was exactly what you wanted to accomplish, or is there a problem with not being able to lower the playback volume of all the tracks so that the track with the loudest track does not clip?

QUOTE (Notat @ Sep 5 2010, 19:16)

MM is not the only application that allows you to adjust this.

With the exception of MP3Gain (which also provides for clipping prention) can you list some of the others?

I'd like to see if David's opinion regarding whether RG is a bit broken and/or how MM has implemented it.

--------------------

Breath is found in waveform and spectral plots;DR figures too, of course.

I've downloaded Media Monkey for the first time ever this morning, and tried to figure out what it's doing.

Firstly, AFAICT, I can't make it write a REPLAYGAIN_REFERENCE_LEVEL tag. Has anyone actually seen this program generate these tags? If so, how/when/why?

Secondly, it doesn't call its implementation "ReplayGain" or use any of the conventional names for ReplayGain-related funcationality. However, it clearly credits Glen Sawyer for mp3gain and myself for ReplayGain. The documentation states that MM's volume levelling is ReplayGain...

In MM, the right-click context menu includes "Analyze volume", which seems to perform a standard ReplayGain scan and store the result in standard tags. (Note: there are settings elsewhere that will affect the whether the Album value is calculated)

The right-click context menu also includes "Level Track Volume", which seems to perform a standard mp3gain-style change to the audio data itself.

In MM, if you go to Tools, Options, Player, Volume Levelling, you will find the following settings:

Target volume level for Playback: This is a pre-amp, but instead of 0dB for "no change from ReplayGain default", it says explicitly 89dB (which is the ReplayGain default). If you change it to 90dB, that's the same as +1dB in fb2k. If you change it to 87dB, that's the same as -1dB in fb2k. etc. Just add or subtract 89dB to transform to/from the more common choice of number. The same is true for all the values discussed below.

checkbox: Level playback volume: enable or disable ReplayGain during playbackper Track / per Album: use Track or Album ReplayGain values

Target volume for leveling(sic) tracks: The target volume when using the mp3gain-style function to change the audio data itself.

Target Volume Level for Ripping Audio CDs: This is the level used if you ask the ripper to volume level the tracks. (the tooltip is completely wrong!)Level Ripped Tracks: per track / per album: use Track or Album ReplayGain values

checkbox: Clipping Prevention: This enables clipping prevention during playback, and when ripping CDs with volume levelling, but not when applying a gain change to a file AFAICT.

There's one issue that could cause unexpected problems - the mp3 encoding and decoding pipelines don't allow for values greater than 0dB. This means...1. If you choose settings that clip the audio when ripping with volume levelling enabled, that's it - the clipping is hard coded into audio data of the mp3s. You can't remove it later by lowering the level. You'll have to re-rip from the original CD.(If you enable clipping prevention, then tracks that would have been clipped will just be peak normalised instead)2. If there are sample values over 0dB "within" the mp3 file (e.g. due to normal lossy encoding of loud CDs, or CDs that you make loud by enabling volume levelling, or due to using mp3gain-like procesisng to apply a positive gain change to an mp3 file), these will get clipped during playback. It doesn't matter if you turn clipping prevention on. It doesn't matter if the ReplayGain values cause the files to be turned down anyway. The audio will still get clipped - it'll then get turned down after it's been clipped!3. The ReplayGain_track_peak and _album_peak values written by MM for mp3 files will be incorrect if the audio data "within" the mp3 peaks above 0dB FS. It'll stored any values over 1.0 as 1.0, so no software will know these files are clipped.

If you rip with volume levelling enabled, it'll write a ReplayGain_track_gain tag (only - no peak tag). If Clipping Prevention was enabled when ripping, this tag could be completely wrong - MM seems to store a value that might have been right if clipping prevention hadn't been enabled. MM seems to ignore these tags, but some other players read them, giving unwanted results (e.g. desperately quiet audio).

So, lots of things to nit-pick over, but in terms of its implementation of a pre-amp and the possibility that it may use non-standard tags, MM is actually pretty standard, even if on the surface it uses different names for everything.

I'd like not to have to use clipping prevention because my understanding is that it lowers the gain of a track to prevent clipping.

I thought this was exactly what you wanted to accomplish, or is there a problem with not being able to lower the playback volume of all the tracks so that the track with the loudest track does not clip?

What I want is for all tracks to have the same playback level. I don't want tracks with more dynamics to be played back at a lower level and I don't want them to be clipped. I'm happy to always run my DAC at a lower output level to accomplish this (and make up for it with more analog gain).

So, lots of things to nit-pick over, but in terms of its implementation of a pre-amp and the possibility that it may use non-standard tags, MM is actually pretty standard, even if on the surface it uses different names for everything.

David, thanks for taking the time to look at this. The things you found could explain some unexpected behaviors I've seen. However, I don't think anything I've posted here pertains to the hazards you've exposed. Some of the larger issues are still open as far as I'm concerned.

Maybe I didn't make it clear, so let me do so - apart from the bugs, MM isn't doing anything different from fb2k.

If you use ReplayGain via tags (i.e. don't alter the audio itself), MM writes absolutely standard tags referenced to the standard 89dB level, and thankfully there is nothing you can do to change this. "Target volume level for Playback" is a pre-amp applied at playback. Nothing more. It doesn't affect the tags.

If you choose to apply the ReplayGain change to the files (i.e. alter the audio itself, like wavgain or mp3gain etc etc), then it lets you specify the target level - just as mp3gain has done from the very beginning.

So, if you use tags, files can be shared between people without any issues.

If you apply you own choice of gain change, then shared files won't match. You'll have to re-gain them. Some software writes undo information.

If there's no undo information, and someone applied track gain, but you want album gain, or the original loudness as found on the CD, then you're stuffed. As you frequently will be in many different ways when sharing lossy files at random.

Cheers,David.

P.S. Use 83dB (MM) = -6dB (fb2k) and it'll be very rare that clipping prevention kicks in. Or at least, "very rare" overall in the grand scheme of things - I've no idea what tracks you have in your own collection.

Thanks for the clarification. What is throwing me off is that the Media Monkey interface reports different Track Volume and Album Volume values than the tags it writes. It seems to be reporting gains relative to my 85 dB Target Volume setting (i.e. tag value -4 dB) but when I change the Target Volume, neither the numbers nor the playback level seems to change. Something messed up there.

In my library I have material with album gain ranging from -13.00 dB (Californication) to +3.17 (Brothers in arms). My 85 dB setting is about optimal for this range.

when I change the Target Volume, neither the numbers nor the playback level seems to change. Something messed up there.

It certainly changes for me when you change the Target volume level for Playback. Try turning it down an extreme amount to check. You'll have to re-start playback for it to take effect though - it's not immediate.

QUOTE

In my library I have material with album gain ranging from -13.00 dB (Californication) to +3.17 (Brothers in arms). My 85 dB setting is about optimal for this range.

- well, nothing will ever get turned up, and with lossless files clipping prevention will never get applied. I assume you have a decent sound card, system, etc. in which case it will work very well.

It wouldn't be optimal if your sound card or system components were junk, because you could be throwing away dynamic range that you didn't have to spare. Lots of people seem to worry about this, not always with justification.

I am pretty sure there is a pre-amp gain setting on the EQ (I don't have MM in front of me to check).

That preamp function there is only active when you turn on the EQ feature. I assume it is useful for avoiding clipping due to aggressive EQ settings. I don't know if it's in the right place in the signal path to help with Replay Gain clipping.

If you want complete and total accuracy, the ReplayGain tags stored in the files are 6dB above the gain adjustments required to make the files "sound as loud" as a -20dB RMS pink noise signal when replayed in an SMPTE RP 200 calibrated system. The -20dB RMS pink noise signal will measure 83dB SPL at the listener's seat in such a system. The extra 6dB included in the stored ReplayGain values has been standard for over 7 years - just because I never updated the RG website, please don't suggest it's more "correct" to write tags referenced to 83dB - that would be wrong.

I was going to point you to the HA wiki as being more up to date, but I see you've edited it...!