Background:
I frequently listen to shuffled music and find the volume difference between songs to be somewhat annoying. Fixing this issue is primarily a tagging exercise. I use MP3Tag for all tagging, so I wanted the capability to adjust playback volume from within MP3Tag.
I decided to use mp3gain.exe for this because:
-
it uses ReplayGain (IMO, a better implementation than peak leveling, e.g. the method used by Apple's Soundcheck),
-
it has a good command line interface,
-
it supports ID3 tags (Version 1.5.2), and
-
it has an "Undo" function
Implementation:
I used MP3Tag's Export tool to build 7 Export Configurations (similar to the way ReplayGain is integrated into Foobar2000):
RG1 - Analyze selection as individual tracks:
$filename(c:\Utils\MP3Gain\RG.bat)
$loop(%_filename_ext%)c:\Utils\MP3Gain\mp3gain /s i "%_folderpath%%_filename_ext%"
$loopend()
RG2 - Analyze selection as a single album:
$filename(c:\Utils\MP3Gain\RG.bat)
c:\Utils\MP3Gain\mp3gain /s i $loop(%_filename_ext%)"%_folderpath%%_filename_ext%" $loopend()
RG3 - Analyze selection as albums (by folder):
$filename(c:\Utils\MP3Gain\RG.bat)
$loop(%_folderpath%)c:\Utils\MP3Gain\mp3gain /s i %_folderpath%*.mp3"$loop(%_filename_ext%%)$loopend()
$loopend()
RG4 - Apply Track RG to selected MP3 files:
$filename(c:\Utils\MP3Gain\RG.bat)
$loop(%_filename_ext%)c:\Utils\MP3Gain\mp3gain /s i /k /r "%_folderpath%%_filename_ext%"
$loopend()
RG5 - Apply Album RG to selected MP3 files
$filename(c:\Utils\MP3Gain\RG.bat)
$loop(%_filename_ext%)c:\Utils\MP3Gain\mp3gain /s i /k /a "%_folderpath%%_filename_ext%"
$loopend()
RG6 - Undo RG for selected tracks:
$filename(c:\Utils\MP3Gain\RG.bat)
$loop(%_filename_ext%)c:\Utils\MP3Gain\mp3gain /s i /u "%_folderpath%%_filename_ext%"
$loopend()
RG7 - Remove RG tags (can't Undo):
$filename(c:\Utils\MP3Gain\RG.bat)
$loop(%_filename_ext%)c:\Utils\MP3Gain\mp3gain /s i /s d "%_folderpath%%_filename_ext%"
$loopend()
Other:
It certainly is possible to add more functionality with more complex Export Configurations. For example, I have one (RGX) that combines RG4 and RG5. I tag each track (take a field that you don't use, e.g. %encodersettings%) with mp3gain.exe parameters. Instead of explicitly containing the "/a" (album) or "/r" (track) parameter, RGX uses %encodersettings% to add the "/a" or "/r" into the export file. If I wanted to bump up the volume a little bit for a particular track, I put "/r /m 3" in the %encodersettings% field.
Future:
I'd be interested in help with improvements, including, but not limited to!:
-
Adding ReplayGain, as a context menu item (like Export, Converter, Tools, etc.), and having these 7 functions and/or others available in the submenu.
-
Suppressing the dialog box that confirms that you want to open the export file.