QUOTE(Crocodil @ May 23 2003 - 10:17 AM)
But than I've noticed one thing... Why the "REPLAYGAIN_TRACK_GAIN" and "REPLAYGAIN_ALBUM_GAIN" are with only 0.5dB adequacy?? I use foobar2000 and it's more adequate... I know MP3Gain has to use 0.5dB steps when replaygaining but does it have tu use them here?
I don't know much about mp3 and maybe it doesn't matter but if it does could you pretty please do something with it?
Having tried it myself, it is using +/- 1.5 dB accuracy on screen, as it always has, because 1.5dB is the minimum step size it can apply. (Actually, it might some non-round number like 1.55 dB, I think)
1.5 dB is the minimum step size in the MP3 format's global gain field, so it's the smallest step you can apply easily without having to re-encode the MP3 (which is transcoding and causes a permanent loss of quality)
Although at certain frequencies, smaller changes that 1.5 dB can be perceived (just!), it really accurate enough for audible purposes in setting track volume to be roughly equivalent. Foobar2000 has 0.01dB steps, which is overkill, but harmless.
mp3gain writes a tag called MP3GAIN_MINMAX and another called MP3GAIN_UNDO to an APEv2 tag, and it adjusts the tags shown in Foobar2000 (Reload from file to see the changes) by the gain it has applied.
If you've already scanned the file in Foobar2000 and added APEv2 tags with the Replaygain info in them, mp3gain doesn't even need to scan the files - it just uses and trusts the gain and peak info supplied by Foobar.
Here's a test I did:
1. Use erhu.flac (decoded to wav) test problem sample
2. Encode using lame --alt-preset standard -Z to erhu_APSZ.mp3
3. Load it into mp3gain v1.1beta. No info shows.
4. Scan track gain. MP3gain reports Track Volume = 91.2 dB, Track Gain = -1.5 dB, Max No Clip Gain = 6.0 dB
5. Don't apply track gain, just add file to Foobar2000 without playing.
6. Examine file info (Reload from file). The following tags are shown:
MP3GAIN_MINMAX = 146,175
REPLAYGAIN_TRACK_GAIN = -2.1600 dB
REPLAYGAIN_TRACK_PEAK = 0.4739
So clearly, mp3gain is only displaying to 1.5 dB (and 0.1 dB for track volume) but is scanning to the same resolution as Foobar2000. However, unlike fb2k, it may use each mp3 frame (26 ms) as its loudness measuring window, while I think fb2k uses 50 ms chunks.
Continuing the experiment:
7. Apply Track Gain
Now displays are 89.7 dB, 0.0 dB, 7.5 dB
8. Foobar2000: Reload info from file: (It's a shame that mp3gain can't force FB2K to update its database, if the database is enabled)
MP3GAIN_MINMAX = 145,174
MP3GAIN_UNDO = +001,+001,N
REPLAYGAIN_TRACK_GAIN = -0.6550 dB
REPLAYGAIN_TRACK_PEAK = 0.3985
So it appears that -1.505 dB gain has been applied (and this concurs with the change in track_peak value)
9. Now in MP3Gain, Undo Gain Changes (right click menu)
Now displays are: 91.2, -1.5, 6.0 as before.
10. Foobar2000: Reload info from file:
MP3GAIN_MINMAX = 146,175
MP3GAIN_UNDO = +000,+000,N
REPLAYGAIN_TRACK_GAIN = -2.1600 dB
REPLAYGAIN_TRACK_PEAK = 0.4739
11. MP3gain: Undo gain changes. No change to display.
12. Apply Track Gain, and everything is same as before.
13. Remove tags from file.
14. FB2K reload info
15. FB2k Scan per file track gain
16. View info: Track gain = -1.150000 dB, track peak = 0.473909
So FB2k has calculated a different value, which is to be expected given its different chunk size and implementation, but isn't significant enough to worry about. The peak value, as expected, is identical (only it's calculated to 6 dp in the version 0.62)
17. MP3gain. Clear analysis then Add File.
Display reads: 90.2 dB, -1.5 dB, 6.0 dB having read info from tags, as supplied by Foobar2000.
18. FB2k, info still as in step 16.
19. MP3Gain Apply Track Gain.
Display is now: 88.6 dB, 0.0 dB, 7.5 dB
20. Fb2k: Reload info:
(there is no MP3GAIN_MINMAX tag)
MP3GAIN_UNDO = +001,+001,N
REPLAYGAIN_TRACK_GAIN = +0.3550 dB
REPLAYGAIN_TRACK_PEAK = 0.3985
Note that the tags are only to 4 decimal places now.
21. MP3gain: Undo gain changes.
Display: 90.2 dB, -1.5 dB, 6.0 dB
22. Fb2k: Reload info:
(there is no MP3GAIN_MINMAX tag)
MP3GAIN_UNDO = +000,+000,N
REPLAYGAIN_TRACK_GAIN = -1.1500 dB
REPLAYGAIN_TRACK_PEAK = 0.4739
Seems to work fine, and the loss of the 3rd and 4th dec places is negligible.
I thought I'd found a bug with the APS (no -Z) encode of erhu_APS.mp3, but I couldn't reproduce it. I thought maybe I rescanned in FB2K and the undo data messed up, but didn't seem to happen on a second try with the same file.