MP3Gain

v 0.7.x

Copyright © 2002 by Glen Sawyer


Overview

MP3Gain analyzes mp3 files to determine how loud they sound to the human ear. It can then adjust the mp3 files so that they all have the same loudness without any quality loss. This way, you don't have to keep reaching for the volume dial on your mp3 player every time it switches to a new song.

MP3Gain operates in two modes, Radio and Album.

Radio mode allows a mix of unrelated songs to be volume-corrected to a selected level. MP3Gain calculates the volume level for each song individually. It then corrects each song to make its volume level match the Target Volume. For example, if you have 3 songs that have volume levels of 86, 91 and 89 dB and you use Radio Gain to convert them to the Target Volume of 98 dB, they will all be at approximately 98 dB.

Album mode allows a selection of related songs (as they would appear on an album) to be volume-corrected relative to each other. MP3Gain first calculates the album volume level by finding the volume level of each song and then calculating a volume level for the entire album. It then finds the ratio between the album volume level and the Target Volume. It then corrects the volume for each song based on the ratio. For example, if you have 3 songs that have volume levels of 86, 91 and 89 dB and an album volume level of 90 and you use Album Gain to convert them to the Target Volume of 98 dB, then the 3 songs will be corrected to 93.6, 99 and 96.9 dB respectively:

Album volume level 90 / Target Volume 98 = 1.088888

Song #1 volume level 86 dB * 1.088888 = 93.6 dB

Song #2 volume level 91 dB * 1.088888 = 99.0 dB

Song #3 volume level 89 dB * 1.088888 = 96.9 dB

With Album mode, you want some songs to be noticeably quieter than other songs, just like they are on an album. If you're playing a classical CD, you expect the track with the flute solo to be quieter than the track with the big full-orchestra finale. Album mode allows you to correct an entire album while keeping each song's volume level relative to the other songs.

MP3Gain is completely freeware. No registration, no time limits, no disabled features, no annoying pop-up messages, or anything like that.

There will always only be one current version of MP3Gain, and that version will always be freely available to everyone.

With that said, if you really like this program and feel like making a donation to the author, you can find the appropriate information by clicking Help -> About in the menu.


Concepts

Peak Normalization

Most programs that “normalize” sound files do so by adjusting all the samples so that the loudest single sample is at some specified value. This is not a good way to make all the files actually have the same loudness. First of all, the human ear does not hear the loudness of single samples. It averages out sounds over time. Secondly, today's popular music CDs are heavily compressed. The sound engineers making the CD raise the average level so that it sounds much louder, while compressing the loudest parts so that they don't distort. A typical uncompressed sound file might look like this:

A typical compressed sound file might look like this:

Both of these files have a peak sample at about 100%, but the compressed file has a much louder average level. It sounds much louder when played back. So to do actual loudness normalization instead of peak normalization, we need to calculate how loud the file actually sounds. MP3Gain uses the Replay Gain algorithm to calculate this loudness.

Lossless Gain Adjustment

The bad news: MP3Gain can only adjust the volume of your mp3 files in steps of 1.5 dB.

The good news: 1.5 dB is a small enough step for most practical purposes. Most humans can just barely hear a volume change of 1 dB.

The other good news is that this volume adjustment is completely lossless. In other words, if you adjust an mp3 by -6 dB and then change your mind, you can adjust it again by +6 dB and it will be exactly the same as it was before you made the first adjustment.

Here's the technical reason why it's lossless, and also why the smallest change possible is 1.5 dB:

The mp3 format stores the sound information in small chunks called “frames”. Each frame represents a fraction of a second of sound. In each frame there is a “global gain” field. This field is an 8-bit integer (so its value can be a whole number from 0 to 255).

When an mp3 player decodes the sound in the frame, it uses the global gain field to multiply the decoded sound samples by 2 ^ (gain / 4).

So if you add 1 to this gain field in all the frames in the mp3, you effectively multiply the amplitude of the whole file by 2 ^ (1/4) = 119% = +1.5 dB.

Likewise, if you subtract 1 from the global gain, you multiply the amplitude by 2 ^ (-1/4) = 84% = -1.5 dB.


QuickStart

OK, so you want to use MP3Gain without having to read this entire manual. Here's what you need to do to modify your first mp3:

Step 1 | Click the Add File(s) button
Step 2 | Navigate to where the file you want to convert is and select it
Step 3 | Set your Target Volume in Decibels (dB) in the Target "Normal" Volume field.
Step 4 | Click the Radio Analysis button MP3Gain will analyze the file and report on its current volume level as well as the increase required to meet the target volume. Make note of the mp3's original volume level (the value under the Volume column) if you want to modify the volume setting back to its original value.
Step 5 | Click the Radio Gain button [image] to modify the mp3 with the volume settings you chose for Target "Normal" Volume.
Step 6 | Listen to your new mp3. If it sounds too loud or quiet, adjust the Target Volume setting and click Radio Gain again.


MP3Gain Interface

The MP3Gain Interface has 5 sections:

Menus

Button Bar

Target Volume

File List

Status


Menus

MP3Gain has the following menu items available:

File

Analysis

Modify Gain

Options

Help


File menu

The File menu has the following items:

Add Files (Ctrl-F) | This allows you to add files to be corrected. Added files appear in the File List.
Add Folder (Ctrl-D) | This allows you to add an entire folder instead of having to manually select all file in a folder. Added folders appear in the File List.
Select All Files (Ctrl-A) | This selects every file in the File List. This option is unavailable if the File List is empty.
Select No Files (Ctrl-N) | This unselects every file in the File List. This option is unavailable if the File List is empty.
Invert selection (Ctrl-V) | This inverts or toggles the selection status of every file in the File List. If a file is selected, it becomes unselected. If a file is unselected, it becomes selected. This option is unavailable if the File List is empty.
Clear selected file(s) | This will remove all selected files from the File List. This option is unavailable if the File List is empty.
Clear All files | This will remove all files from the File List. This option is unavailable if the File List is empty.
Exit | This quits MP3Gain.


Analysis menu

The Analysis menu has the following items:

Radio Analysis (Ctrl-R) | This will analyze each file individually and then list details of the file. See the File List section for information about the columns.
Album Analysis (Ctrl-U) | This will analyze each file in the Album as part of a whole and then list details about the files. See the File List section for information about the columns.
Clear Analysis | This will clear the analysis results in the File List. The files will remain in the list, but will have their column info deleted.


Modify Gain menu

The Modify Gain menu has the following items:

Apply Radio Gain (Ctrl-G)

This will volume-correct all files listed in the File List to match the Target Volume.

Apply Album Gain (Ctrl-B)

This will volume-correct all files listed in the File List so that the overall album volume matches the Target Volume.

Apply Constant Gain... (Ctrl-O)

This will launch the Constant Gain dialog.

Here you can specify an absolute gain change in dB instead of a Target Volume. Just move the slider until the dB field indicates the amount of gain desired. Increments are in 1.5 dB.

You can also apply gain to a particular channel if you have a file where the right or left channel is louder or softer than the other channel. Check the Apply to only one channel box and then choose which channel by clicking the radio button beside the desired channel.


Options menu

The Options menu has the following items:

Always on Top

If this option is checked, the MP3Gain window will always stay on top of other windows.

Work on Selected files only

If this option is checked, then only those files that are actively selected will be operated on if you do an Analysis or Gain.

Each folder is album

If checked, then when you do an Album analysis, all mp3s in a folder are considered to be part of the same album. If this option is not checked, then when you do Album analysis, all the mp3s in the whole list are considered to be individual files.

Add Subfolders

If checked, then when you Add a Folder, all of the mp3s in all of the folders inside the selected folder will be added to the list.

Preserve file date/time

If checked, changed files will keep their original timestamp. If unchecked, changed files will update their timestamp to when the file was changed.

Logs...

You can have MP3Gain log operations to various logfiles. Selecting this item will launch the Logs window:

You can specify the directory and filename for log files that will collect all errors, analysis results and changes made.

Toolbar

You can modify the look of the toolbar with this item. Available options for the toolbar are:

Big Buttons

Small Buttons

Text Buttons

No Buttons

Filename Display

You can select how files are displayed in the File List. By default, files are shown with their full path and filename. Available options for the filename display are:

Show Path/File

Show File only

Show Path & File

Reset Default Column Widths

This option will reset the column position & size to their default settings. Use this if you accidentally hide a column under another, or off the screen.

Reset "Warning" messages

The first time you click on Clear Analysis it pops up with a Yes/No dialog box asking if you really want to clear the analysis results. On the dialog box, there's a check box that says Don't ask me again. If you check that box, the program stops warning you when you're about to clear analysis results.

Clicking Reset "Warning" Messages makes that Clear Analysis warning box start popping up again.

Advanced...

Advanced options allows you to modify Thread Priority and Performance variables.

Thread Priority | This adjusts what priority the program has in using your computer's resources. If you know what this means, feel free to play with this setting. If you don't know what this means, just leave it alone :)
Performance | On some computers, applying a gain change to a file causes the computer to either slow down considerably or stop responding completely. If this happens to you, check the Use Temp Files box and/or the Do NOT show file progress box. Depending on your computer configuration, one or both of these should fix the problem.
Enable "Maximizing" features | Under development.


Help menu

The Help menu has the following items:

Contents | This launches this help file.
Disclaimer | This is a standard software disclaimer that indicates that the author of MP3Gain is not liable for any damages to anyone or anything, anywhere, for any reason, forever.
About | This gives you information, such as the current version of the interface and backend, contact information for the author and newer versions of MP3Gain, and methods of supporting the author with a donation.


Button Bar

Note that the Analysis buttons (Radio/Album) and Gain buttons (Radio/Album/Constant) are switchable by using the small arrow to the immediate right of the button. For example, if the Radio Gain button is visible, you can choose either the Album Gain or Constant Gain buttons by clicking on the arrow and making your selection.

The Button Bar has the following icons:

Radio Analysis | This will analyze each file in the File List and calculate the file's volume level.
Album Analysis | This will analyze each file in the File List as part of the album and calculate the total album volume level.
Radio Gain | This will correct all files in the File List using the Target Volume in Radio mode.
Album Gain | This will correct all files in the File List using the Target Volume in Album mode.
Constant Gain | This will correct all files in the File List using the dB value indicated by the slider in the Constant Gain Change dialog.
Add File(s) | This will bring up a File browse dialog that lets you navigate to a folder and then add one or more files from that folder to the File List.
Add Folder | This will bring up a Directory browser that lets you navigate to a folder and then select it. All files in that folder will be added to the File List. If Add Subfolders is checked under Options, then all folders under the selected one will also be selected and their files added to the File List.
Clear Files | This will remove selected files from the File List.
Clear All | This will remove all files from the File List.


Target Volume

The Target Volume has two meanings depending on the Gain mode you chose.

If you are in Radio mode, then the Target Volume is the volume level that you would all files to be corrected to.

If you are in Album mode, then the Target Volume is the volume level that you would like the entire file collection to be corrected to while still keeping their volume levels relative to each other.

Doing some analyses on several of your albums will give you a feel for which values generate louder or softer sound. Experiment and see what you get.


File List

The File List shows you all files that have been added for processing. Files that appear in RED, that means one of the following conditions has happened:

  • If you are doing an Analysis, the file is currently clipping.

  • The file will be clipped if you apply Radio Gain

  • The file will be clipped if you apply Album Gain

There are several columns that give information after an Analysis and Gain:

Volume | The current volume of the mp3, in dB SPL. If you play back the mp3 in a calibrated system, it will have this average sound pressure level in decibels.
clipping | This column has a Y if the mp3 file is currently clipping. “Clipping” means that when the mp3 file is decoded by your player, some of the sound samples will be too loud. The player will “clip” these samples so that they do not exceed the maximum allowable value. This clipping creates a sort of rough, “scratchy” sound during loud parts of the song.
Radio Gain | The dB change that should be applied to this mp3 so that its average volume is as close to the target volume as possible.
clip (Radio) | This column has a Y if the mp3 will clip if the suggested Radio Gain is applied.
Album Volume | The current overall volume of the Album.
Album Gain | The dB change that should be applied to all the mp3s in the Album so that the overall volume is as close to the target volume as possible.
clip (Album) | This column has a Y if the mp3 will clip if the suggested Album Gain is applied.

(*) - The Radio Gain and Album Gain columns are rounded to the nearest 1.5 dB change. The lossless method MP3Gain uses to modify mp3 files is limited to 1.5 dB as the smallest possible volume change.

If there is a ??? in the clip column for a file, then the mp3 probably has some bad data in it. This bad data could have been caused by a download error, a poor job of splicing two mp3s into one, or other factors. Listen closely to the mp3, and somewhere you'll probably be able to hear a loud click, pop, “chk”, or other sound. Because of this bad data, the program cannot accurately determine the maximum amplitude, because the bad data is causing extreme clipping.

Fortunately, in most cases the amount of bad data is small enough that it does not affect the calculation of the overall volume of the file. The suggested Radio and Album gains are still valid.


Status

The two Status bars and Status line at the bottom of the MP3Gain interface are designed to give you an idea about what MP3Gain is currently doing and how far along a file or batch is during Analysis or Gain operations.

If a single file is being worked on, only the File progress bar will be updated. The Status line will show what MP3Gain is currently doing.

If several files are being worked on, then both the File progress and Total progress bars will be updated. The Status line will show what MP3Gain is currently doing. In the example below, the current file is 25% finished, while the entire batch of files being processed is 50% finished.


How Do I...?

Correct Several Unrelated Songs

Correct a Complete Album of Songs


Correct a Single Song

Please refer to the MP3Gain QuickStart for directions for correcting a single song.


Correct Several Unrelated Songs

Step 1 | Click the Add File(s) button
Step 2 | Navigate to where the files you want to convert are and select them, then click Open. This will add them to the File List. You can then add more files until all the files that you want to work with are in the File List.
Step 3 | Set your Target Volume in Decibels (dB) in the Target "Normal" Volume field, or leave it at the default of 89.0.
Step 4 | Click the Radio Analysis button MP3Gain will analyze the files and report on their current volume level as well as the increase required to meet the target volume. Make note of the mp3's original volume level (the value under the Volume column) if you want to modify the volume setting back to its original value.
Step 5 | Click the Radio Gain button [image] to modify the files with the volume settings you chose for Target "Normal" Volume.
Step 6 | Listen to your new mp3s. If they sound too loud or quiet, adjust the Target Volume setting and click Radio Gain again.


Correct a Complete Album of Songs

Step 1 | Click the Add Folder button
Step 2 | Navigate to where the folder that you want to convert is and select it
Step 3 | Set your Target Volume in Decibels (dB) in the Target "Normal" Volume field.
Step 4 | Click the Album Analysis button MP3Gain will analyze all of the files and report on each song's volume level, whether any clipping occurred, and other detals including the combined album volume level as well as the correction required to meet the Target Volume. Make note of the mp3's original volume level (the value under the Volume column) if you want to modify the volume setting back to its original value. You can also check the Analysis log if you have it enabled for these details.
Step 5 | Click the Album Gain button [image] to modify the album with the volume settings you chose for Target "Normal" Volume.
Step 6 | Listen to your new mp3s. If they sound too loud or quiet, adjust the Target Volume setting and click Album Gain again.


Credits

MP3Gain written by Glen Sawyer

ReplayGain idea, concepts & website by David Robinson

Control buttons by Marc Heubeck

Help file by Bill MacEachern

The latest version of MP3Gain can be found at http://www.geocities.com/mp3gain/

For more information about ReplayGain analysis, please see the ReplayGain website at http://www.replaygain.org/

MP3Gain is completely freeware. No registration, no time limits, no disabled features, no annoying pop-up messages, or anything like that.

There will always only be one current version of MP3Gain, and that version will always be freely available to everyone.

With that said, if you really like this program and feel like making a donation to the author, you can find the appropriate information by clicking Help -> About in the menu.