Gamingforce Interactive Forums
85239 35211

Go Back   Exploding Garrmondo Weiner Interactive Swiss Army Penis > Garrmondo Music and Trading > Behind the Music

Notices

Welcome to the Exploding Garrmondo Weiner Interactive Swiss Army Penis.
GFF is a community of gaming and music enthusiasts. We have a team of dedicated moderators, constant member-organized activities, and plenty of custom features, including our unique journal system. If this is your first visit, be sure to check out the FAQ or our GFWiki. You will have to register before you can post. Membership is completely free (and gets rid of the pesky advertisement unit underneath this message).


For those who still don't know what Replaygain is...
Reply
 
Thread Tools
Kaiten
Everything new is old again


Member 613

Level 29.60

Mar 2006


Reply With Quote
Old Mar 2, 2006, 08:55 PM Local time: Mar 2, 2006, 06:55 PM #1 of 7
For those who still don't know what Replaygain is...

.:::Replaygain for Newbies and the Confused:::.
Version 1.33G FINAL (Updated Monday, February 06, 2006)

.::What Is Replaygain?::.
The concept is Replaygain is confusing to most novice, intermediate and even some audiophile digital audio users (there isn't much reason for analog music audiophiles to care about Replaygain ). Replaygain is similar to Normalization in its method of changing the loudness (volume) of an audio file. After the audio data is decoded, Replaygain is applied to change the loudness of the current track, this is usually done without altering the loudness of the input file, only the output (which is where Replaygain differs from Normalization). Two types of Replaygain exist, the first and most common one, Track Gain, changes the volume of the track to be consistent with all songs (so one song will be as loud as another). The other Replaygain method Album Gain, changes the loudness while keeping the dynamics of a whole album (this is the Replaygain method preferred by audiophiles). The term "gain" is short for Replaygain when in the context to digital audio and is also used when Replaygain is applied.
Replaygain stores two sets of data: the Track+Album Gain and the Track+Album's peak loudness (how far up to the peak loudness a file/album goes, more on this will be described later). The Track and Album Gain is stored in dB (decibels) and the peak loudness is stored as a decimal starting at 0.000000 and optimally ending at 1.000000 or lower (the difference between peak loudness and dB is that while loudness is in a linear scale, dB are in a logarithmic scale).
Album Gain like the name implies is a Replaygain value for the entire album. Album Gain doesn't destroy dynamics like Normalization or Track Gain does. To understand the effects of dynamics, switch between two audio files with no gap (meaning a two audio files where the first file has no silence at the end, CDs burned in DAO mode will do the job very nicely). You should hear a smooth transition between the two songs with Album Gain (with Track Gain, the transition will sound awkward because of a sudden jump or drop in loudness). Rather, Album Gain changes the loudness of a selection of files at a constant level, so even if Track 01 and Track 02 have a Track Gain of -1.24dB and +0.54dB respectively, their Album Gain will be the same and any dynamics between the two files will be preserved.
The most common way Replaygain is applied is when it finds Replaygain information stored in the metadata (more commonly referred to as a tag). The metadata method allows the audio data in the file to remain unchanged so the user can switch between Album and Track gain; they can also disable Replaygain altogether if they wish (for listening to the unaltered audio). The other and permanent Replaygain solution is to apply the gain to the audio data itself, altering the loudness of the file irreversibly; this method is similar to how Normalization is applied to audio files, from a standpoint of perfect audio duplication (like when ripping CDs) this is widely discouraged, so most people use the metadata version of Replaygain instead. The benefit of applying Replaygain to the audio data is that any program that can play the file as long as it supports the format in question. Finally the third method is used by some programs which write the Replaygain values to the header of the file itself as opposed to the tag of the audio file. This does have one disadvantage, so far no mp3 plugin is designed to look in the mp3's header for Replaygain values, which is why LAME's Replaygain isn't supported in any current audio player.

.::Why Use Replaygain?::.
If you've ever had one quiet song end, just to have the next file's loudness surprise you, or even worse hurt your ears (this is especially true with headphones), or if the opposite has happened (you listen to a loud song at a comfortable level, then a quiet song starts and you don't hear it well or at all) then Replaygain is a godsend. Replaygain basically does all the volume tweaking so you don't have to find the optimal volume for each song (which is a big hassle, especially in foobar2000 where the volume slider is tucked away in the preferences). Replaygain is great for those who listen to a wide mix of albums and files (generally the loudness of a album is consistent from song to song) and like to be able to hear the song without having to turn the volume up after every song to hear the quiet moments well.
One thing Replaygain cannot, should not and will not ever do is dynamically change the loudness from inside a song, meaning one part might have a different gain then another part. The only exception to this is when there is some extremely loud parts of a song, which are cut off if the peak loudness is above 1.000000, which means clipping has occurred, which is especially prevalent in lossy audio files. Clipping usually happens if a lossy audio was encoded from a file that had the source audio file's peak near, at or above 1.000000, but it can occur in badly recorded lossless audio (like in Line-In recordings or badly mastered audio CDs). Usually there is a setting in Replaygain programs or plugins that lets you turn this feature on or off. Clipping can be most commonly heard as a loud click or tick, but if it occurs in a loud segment of audio as it commonly does, you might not even notice it.

.::Steps to Calculating, Applying and Using Replaygain::.
1. First and foremost you need a program that can save Replaygain values to your music, or at least store it somewhere it can be retrieved for later usage. Generally an encoder, decoder, utility, media player or plugin will be able to save Replaygain values to the metadata, or even apply it to the audio data (if you desire to do so).

Utilities and Audio Players that can tag Replaygain using the metadata method:
--MP3Gain (MP3 only)
--Musepack Replaygain (MPC only, any Musepack compliant decoder supports Replaygain)
--Vorbisgain (OGG only)
--FLAC (FLAC only)
--foobar2000 (any format* strongly recommended)

Among the programs that can apply Replaygain to the audio data:
--foobar2000
--MP3Gain (to MP3s only)
--Wavegain (irreversibly applies Replaygain to a PCM wav file)

Among the programs that can apply Replaygain to the file's header:
--LAME MP3 Encoder (MP3 only, currently not supported by any audio players)

*foobar2000 is by far the best way to tag Replaygain. It can theoretically Replaygain any audio file it supports (through the metadata method at least). If foobar2000 it finds a file it cannot tag (like wav, MOD or read-only files), it will store the Replaygain values in its database so you can still have Replaygain applied to the file when you play it back in foobar2000.

2. Now you need to set up the program to calculate and save the Replaygain values, I'll use foobar2000 as an example (LAME's documentation tells you how to apply Replaygain using the LAME Encoder, for other programs, refer to their websites for help):
A. Select all the audio files you want to Replaygain

B. Right Click on the selection

C. Go to Replaygain menu

D. You will now have two choices for applying Replaygain (or more in foobar2000 0.9 beta): Select "per-file track gain" or "Scan selection as album". Only select "Scan selection as album" if you are sure the entire selection is one album, when in doubt, use "per-file track gain" (in foobar2000 0.9 beta, you can let foobar2000 judge in the selection what album each file belongs to, by tags or by directories. This will have each album tagged with its own Album gain).
The 3rd option reads "Remove replaygain info from files" only do this if you absolutely don't want Replaygain on that file. NEVER EVER use the 4th option, "Edit replaygain info (advanced)" on a file unless you like to screw with volume levels and destroy the proper dynamics (which frankly you can do with any volume dial or option anyways).
When foobar2000 finishes scanning the files (which varies depending on CPU speed and audio codec), it will have tagged the file, unless there was a decoding error (upon which Replaygain will not be applied) or if foobar2000 can't store the Replaygain info in file. If the latter happens foobar2000 will store the info in its database, unless of course if you disabled the database or don't have the foobar2000 database plugin installed.

E. Your file(s) will now be tagged and saved with the Replaygain values (in foobar2000 0.9 beta, it will have a Replaygain values listed for each track, push "OK" to apply the values or "Cancel" if you change your mind and do not want the Replaygain values tagged to the files).

3. To use the Replaygain feature in your music:
A. You'll need a media player (or a plugin) that supports Replaygain. Among them are:

Windows
--foobar2000 (of course!)
--Winamp (Winamp 2.xx/5.xx only supports Replaygain by default on Ogg Vorbis files, you'll need the in_mpg123 plugin for mp3s, also FLAC and MPC support Replaygain with their official plugins. See step 3C for settings with these plugins)
--XMPlay

Linux
--XMMS (you need a CVS version of the xmms-mad MP3 plugin or a custom XMMS binary)
--amaroK
--Quod Libet

Portable devices that support Replaygain:
--Rockbox firmware (must be installed on a portable device that supports the firmware which currently is limited to iRiver H100 series)
--iPod Soundcheck (this is not Replaygain, but does produce similar results as Track Gain/Normalization, Soundcheck does not support any kind of Album Gain feature, also this is supported by iTunes as well) .php (for more information)

B. For foobar2000 to use Replaygain:
I. Go to foobar2000-> Preferences-> Playback

II. In the Replaygain section select the gain (or lack thereof if you want Replaygain disabled) you want to use in the dropdown menu, remember the setting will be according to your own preferences

III. Check the box below the dropdown menu "Use peak info to scale down tracks that sill clip after applying Replaygain", unless of course you like to hear clipping (in foobar2000 0.9 beta this is presented as a dropdown menu with the options "none", "apply gain", "apply gain and prevent clipping according to peak" and "prevent clipping according to peak")

IV. The two sliders below only modify loudness of a song before Replaygain is applied, the top one on non-Replaygained songs will be useful in most cases

V. Click "Save all" and close the preferences Window

C. With other programs and plugins that support Replaygain you will find a common list of options they are:
--The option to disable/enable Replaygain
--A choice between Track Gain or Album Gain
--An option to use Clipping Protection before or after Replaygain is applied
--A preamp for files with Replaygain and for files without Replaygain

For these options follow your best judgement and preferences. Not all Replaygain capable plugins will support all the options above. Unless you are converting the file from one codec to another (this is when you should disable ALL Replaygain related options for the most accurate conversion), I recommend the following settings for the best listening experience:
--Replaygain enabled with Album Gain
--Clipping protection enabled
--Preamp (both of them if available) should be at ±0.0dB

Most plugins have a few other options related to output and Replaygain. Generally all other options should stay at default values, you can try experimenting with them to see if it improves audio quality.

.::Additional Info::.
Essentially this takes Replaygain articles I've seen (and what I know about Replaygain and digital audio) and puts it in (mostly) layman's terms. If you want more info (or clearer language), have a suggestion or major correction, post it. For minor errors or a link or two to suggest, just PM me. This document is considered complete and final, Replaygain for Newbies and the Confused as of version 1.30 is GFF optimized and will have more vBulletin formatting as time goes on. If there are corrections or hyperlink updates needed, I will do so, but nothing else will likely be changed (meaning don't expect any substantial updates). Hopefully this will be stickied so it can preempt any questions about Replaygain on GFF's Behind The Music section. Let the music play!

.::Credits::.
--The excellent Replaygain article at the Hydrogenaudio Wiki (great for links and further reading, this article served as a starting point for this document)
--foobar2000 for such a great music player
--Eleo for suggesting the idea for this thread

Jam it back in, in the dark.
Slogra
Wark!


Member 1085

Level 3.62

Mar 2006


Reply With Quote
Old Mar 3, 2006, 06:24 AM #2 of 7
About clipping. I've looked at my VGM mp3s and i noticed that about 50% of them clip! So this is obviously a huge problem, which can be solved by using replaygain.
Just check the replaygain_track_peak and you will notice a lot mp3s are well above 1.0. My highest peak mp3 is Sonic_3D_Symphonic_Ruin_OC_ReMix.mp3, which has a peak of 1.817812!

But if you don't (wanna) use replaygain (which i can hardly imagine ) then you should set the pre-amp slider a bit down, untill you don't get clipping anymore. I set it to -4.5dB to avoid clipping of all mp3s.

If you want to know whether a track clips without using replaygain then foobar2000 is once again your friend. You can enable a clipping warning (at preferences -> playback), which will show a warning in the foobar console each time a track clips.
To avoid clipping just lower the pre-amp untill you don't get any warnings anymore.

Cheers, Slogra

Most amazing jew boots
Kaiten
Everything new is old again


Member 613

Level 29.60

Mar 2006


Reply With Quote
Old Mar 3, 2006, 07:09 PM Local time: Mar 3, 2006, 05:09 PM #3 of 7
Originally Posted by Slogra
About clipping. I've looked at my VGM mp3s and i noticed that about 50% of them clip! So this is obviously a huge problem, which can be solved by using replaygain.
Just check the replaygain_track_peak and you will notice a lot mp3s are well above 1.0. My highest peak mp3 is Sonic_3D_Symphonic_Ruin_OC_ReMix.mp3, which has a peak of 1.817812!

But if you don't (wanna) use replaygain (which i can hardly imagine ) then you should set the pre-amp slider a bit down, untill you don't get clipping anymore. I set it to -4.5dB to avoid clipping of all mp3s.

If you want to know whether a track clips without using replaygain then foobar2000 is once again your friend. You can enable a clipping warning (at preferences -> playback), which will show a warning in the foobar console each time a track clips.
To avoid clipping just lower the pre-amp untill you don't get any warnings anymore.

Cheers, Slogra
That is helpful, but if you disable Replaygain but use the option "Prevent Clipping According To Peak" it should prevent clipping on a file with Replaygain info, but it won't use the Replaygain.

How ya doing, buddy?
Eleo
Banned


Member 516

Level 36.18

Mar 2006


Reply With Quote
Old Mar 7, 2006, 01:39 PM #4 of 7
I followed your guide. The difference in volume is noticeable, but at the same time, not as great as I feel it should be. Or perhaps that's because other albums need to be quieted? I'm not really sure

I am a dolphin, do you want me on your body?
Kaiten
Everything new is old again


Member 613

Level 29.60

Mar 2006


Reply With Quote
Old Mar 10, 2006, 07:15 PM Local time: Mar 10, 2006, 05:15 PM #5 of 7
Originally Posted by Eleo
I followed your guide. The difference in volume is noticeable, but at the same time, not as great as I feel it should be. Or perhaps that's because other albums need to be quieted? I'm not really sure
It could be because your albums are too loud. Most newer CDs have a much smaller dynamic range (they tend to be loud, any album that gets a Replaygain value over -7.0dB is too loud), you could always try the preamp on files that don't have Replaygain.

I was speaking idiomatically.
Why Am I Allowed to Have Gray Paint
Fookin' Prawns!


Member 56

Level 24.48

Mar 2006


Reply With Quote
Old Mar 10, 2006, 09:39 PM Local time: Mar 11, 2006, 02:39 AM #6 of 7
So would you suggest using Replaygain over an Audigy soundcard that (supposedly) performs volume normalisation in hardware?

What kind of toxic man-thing is happening now?
Kaiten
Everything new is old again


Member 613

Level 29.60

Mar 2006


Reply With Quote
Old Mar 10, 2006, 10:23 PM Local time: Mar 10, 2006, 08:23 PM #7 of 7
Originally Posted by Ulysses
So would you suggest using Replaygain over an Audigy soundcard that (supposedly) performs volume normalisation in hardware?
Yes (though it's worth trying on programs that don't support Replaygain. Like I've said normalization cannot track the loudness of an entire album, so when you go from Track01-Track02 and the songs run together, the lack of Albumgain (while Normalizing or having Trackgain) will cause a jump in loudness, thus destroying any dynamics the album has.

FELIPE NO
Reply

Thread Tools

Exploding Garrmondo Weiner Interactive Swiss Army Penis > Garrmondo Music and Trading > Behind the Music > For those who still don't know what Replaygain is...

Forum Jump


All times are GMT -5. The time now is 08:37 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.