Replay Gain: A how to informational

I am referring to using MP3Gain to set the replaygain values. MP3Gain uses Apev2 tags and I do not see how to change it. MP3Gain also writes a plus (+) sign at the beginning of the replaygain value ,if it is a positive value, and the Clip+ doesn’t know how to handle it.

Merry Christmas :stuck_out_tongue:

The problem with MP3Gain is, it does not work via tags but modifies the file directly. The tags are only a backup information to be able to restore the original file. And it only works on MP3 files, as the name suggests.

I have a slightly different problem with my clip+ and replay gain. The replaygain values are listed correctly in both foobar2k and clip+, but there is no change in volume when switching between the off/song/album modes and the files with replay gain tags are clearly louder than files that had the replaygain applied to the data (lossy). 

Before someone says it’s foobar’s fault, the replaygain values were done with the official encoder (1.2.1b) via the --replay-gain switch.

If the clip+ has problems reading those tags it simply means replay gain is not implemented correctly.

And what’s more interesting, i went and installed mediamonkey and scanned the same track with foobar, official and mediamonkey. My results:

The only difference between foobar replay gain tags and official tags is one additional tag namely REPLAYGAIN_REFERENCE_LOUDNESS, which is set to 89.0dB per default (and the fact i scanned in track mode while the official encoder scans in album mode). Everything else is the same.

All 3 files’ replay gain tracks are recognized by the clip+ correctly

All 3 files sound louder than my mp3 version of the same song (which has the track gain applied) in off/song/album mode

With all 3 files, there is no volume difference between off/song/album mode

My clip+ firmware is V01.01.05F (don’t know if it’s the newest, the updater doesn’t like me (click me) (win7 x64))

foobar:

foobar tags

official tags:

  official tags

Now, let’s see how MM tags look like:

  media monkey tags

After comparing the tags, you can clearly see which program behaves incorrectly - MediaMonkey, not foobar.

Now let’s assume MediaMonkey’s replay gain tags do work and i’m an exception.

This means that to be able to use the whole potential of my player, i am forced to use a specific program. That was initially one of the reasons i decided against buying an apple product, but now i am being told there is no other way (at least atm) around it again - not good.

andied wrote:
I am referring to using MP3Gain to set the replaygain values. MP3Gain uses Apev2 tags and I do not see how to change it. MP3Gain also writes a plus (+) sign at the beginning of the replaygain value ,if it is a positive value, and the Clip+ doesn’t know how to handle it.

MP3Gain works directly on the files run through it and alters the gain in them (which can be reversed or otherwise modified, simply by running MP3Gain on the songs/files again), and so does not rely on software on individual players themselves (including the Clip and Clip+).  That’s the nice universality of it. 

After further testing and getting to know the idiosyncrasies of MP3Gain, I can get it to work with the Clip+.

Loading files and clicking “track Analysis” will immediately (actually 3x slower than Foobar2000) analyze and write volume gains to the file(s). If left at this point, and the volume value is positive, the tag begins with a “+” (+0.17), which the Clip+ reads as “-48.83” - much too low to be useable. However if “Track Gain” is selected, MP3Gain writes info to the file and the Clip+ will play the song with proper volume, although the Clip+ cannot read the replaygain info - I assume because it is Apev2.

It is good to have choices - I will stick with Foobar2000

edit: should be:  “although the Clip+ cannot display the replaygain info”

Message Edited by andied on 12-25-2009 12:47 PM

@Soukyuu

I have found that changing the ReplayGain setting in the Clip+ (song/album/off) does take effect until I return to the music list and re-start the song - obviously difficult to hear a difference when the replaygain value maybe less than +/- 1 db. I manually altered the RG value by 10db and could definitely hear the difference between RG on or off.

I guess my mistake was to assume i could change between modes on-the-fly.

All 4 test files  seem to sound the same now…

So i guess the only question now is, how the official encoder handles the positive gain vs. foobar vs. MM… i’m going to do some tests later.

For your consideration.

a) Replaygain (probably!) is exclusively known, used and understood by foobar2000 folks. Honestly, I don’t think it is widely used outside the fb2k/hydrogenaudio.org world.
b) It shouldn’t be rocket science for the Clip+ to interpret " " or “+” the same way.

Thanks in advance

andied wrote:

After further testing and getting to know the idiosyncrasies of MP3Gain, I can get it to work with the Clip+.

 

Loading files and clicking “track Analysis” will immediately (actually 3x slower than Foobar2000) analyze and write volume gains to the file(s). If left at this point, and the volume value is positive, the tag begins with a “+” (+0.17), which the Clip+ reads as “-48.83” - much too low to be useable. However if “Track Gain” is selected, MP3Gain writes info to the file and the Clip+ will play the song with proper volume, although the Clip+ cannot read the replaygain info - I assume because it is Apev2.

 

It is good to have choices - I will stick with Foobar2000

 

edit: should be:  “although the Clip+ cannot display the replaygain info”

Message Edited by andied on 12-25-2009 12:47 PM

If you use MP3Gain on your files, then you should disable the ReplayGain on the Sansa, as it will no longer be needed. That’s the whole point of why Miikerman brought it up, I believe.

If you use MP3Gain on your files, then you should disable the ReplayGain on the Sansa, as it will no longer be needed. That’s the whole point of why Miikerman brought it up, I believe.

Actually you should probably still use the Replaygain values on the Sansa. mp3gain is only capable of making changes in 1.5dB increments. It will adjust the gain losslessly by modifying the mp3 headers. Unfortunately it stores modification information in APE tags. To get the most benefit out of the RG “experience” you would want to rescan the mp3gain-modified files with foobar2000 or Media Monkey to get the difference mp3gain could not account for.

Clear as mud? :smiley:

One other thing. foobar2000 is capable of modifying the mp3 headers just as mp3gain does. However, there is no undo after you apply the gain changes. foobar2000 then modifies the RG tags to reflect the difference.

As someone mentioned earlier mp3gain is agonizingly slow. foobar2000 appears to be able to take advantage of multi-core CPUs during its scan process. I’ve incorporated some Powershell scripts I created to apply the RG values created by foobar2000 to the tags that mp3gain uses. The scripts then call mp3gain to apply the changes and subsequently updates the foobar2000 RG tags. Whew!

FYI: The latest available version of mp3gain (1.5.1) has an option to use id3 tags instead of APE. It doesn’t use TXXX frames though. It uses RVA2 (Relative Volume Adjustment) frames. In truth this is probably the truly “correct” way of implementing volume adjustment.

I’ll shut up for now.

I’m so glad I have a player that takes care of it for me, rather than go through all this hassle with ReplayGain, MP3Gain, etc…:smileyvery-happy:

With all the back and forth RE ReplayGain, it probably does seem a bit obtuse, but really it is quite simple (once the problem was isolated). Foobar2000 does a really good job of writing replaygain tags (and very fast); the only issue is that the Clip+ doesn’t read a positive “+” value correctly, but the “fix” is trivial and hopefully Sansa will include this “fix” in a firmware update.

I don’t find MP3Gain to be either a hassle or slow.  Yes, if you are running MP3Gain on a large number of albums, it will take time.  But it’s only done once–just leave it running overnight.  For just a single or a few albums at a time, it’s done in very little time.

@miikerman wrote:
I don’t find MP3Gain to be either a hassle or slow.  Yes, if you are running MP3Gain on a large number of albums, it will take time.  But it’s only done once–just leave it running overnight.  For just a single or a few albums at a time, it’s done in very little time.

To each his own; it is good to have choices. For those happy with MP3Gain, stay with it. I am just trying to point out to those that use Foobar2000 that it works really well also.

Hi,

I’m using mp3gain 1.5.1 under LInux. I have tried the following.

mp3gain -s i *.mp3

this does not work, probably for the reasons stated in the posts before.

Is there any way to make mp3gain work using tags only ?

If yes, which options ?

If not, is there any other tool in linux that can write the tags so the clip+ sees them correctly ?

andied wrote:


@miikerman wrote:
I don’t find MP3Gain to be either a hassle or slow.  Yes, if you are running MP3Gain on a large number of albums, it will take time.  But it’s only done once–just leave it running overnight.  For just a single or a few albums at a time, it’s done in very little time.


To each his own; it is good to have choices. For those happy with MP3Gain, stay with it. I am just trying to point out to those that use Foobar2000 that it works really well also.

Absolutely.  I just started with MP3Gain with my main player because it didn’t have ReplayGain capability.  I like the fact that MP3Gain’ed files are playable on any player.

After filling my clip+ with mixed content (flac w/ applied gain, mp3 w/ applied gain & flac w/ RG info created by the reference encoder) and listening to it in shuffle mode, i noticed my clip+ sees the tags correctly, but ignores them completely. There is a clear drop in volume after switching from a file with RG info and a file with gain permanently applie.

I’m going back to applying gain to my files until this is fixed.

Note: this is not the positive gain bug, the gain is negative on all files and is being read correctly.

I’m not sure if it’s because clip+ doesn’t support the tags created by the reference encoder (which is not a god idea if this is the case!) or if clip+ is defective.

Hi all, this is my first time using replay gain and I would like some help. I made a test folder on the clip+ with two songs that I had levelled the volume on using media monkey. Playing the two songs on my computer through media monkey they both have the same equal volume. But when turning on the replay gain feature on the clip and switching between the same two tracks, there is a big difference, one is really loud in comparison. Is my clip+ faulty? Everything else works fine as far as I can see. If its faulty can a firmware upgrade fix this, or should I return it?

Veni

EDIT: Just checked the track info when the songs are playing, cant see any information there regarding any replay gain values

EDIT #2: Fixed!

Okay I gathered some mp3s (varying volumes) together and put them in THREE separate folders on the clip. One folder MP3GAIN where they were all set to the default 89db. One folder MONKEY where the mp3 tags had been updated with Media Monkey to 89db. Last folder FOOBAR with the tags being changed to level the volume again to 89db. After I had transferred them to the clip I listened through the folders with Replay gain turned off, this was the setting when the folders were transferred to the clip. Obviously all the volumes were varying except in the MP3GAIN folder where the volume of the mp3s had been changed. So then I turned Replay Gain onto ‘Song’ mode. The mp3s inside MONKEY and FOOBAR still had erratic volume levels and checking the track info on the mp3s in both folders there was no sign of any replay gain info. BUT THEN I turned the player on and off and suddenly… track info in both MONKEY and FOOBAR folders show replay gain info, its right at the bottom, just keep down clicking even if it shows less than a full page of info on the screen you think is the last one. The FOOBAR replay gains looked messed up, -40db etc. But the MONKEY folder had all the gains correctly and the volumes of the mp3s played in that folder now sounded pretty much level. One thing I noticed was that the level that Media Monkey decides to set the volumes to is a little higher than what MP3GAIN considers 89db, perhaps its a resolution thing. Once I had it working, I was able to turn replay gain on and off without restarting the clip again and I could notice the difference immediately. So in essence, try and turn your player on and off after you select replay gain on. I hope this helps someone - btw I was using Media Monkey version 3.01

Slightly off topic, I have all my mp3s on the clip in seperate folders for each artist and the file name is the song title. Is there a way or program that could analyse all the folders and for each mp3 fill in the ID3 tags so that the artist name is taken from the folder the mp3 is in and the song name is taken from the mp3 file name?

Veni

Message Edited by Veni on 01-09-2010 07:48 AM

“The FOOBAR replay gains looked messed up, -40db etc”

From my experience that would indicate that the ReplayGain value was approx “+10.00”. Replacing the “+” with a zero should set the proper value in the Clip+.

Yes I believe you’re right. I have actually decided to not bother with Replay Gain after all, I mean MP3Gain does everything I need, but Im glad I got it working. I know that Mp3Gain has a resolution of ±1.5db and it seems Media Monkey has one of ±0.5db so I would guess that would get the volume levels closer, but I did could not really percieve the differences. Btw I managed to fix my mp3 tags as above, using Mp3Tag.