<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Notat</id>
	<title>Hydrogenaudio Knowledgebase - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Notat"/>
	<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Special:Contributions/Notat"/>
	<updated>2026-05-01T14:23:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=25864</id>
		<title>Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=25864"/>
		<updated>2014-06-17T04:08:01Z</updated>

		<summary type="html">&lt;p&gt;Notat: Move player requirements to bottom. BS.1770 recommendation for loudness measurement.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=4&amp;gt;&#039;&#039;This is a proposed update to the [[ReplayGain 1.0 specification]]. This proposal is currently &#039;&#039;&#039;Under Construction&#039;&#039;&#039;. Please discuss this proposal on the [[Talk:ReplayGain 2.0 specification|discussion page]] or the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio forum].&#039;&#039; --[[User:Notat|Notat]] 23:42, 8 October 2012 (CEST)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system.&lt;br /&gt;
&lt;br /&gt;
The original [http://wiki.hydrogenaudio.org/index.php?title=Replaygain ReplayGain 1.0 specification] described a loudness measurement system which included a weighting filter, root mean square (RMS) measurement and statistical processing that model human perception of loudness in both the frequency and time domains.&lt;br /&gt;
&lt;br /&gt;
Since original ReplayGain proposal in 2001, the science, practice and standards for loudness normalization have been advanced significantly. The current industry standard approach to loudness measurement is described by the International Telecommunications Union&amp;lt;ref&amp;gt;http://www.itu.int/en/Pages/default.aspx&amp;lt;/ref&amp;gt; (ITU) as BS.1770. The most recent version of this standard is known as ITU BS.1770-3&amp;lt;ref&amp;gt;http://www.itu.int/rec/R-REC-BS.1770-3-201208-I/en&amp;lt;/ref&amp;gt; and was published in August 2012. The ITU work is freely available and is not believed to be encumbered by any patent issues. The ITU BS.1770-2 standard has been adopted in the United States by the [http://www.atsc.org ATSC] as [http://www.atsc.org/cms/standards/a_85-2011a.pdf A/85] and in Europe by the [http://www.ebu.ch European Broadcast Union] as [http://tech.ebu.ch/docs/tech/tech3343.pdf EBU R-128] for broadcast audio. &lt;br /&gt;
&lt;br /&gt;
BS.1770-3 uses a &amp;quot;K-weighted&amp;quot; RMS measurement. This weighting function is significantly less complex than the inverted Fletcher-Munson weighting used by RG1. A gating function designed measure the loudness of foreground components in the audio program. The gate in BS.1770 performs a similar function as the statistical processing in the original RG1 specification. &lt;br /&gt;
&lt;br /&gt;
The computation required for BS.1770-3 loudness measurement is reduced compared to the RG1 technique. Nevertheless, BS.1770 has been shown in several academic studies to be equally or more effective than the RG1 algorithm in modelling human loudness perception on music program as well as other material such as podcasts, television programs and movies.&amp;lt;ref&amp;gt;Paul Nygren. [http://www.speech.kth.se/prod/publications/files/3319.pdf Achieving equal loudness between audio files]. KTH Royal Institute of Technology&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Martin Wolters; Harald Mundt; Jeffrey Riedmiller (May 2010). [http://www.aes.org/e-lib/browse.cfm?elib=15341 Loudness Normalization In The Age Of Portable Media Players]. Audio Engineering Society.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Esben Skovenborg; Søren H. Nielsen (October 2004). [http://web.archive.org/web/20120208024743/http://www.tcelectronic.com/media/skovenborg_2004_loudness_m.pdf Evaluation of Different Loudness Models with Music and Speech Material]. Audio Engineering Society. Archived from [http://www.tcelectronic.com/media/skovenborg_2004_loudness_m.pdf the original] on 2012-02-08.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
RG2 uses BS.1770-3 for loudness measurement. It is expected the ITU standard will evolve over time to meet the needs of broadcasters and governments. It is the intent of the ReplayGain community that RG2 follow any future backwards-compatible improvements to loudness measurement using the BS.1770 standard.&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
&lt;br /&gt;
RG1 is calibrated to a pink noise reference signal with a RMS level 14 dB below a full-scale sinusoid. This reference signal is used to establish a reference level. ReplayGain will apply no gain or attenuation to the reference signal or any program material which has the same loudness measurements as the reference signal.&lt;br /&gt;
&lt;br /&gt;
BS-1770 defines a loudness scale for program material. The units of BS.1770 loudness measurements are in Loudness Units [relative to] Full Scale (LUFS). LUFS can be treated like decibels.&lt;br /&gt;
&lt;br /&gt;
The loudness measurement of the RG1 reference signal is -18 LUFS. In order to maintain backwards compatibility with RG1, RG2 uses a -18 LUFS reference.&lt;br /&gt;
&amp;lt;!--What is LUFS measurement of -14 dBFS pink noise?--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{r}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment in decibels,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{r}&amp;lt;/math&amp;gt; is the -18 LUFS reference level&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file in LUFS.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the reference level. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than the reference level. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single gain can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; in Extended Content Description Object&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history of commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=25814</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=25814"/>
		<updated>2014-05-27T00:20:31Z</updated>

		<summary type="html">&lt;p&gt;Notat: /* Metadata format */ bold format for WMA&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single gain can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; in Extended Content Description Object&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history of commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=25813</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=25813"/>
		<updated>2014-05-27T00:17:40Z</updated>

		<summary type="html">&lt;p&gt;Notat: revert some non-clarifying changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single gain can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - In Extended Content Description Object, Vorbis Comment ASCII values&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history of commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23688</id>
		<title>Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23688"/>
		<updated>2012-12-04T02:36:35Z</updated>

		<summary type="html">&lt;p&gt;Notat: some comments on new revisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=4&amp;gt;&#039;&#039;This is a proposed update to the [[ReplayGain 1.0 specification]]. This proposal is currently &#039;&#039;&#039;Under Construction&#039;&#039;&#039;. Please discuss this proposal on the [[Talk:ReplayGain 2.0 specification|discussion page]] or the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio forum].&#039;&#039; --[[User:Notat|Notat]] 23:42, 8 October 2012 (CEST)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain 2.0 (RG2) is a proposed update to the [http://wiki.hydrogenaudio.org/index.php?title=Replaygain ReplayGain 1.0 (RG1) specification] from 2001 originally published by David Robinson.  RG2 features an updated loudness measurement technique which better simulates human auditory perception of digital music.  This improved measurement enables more accurate gain adjustment during playback to achieve better perceived consistent loudness when listening to digital music from different albums and sources.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This proposed RG2 specification includes:&amp;lt;br&amp;gt;&lt;br /&gt;
:*a way to measure and calculate the apparent loudness of a given track or album ([[#Loudness Measurement]])&lt;br /&gt;
:*definition of appropriate reference level and ideal gain adjustment during playback ([[#Reference Level and Gain]])&lt;br /&gt;
:*practical considerations for loudness level in real world use ([[#Pre-amplification]])&lt;br /&gt;
:*a way to prevent clipping when the calculated replay gain exceeds the limits of digital audio ([[#Clipping Prevention]])&lt;br /&gt;
:*a method for the user to specify album vs. track gain adjustment at playback ([[#Track or Album Gain Adjustment]])&lt;br /&gt;
:*description of how replay gain information is stored within audio files (#[[Metadata]])&lt;br /&gt;
&amp;lt;br&amp;gt;Note to End Users:  Any software program or device which supports playback of original ReplayGain (RG1) scanned tracks should also play ReplayGain 2 (RG2) scanned tracks at the intended RG2 loudness level.  More information for end users on music scanning and playback can be found in the general Wikipedia page for ReplayGain 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Loudness Measurement==&lt;br /&gt;
&lt;br /&gt;
The original [http://wiki.hydrogenaudio.org/index.php?title=Replaygain ReplayGain 1.0 specification] relied on the Root Mean Square (RMS) method of calculation to perform (a now more primitive form of) loudness measurement.&amp;lt;!--RG1 used a weighted RMS. BS.1770-2 is also a weighted RMS. RG1 is actually significantly more complicated than BS.1770-2.--&amp;gt;   ReplayGain 2.0 loudness measurement and calculation is based on the [http://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.1770-2-201103-S!!PDF-E.pdf ITU BS. 1770-2 standard] as defined by the [http://www.itu.int/en/Pages/default.aspx International Telecom Union] (ITU) for broadcast audio.  Details about the loudness measurement algorithm, rationale, and supporting data were [http://www.itu.int/rec/R-REC-BS.1770-2-201103-S/en published by the ITU] in March 2011.  In summary, BS. 1770-2 uses the K-weighting system&amp;lt;!--Mentioning &amp;quot;K-weighting&amp;quot; seems to raise more questions than it resolveds--&amp;gt; to model human perceived loudness of audio. &lt;br /&gt;
&lt;br /&gt;
The ITU BS. 1770-2 standard has been adopted in the United States by the [http://www.atsc.org ATSC] as [http://www.atsc.org/cms/standards/a_85-2011a.pdf A/85] and in Europe by the [http://www.ebu.ch European Broadcast Union] as [http://tech.ebu.ch/docs/tech/tech3343.pdf EBU R-128] for broadcast audio.   It is expected the ITU standard will evolve over time to meet the needs of broadcasters and governments.  It was given a minor update, published as [http://www.itu.int/rec/R-REC-BS.1770-3-201208-I/en BS. 1770-3] in August 2012, but the change had no effect on the Replay Gain 2.0 specification or loudness measurement for digital music.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reference Level and Gain==&lt;br /&gt;
&lt;br /&gt;
The initial ReplayGain 1.0 in 2001 specification adapted the [http://www.smpte.org/ SMPTE] standard reference level for movie sound of 83db SPL (-20 dbFS), and was subsequently updated to target 89db SPL (-14 dbFS) by David Robinson.  The ReplayGain 2.0 target reference level is based on the research and findings of Martin Wolters, Harald Mundt, and Jeffrey Riedmiller of [http://www.dolby.com Dolby Laboratories] as [http://www.dolby.com/uploadedFiles/Assets/US/Doc/Professional/AES128-Loudness-Normalization-Portable-Media-Players.pdf published in May 2010] for the [http://www.aes.org Audio Engineering Society].  Since RG2 is based on [http://www.itu.int/rec/R-REC-BS.1770-2-201103-S/en ITU BS. 1770-2] which specifies a target loudness reference of -23 LKFS,&amp;lt;!--We need to use the RG1 reference level. The reasons for selecting this reference level are still valid. -23 LKFS will be too quiet on portable players.--&amp;gt; the calculation to determine the gain of ReplayGain is as follows (from page 11 of the [http://www.dolby.com/uploadedFiles/Assets/US/Doc/Professional/AES128-Loudness-Normalization-Portable-Media-Players.pdf 2010 Dolby paper]):&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: lightgrey; border: solid thin grey;&amp;quot;&amp;gt;&lt;br /&gt;
Therefore the following reversible conversion between Replay Gain and ITU-based loudness is proposed:&amp;lt;br&amp;gt; &lt;br /&gt;
RG = -18db - L&amp;lt;br&amp;gt;&lt;br /&gt;
where RG is the estimated Replay Gain and L is the Loudness according to ITU-R BS.1770 in LKFS (dB relative full scale).&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
In general, the adjusted playback loudness using RG2 will be lower than RG1,&amp;lt;!--RG2 must have same playbak level as RG1--&amp;gt; but will have better perceived loudness consistency from track to track.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
==Pre-amplification==&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be -23db LKFS, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 18 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
==Clipping prevention==&lt;br /&gt;
ITU BS. 1770-2 suggestion of a -23 LKFS average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Track or Album Gain Adjustment==&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
The updated ReplayGain 1.0 specification reflecting recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23495</id>
		<title>Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23495"/>
		<updated>2012-10-08T22:00:24Z</updated>

		<summary type="html">&lt;p&gt;Notat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font size=4&amp;gt;&#039;&#039;This is a proposed update to the [[ReplayGain 1.0 specification]]. This proposal is currently &#039;&#039;&#039;Under Construction&#039;&#039;&#039;. Please discuss this proposal on the [[Talk:ReplayGain 2.0 specification|discussion page]] or the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio forum].&#039;&#039; --[[User:Notat|Notat]] 23:42, 8 October 2012 (CEST)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Talk:Revised_ReplayGain_specification&amp;diff=23494</id>
		<title>Talk:Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Talk:Revised_ReplayGain_specification&amp;diff=23494"/>
		<updated>2012-10-08T21:46:19Z</updated>

		<summary type="html">&lt;p&gt;Notat: new source&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Improvement discussion threads==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=15445 Improving ReplayGain, some ideas for Devs etc]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=89841 ReplayGain2, ReplayGain2 proposal]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85614 ReplayGain album gain problem]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=84769 ReplayGain when converting 5.1 to 2]&lt;br /&gt;
&lt;br /&gt;
===R128===&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85978 R128GAIN: An EBU R128 compliant loudness scanner]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=86116 libebur128 - (yet another) EBU R 128 implementation]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=86424 R128 versus ReplayGain, The cage match begins here.]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=88498 ReplayGain: Foobar2000 results differ from MP3Gain and MetaFLAC ones]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=88778 replaygain and R 128]&lt;br /&gt;
&lt;br /&gt;
==External resources==&lt;br /&gt;
*[http://www.dolby.com/uploadedFiles/Assets/US/Doc/Professional/AES128-Loudness-Normalization-Portable-Media-Players.pdf Loudness Normalization in the Age of Portable Media Players]&lt;br /&gt;
*[http://music-loudness.com/PDFs/Loudness_Alliance_White_Paper_final_v1.pdf Loudness Normalization: The Future of File-Based Playback]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23493</id>
		<title>Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23493"/>
		<updated>2012-10-08T21:42:33Z</updated>

		<summary type="html">&lt;p&gt;Notat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is a proposed update to the [[ReplayGain 1.0 specification]]. This proposal is currently &#039;&#039;&#039;Under Construction&#039;&#039;&#039;. Please discuss this proposal on the [[Talk:ReplayGain 2.0 specification|discussion page]] or the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio forum].&#039;&#039; --[[User:Notat|Notat]] 23:42, 8 October 2012 (CEST)&lt;br /&gt;
&lt;br /&gt;
Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23492</id>
		<title>Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=23492"/>
		<updated>2012-10-08T21:42:02Z</updated>

		<summary type="html">&lt;p&gt;Notat: under construction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is a proposed update to the [[ReplayGain 1.0 specification]]. This proposal is currently &#039;&#039;&#039;&#039;Under Construction&#039;&#039;&#039;&#039;. Please discuss this proposal on the [[Talk:ReplayGain 2.0 specification|discussion page]] or the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio forum].&#039;&#039; --[[User:Notat|Notat]] 23:42, 8 October 2012 (CEST)&lt;br /&gt;
&lt;br /&gt;
Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Talk:Revised_ReplayGain_specification&amp;diff=23091</id>
		<title>Talk:Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Talk:Revised_ReplayGain_specification&amp;diff=23091"/>
		<updated>2012-01-25T00:12:02Z</updated>

		<summary type="html">&lt;p&gt;Notat: /* External resources */ free link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Improvement discussion threads==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=15445 Improving ReplayGain, some ideas for Devs etc]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=89841 ReplayGain2, ReplayGain2 proposal]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85614 ReplayGain album gain problem]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=84769 ReplayGain when converting 5.1 to 2]&lt;br /&gt;
&lt;br /&gt;
===R128===&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85978 R128GAIN: An EBU R128 compliant loudness scanner]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=86116 libebur128 - (yet another) EBU R 128 implementation]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=86424 R128 versus ReplayGain, The cage match begins here.]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=88498 ReplayGain: Foobar2000 results differ from MP3Gain and MetaFLAC ones]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=88778 replaygain and R 128]&lt;br /&gt;
&lt;br /&gt;
==External resources==&lt;br /&gt;
*[http://www.dolby.com/uploadedFiles/Assets/US/Doc/Professional/AES128-Loudness-Normalization-Portable-Media-Players.pdf Loudness Normalization in the Age of Portable Media Players]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Talk:Revised_ReplayGain_specification&amp;diff=23090</id>
		<title>Talk:Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Talk:Revised_ReplayGain_specification&amp;diff=23090"/>
		<updated>2012-01-24T23:51:24Z</updated>

		<summary type="html">&lt;p&gt;Notat: links to threads&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Improvement discussion threads==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=15445 Improving ReplayGain, some ideas for Devs etc]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=89841 ReplayGain2, ReplayGain2 proposal]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85614 ReplayGain album gain problem]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=84769 ReplayGain when converting 5.1 to 2]&lt;br /&gt;
&lt;br /&gt;
===R128===&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85978 R128GAIN: An EBU R128 compliant loudness scanner]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=86116 libebur128 - (yet another) EBU R 128 implementation]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=86424 R128 versus ReplayGain, The cage match begins here.]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=88498 ReplayGain: Foobar2000 results differ from MP3Gain and MetaFLAC ones]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=88778 replaygain and R 128]&lt;br /&gt;
&lt;br /&gt;
==External resources==&lt;br /&gt;
*[http://www.aes.org/e-lib/browse.cfm?elib=15341 Loudness Normalization in the Age of Portable Media Players]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Talk:Original_ReplayGain_specification&amp;diff=23089</id>
		<title>Talk:Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Talk:Original_ReplayGain_specification&amp;diff=23089"/>
		<updated>2012-01-24T23:50:23Z</updated>

		<summary type="html">&lt;p&gt;Notat: links to threads&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Musepack ==&lt;br /&gt;
&lt;br /&gt;
Hi, there is an inaccuracy about Musepack files. Although they use APEv2 for metadata, replaygain is stored in the file header by specification, see [http://trac.musepack.net/trac/wiki/SV8Specification here]. Actually, this is the first format introducing APEv2 tags and native replaygain support.&lt;br /&gt;
So, every musepack compliant player must read the RG data from the header rather then APEv2.&lt;br /&gt;
[[User:Antonski|Antonski]] 14:19, 4 May 2011 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Development discussion threads==&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=1709 Flaw in ReplayGain spec]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=62374 Replay Gain Site, Why does it look like a museum?]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=83397 Does Replay gain work differtly in Media monkey, Foobar and Media Monkey given 2 differnt Results]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85536 Replay Gain specification, update in progress]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=69568 ReplayGain equal loudness filter]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=85834 Replay Gain tagging, ID3, LAME, Others?]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=86745 ReplayGain player recommendations]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=87442 ReplayGain specification complete, official launch 25 March proposed]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Topic_Index&amp;diff=22888</id>
		<title>Topic Index</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Topic_Index&amp;diff=22888"/>
		<updated>2011-07-27T17:30:16Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* For a more structured &#039;table of contents&#039;, use the &#039;&#039;&#039;[[Main Page#Categories|Categories List]]&#039;&#039;&#039;.&lt;br /&gt;
* Please see [http://www.hydrogenaudio.org/forums/index.php?showtopic=12979&amp;amp;st=25&amp;amp;p=247441&amp;amp;#entry247441 this thread] for a discussion of the future structure of this wiki.  If you have thoughts, comments, suggestions, etc., please join in this discussion.  In the meantime, please feel free to fill in gaps in the information below.&lt;br /&gt;
* See also [http://www.hydrogenaudio.org/forums/index.php?showtopic=28658 the style related discussion thread] in the forums.&lt;br /&gt;
&lt;br /&gt;
= General Information =&lt;br /&gt;
== General Guides ==&lt;br /&gt;
* [[Create a long-term archive]]&lt;br /&gt;
* [[Secure ripping|Secure Ripping]]&lt;br /&gt;
* [[Enabling DMA]]&lt;br /&gt;
* [[Choosing_the_best_codec.|Choosing the best codec]]&lt;br /&gt;
* [[Lossless_comparison|Lossless Comparison]]&lt;br /&gt;
&lt;br /&gt;
== EAC Guides == &lt;br /&gt;
* Configuring [[EAC Drive Configuration|EAC and CD-ROM Drives]] &lt;br /&gt;
* Configuring [[EAC and Lame]]&lt;br /&gt;
* Configuring [[EAC and AAC | EAC and Nero AAC]]&lt;br /&gt;
* Configuring [[EAC and Ogg Vorbis | EAC and Vorbis]]&lt;br /&gt;
* Configuring [[EAC and Musepack]] &lt;br /&gt;
* Configuring [[EAC and WavPack]]&lt;br /&gt;
* Configuring [[EAC and FLAC]]&lt;br /&gt;
* Configuring [[EAC and Monkey&#039;s Audio]]&lt;br /&gt;
* Configuring [[EAC and Cue Sheets]]&lt;br /&gt;
* Configuring EAC and [[REACT]]&lt;br /&gt;
&lt;br /&gt;
== CDex Guides ==&lt;br /&gt;
* Configuring [[CDex Drive Configuration|CDex and CD-ROM Drives]] &lt;br /&gt;
* Configuring [[CDex and FLAC]]&lt;br /&gt;
&lt;br /&gt;
== AAC Guides == &lt;br /&gt;
* [[AAC_FAQ|AAC FAQ]] frequently asked questions in reguard to AAC the latest industry standard.&lt;br /&gt;
* [[AAC encoders|AAC Encoders]] known AAC encoder/decoder implementations and configuring them (Apple Itunes, Nero AAC, etc)&lt;br /&gt;
* [[Linux and Nero AAC]] a short guide for configuring Nero AAC encoder to run under Linux.&lt;br /&gt;
&lt;br /&gt;
== Vorbis Guides ==&lt;br /&gt;
* [[Recommended_Ogg_Vorbis|Recommended encoders and settings for Vorbis]].&lt;br /&gt;
* [[Lancer|Ogg Vorbis Acceleration Project]] information reguarding optimized Vorbis binaries.&lt;br /&gt;
* [[OggDropXPd|OggDropXPd]] guide for encoding with John 33&#039;s popular drag-n-drop frontend.&lt;br /&gt;
* [[Compiling_aoTuV|Compiling AoTuV]] compiling the AoTuV binaries under Linux.&lt;br /&gt;
&lt;br /&gt;
= Audio Codecs =&lt;br /&gt;
== [[Lossy]] ==&lt;br /&gt;
* [[Advanced Audio Coding]] (AAC)&lt;br /&gt;
* [[AC3]]&lt;br /&gt;
* [[ATRAC3]]&lt;br /&gt;
* [[DTS]]&lt;br /&gt;
* [[MP2]]&lt;br /&gt;
* [[MP3]]&lt;br /&gt;
* [[Musepack]] (MPC, MP+)&lt;br /&gt;
* (Ogg) [[Vorbis]]&lt;br /&gt;
* [[QDesign]]&lt;br /&gt;
* [[VQF]]&lt;br /&gt;
* [[Windows Media Audio]] (WMA)&lt;br /&gt;
&lt;br /&gt;
== [[Lossless]] ==&lt;br /&gt;
* [[ALAC|Apple Lossless]]&lt;br /&gt;
* [[ALS|Audio Lossless Coding]]&lt;br /&gt;
* [[DTS-HD|DTS Master Audio]] &lt;br /&gt;
* [[Free Lossless Audio Codec]] (FLAC)&lt;br /&gt;
* [[Lossless Audio]] (LA)&lt;br /&gt;
* [[Lossless Predictive Audio Compression]] (LPAC)&lt;br /&gt;
* [[Monkey&#039;s Audio]]&lt;br /&gt;
* [[OptimFROG]]&lt;br /&gt;
* [[Lossless comparison#RealAudio Lossless|RealAudio Lossless]]&lt;br /&gt;
* [[Shorten]]&lt;br /&gt;
* [[TTA|True Audio]]&lt;br /&gt;
* [[WavPack]]&lt;br /&gt;
* [[Windows Media Audio|WMA Lossless]]&lt;br /&gt;
&lt;br /&gt;
= [[Metadata]] (Tags) =&lt;br /&gt;
* [[APEv1]]&lt;br /&gt;
* [[APEv2]]&lt;br /&gt;
* [[ID3v1]]&lt;br /&gt;
* [[ID3v1.1]]&lt;br /&gt;
* [[ID3v2]]&lt;br /&gt;
* [[Vorbis Comment]]&lt;br /&gt;
&lt;br /&gt;
= Media Extractors =&lt;br /&gt;
== CD Extractors ==&lt;br /&gt;
* [[Audiograbber]] (Win32)&lt;br /&gt;
* [[CDex]] (Win32)&lt;br /&gt;
* [[cdparanoia]] (Posix)&lt;br /&gt;
* [[dBpowerAMP with AccurateRip]] (Win32)&lt;br /&gt;
* [[Exact_Audio_Copy|Exact Audio Copy]] (Win32)&lt;br /&gt;
* [[Grip]] (Posix) &lt;br /&gt;
* [[iTunes]] (Win32/Mac OS/X)&lt;br /&gt;
* [[MediaMonkey]] (Win32)&lt;br /&gt;
* [[Max]] (Mac OS/X)&lt;br /&gt;
* [[XLD]] (Mac OS/X) &lt;br /&gt;
* [[PlexTools]] (Win32)&lt;br /&gt;
* [[Rubyripper]] (Posix/Mac OS/X)&lt;br /&gt;
&lt;br /&gt;
== DVD Extractors ==&lt;br /&gt;
* [http://pessoal.onda.com.br/rjamorim/SetupDVDDecrypter_3.5.4.0.exe DVD Decrypter] (Win32)&lt;br /&gt;
* DVD-A / CPPM Decrypter (Win32/Posix)&lt;br /&gt;
&lt;br /&gt;
= Media Players =&lt;br /&gt;
== Windows ==&lt;br /&gt;
* [[Apollo]]&lt;br /&gt;
* [[dBpowerAMP]]&lt;br /&gt;
* [[Foobar2000:Foobar2000|foobar2000]]&lt;br /&gt;
* [[iTunes]]&lt;br /&gt;
* [[MediaMonkey]]&lt;br /&gt;
* [[musikCube]]&lt;br /&gt;
* [[Quintessential Player]]&lt;br /&gt;
* [[VUplayer]]&lt;br /&gt;
* [[Winamp]]&lt;br /&gt;
* [[Windows Media Player]]&lt;br /&gt;
* [[wxMusik]]&lt;br /&gt;
* [[XMPlay]]&lt;br /&gt;
* [[WMPTSE]] (with WMP)&lt;br /&gt;
&lt;br /&gt;
== Linux/BSD ==&lt;br /&gt;
* [[Amarok]]&lt;br /&gt;
* [[BMP]]&lt;br /&gt;
* [[JuK]]&lt;br /&gt;
* [[LAMIP]]&lt;br /&gt;
* [[Muine]]&lt;br /&gt;
* [[Music Player Daemon (MPD)]]&lt;br /&gt;
* [[Quod Libet]]&lt;br /&gt;
* [[Rhythmbox]]&lt;br /&gt;
* [[wxMusik]]&lt;br /&gt;
* [[XMMS]]&lt;br /&gt;
&lt;br /&gt;
== Mac OS X (Non-BSD Specific) ==&lt;br /&gt;
* [[iTunes]]&lt;br /&gt;
* [[skiTunes]]&lt;br /&gt;
* [[Whamb]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [[CL-Amp]] (BeOS)&lt;br /&gt;
&lt;br /&gt;
= Audio Editors =&lt;br /&gt;
== Windows ==&lt;br /&gt;
* [[Adobe Audition]] (previously known as &#039;&#039;Cool Edit&#039;&#039;)&lt;br /&gt;
* [[Audacity]]&lt;br /&gt;
* [[Goldwave]]&lt;br /&gt;
* [http://www.sonymediasoftware.com/products/soundforgefamily.asp Sony Sound Forge] (Previously released by Sonic Foundry)&lt;br /&gt;
&lt;br /&gt;
== Linux/BSD ==&lt;br /&gt;
* [[Ardour]] &lt;br /&gt;
* [[Audacity]]&lt;br /&gt;
* [[ReZound]]&lt;br /&gt;
&lt;br /&gt;
== Mac OS X (Non-BSD Specific) ==&lt;br /&gt;
* [[Ardour]] &lt;br /&gt;
* [[Audacity]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [http://timidity.sourceforge.net/ Timidity++] (MIDI to PCM (WAV) converter)&amp;lt;br&amp;gt;Timidity++ synthesizes MIDI files (sequences) in real-time using Gravis UltraSound Soundfont patches (loosly based upon Wavetable Synthesis) to common digital audio file formats such as, WAV, AU, AIFF, Ogg Vorbis, FLAC, etc. Useful for those who want to bypass FM Synthesizers on their sound card&#039;s to hear MIDI sequence as it was intended to be heard.)&lt;br /&gt;
&lt;br /&gt;
= Testing Software =&lt;br /&gt;
== Subjective Perceptual ==&lt;br /&gt;
* [[ABC/HR]]&lt;br /&gt;
* [[PCABX]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:green;&amp;quot;&amp;gt;&#039;&#039;Note: Might be good to put something here about the problems of quality comparisons using graphs, frequency sweeps, etc.&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[EAQUAL]]&lt;br /&gt;
* [[Rightmark_Audio_Analyzer|Rightmark Audio Analyzer]]&lt;br /&gt;
&lt;br /&gt;
= Audio Hardware =&lt;br /&gt;
== PC Audio ==&lt;br /&gt;
* [[Terratec EWX 24/96]]&lt;br /&gt;
* [[M-Audio Audiophile 24/96]]&lt;br /&gt;
* [[M-Audio Revolution 5.1]] &lt;br /&gt;
* [[M-Audio Revolution 7.1]] &lt;br /&gt;
* [[Chaintech AV-710]] &lt;br /&gt;
* [[E-MU 0404 24/192]]&lt;br /&gt;
* [[ASUS Xonar D1]]&lt;br /&gt;
* [[ASUS Xonar D2/PM]]&lt;br /&gt;
&lt;br /&gt;
== Notebook Audio == &lt;br /&gt;
* [[Echo Indigo IO 24/96]]&lt;br /&gt;
&lt;br /&gt;
== Firewire ==&lt;br /&gt;
* [[E-MU 1212M 24/192]]&lt;br /&gt;
* [[M-Audio Firewire 410]]&lt;br /&gt;
&lt;br /&gt;
== HiFi ==&lt;br /&gt;
* [[M-Audio Fast Track USB]]&lt;br /&gt;
* [[Slim Devices Squeezebox]] &lt;br /&gt;
* [[Slim Devices Transporter]]&lt;br /&gt;
* [[Hermstedt AG Hifidelio]]&lt;br /&gt;
* [[Olive Musica]]&lt;br /&gt;
&lt;br /&gt;
== MIDI Interfaces ==&lt;br /&gt;
* M-Audio MIDISport Uno 1x1 &lt;br /&gt;
* M-Audio MIDISport 2x2 &lt;br /&gt;
* MOTU 5x5 Micro Lite &lt;br /&gt;
* MOTU Fastlane USB&lt;br /&gt;
&lt;br /&gt;
== Digital Audio Players ==&lt;br /&gt;
=== Portable Flash ===&lt;br /&gt;
&#039;&#039;(These players make use of a internal flash drive.)&#039;&#039;&lt;br /&gt;
* [[Apple iPod]] Nano&lt;br /&gt;
* [[Apple iPod]] Shuffle&lt;br /&gt;
* Creative MuVo&lt;br /&gt;
* iRiver iFP Series&lt;br /&gt;
* MPIO lFP Series&lt;br /&gt;
* [[Rio Carbon]]&lt;br /&gt;
&lt;br /&gt;
=== Portable HD ===&lt;br /&gt;
&#039;&#039;(These players make use of a internal harddrive.)&#039;&#039;&lt;br /&gt;
* [[Apple iPod]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iriver_H110_H115_H120_H140 Rockbox firmware])&#039;&#039;&lt;br /&gt;
* [[Archos Jukebox with Rockbox Software]]&lt;br /&gt;
* [[Cowon iAudio]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iAudio_X5 Rockbox firmware])&#039;&#039;&lt;br /&gt;
* [[iRiver H-Series]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iriver_H110_H115_H120_H140 Rockbox firmware])&#039;&#039;&lt;br /&gt;
* [[MPIO H-Series]]&lt;br /&gt;
* [[Neuros]]&lt;br /&gt;
* [[Rio Karma]]&lt;br /&gt;
* [[Sandisk]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iAudio_X5 Rockbox firmware])&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Portable CD ===&lt;br /&gt;
&lt;br /&gt;
=== Car Players ===&lt;br /&gt;
&#039;&#039;(Car stereos that can read MP3, Vorbis, WMA, etc.).&#039;&#039;&lt;br /&gt;
* [[Aiwa CDC-MP3]]&lt;br /&gt;
* [[Yakumo Ultrasound]]&lt;br /&gt;
&lt;br /&gt;
===DVD Players=== &lt;br /&gt;
* [[Neuston&#039;s Maestro DVX-1201]]&lt;br /&gt;
&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
* [[Rockbox]]&lt;br /&gt;
&lt;br /&gt;
= Audio Theory =&lt;br /&gt;
== Analog Audio ==&lt;br /&gt;
* [[Tube Amplifiers]]&lt;br /&gt;
* [[Vinyl_Playback_and_Recording|Vinyl Audio]]&lt;br /&gt;
&lt;br /&gt;
== Digital Audio ==&lt;br /&gt;
* [[Solid State Amplifiers]] &lt;br /&gt;
* [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
* [[ABX]]&lt;br /&gt;
* [[EAQUAL]]&lt;br /&gt;
&lt;br /&gt;
= Audio Development =&lt;br /&gt;
&#039;&#039;note: Let&#039;s start with basic development tools (compilers, engineering tools, dev. libraries) until we think of more tools to add. I am also adding external links to books, tutorials, etc under resources.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
* [http://www.mathworks.com/products/matlab/ MATLAB 7.0] commercial software for algorithmic design, developement, engineering, and scientific computing. (multi-platform support)&lt;br /&gt;
* [http://www.octave.org/ GNU Octave] open-source alternative software (GPL) to MATLAB for numerical computations, engineering, and scientific computing. (multi-platform support)&lt;br /&gt;
* [http://www.fftw.org/ FFTW] Is a C subroutine library for computing the Discrete Fourier transform (DFT) in one or more dimensions on real and complex inputs.&lt;br /&gt;
* [http://gcc.gnu.org/ GCC] THE GNU compiler collection for C, C++, Objective-C, Fortran, Java, and Ada.&lt;br /&gt;
* [http://www.gnu.org/software/emacs/emacs.html GNU Emacs] an extensible, customizable, self-documenting real-time display editor. Great for writing all types of source code especially on Unix. (multi-platform support) &lt;br /&gt;
* [http://www.bloodshed.net/devcpp.html DevCPP] free front-end IDE and compiler for the C and C++ languages. Delphi and C source code available. (Win 9x, NT, 2000, and XP)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showforum=30 Scientific/R&amp;amp;D Forums] for Psychoacoustic, DSP, Electrical Engineering, theory, and coding related questions. (most questions are generally answered)&lt;br /&gt;
* [http://www.aes.org/ AES] The Audio Engineering Society website. Home of year-round world AES conferences.&lt;br /&gt;
* [http://www.dspguru.com/info/books/favor.htm DSP Tutorials] this site provides another good introduction in to the area of DSP.   &lt;br /&gt;
* [http://www.musicdsp.org/archive.php?classid=2 Music-DSP] source-code archive for analysis, filters, effects and synthesis. (C, C++, and Java code)&lt;br /&gt;
* [http://www.itakura.nuee.nagoya-u.ac.jp/HRTF/ HRTF] A database of measurements and research papers on Head Related Transfer Functions for 3D-Audio. (PDF, Audio)&lt;br /&gt;
* [http://www.midi.org/about-midi/specshome.shtml MIDI Specifications] MIDI 1.0, the new MusicXMF specification, and SP-MIDI for third generation 3GPP mobile devices (PDF) &lt;br /&gt;
* [http://www.gamedev.net/reference/articles/article2008.asp OpenAL] a beginners tutorial on writing code using OpenAL for audio programming in computer games and other applications. (C, C++). &lt;br /&gt;
* [http://www.alsa-project.org/ ALSA Project] (Advanced Linux Sound Architecture) bringing audio and MIDI capabilities to Linux.&lt;br /&gt;
* [http://www.engmath.dal.ca/courses/engm6610/notes/notes.html A Really friendly guide to Wavelets] A good introduction to wavelets aimed towards engineer, requires a fair amount of background knowledge.&lt;br /&gt;
&lt;br /&gt;
== Books/Research == &lt;br /&gt;
* [http://www.amazon.com/gp/product/3540231595/qid=1135380559/sr=1-3/ref=sr_1_3/102-1730075-7300931?s=books&amp;amp;v=glance&amp;amp;n=283155 Psychoacoustics - Facts and Models] author&#039;s Zwicker, Fastl, and Hugo, revised 2005 third edition. The book for comprehensive psychoacoustics models and figures.  &lt;br /&gt;
* [http://www.eas.asu.edu/~spanias/papers/paper-audio-tedspanias-00.pdf  Perceptual Audio Coding] authors A. Painter and T. Spanias. A comprehensive paper on percepual audio coding (PDF)&lt;br /&gt;
* [http://www.amazon.com/gp/product/0780334493/103-2094923-9567001?v=glance&amp;amp;n=283155&amp;amp;%5Fencoding=UTF8&amp;amp;me=ATVPDKIKX0DER&amp;amp;no=283155&amp;amp;st=books Speech Communications Human and Machine] this book provides a good introduction to speech coding, inlcuding anaylsis, recognition, and perception. This text is a very good introduction for beginners. &lt;br /&gt;
* [http://www.dspguide.com/ Scientist and Engineer&#039;s Guide to DSP] author Steve Smith, a great guide for beginners new to the subject of DSP (free online text)(PDF)&lt;br /&gt;
*[http://www.amazon.com/exec/obidos/tg/detail/-/0792391810/ref=ase_theinternetdatac/103-9882844-5344648?v=glance&amp;amp;s=books Vector Quantization] authors Gersho and Gray. Good read for understanding how VQ and arithmetic coding work.&lt;br /&gt;
&lt;br /&gt;
= Audio Resources =&lt;br /&gt;
== Websites ==&lt;br /&gt;
&#039;&#039;Note: Let&#039;s include a small description to the side for now, so that we have something to work with when this section becomes large enough for its own page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* http://www.audiocoding.com (Page with a wiki on technical audio topics, homepage of FAAC and FAAD2, also has an AAC forum.)&lt;br /&gt;
* http://www.ff123.net (Lots of general information on various MP3 implementations, test samples, testing methodology information, homepage of ABC/HR)&lt;br /&gt;
* http://www.head-fi.org (general information/board about head phones and portable audio players)&lt;br /&gt;
* http://www.rarewares.org (Downloads for many audio and media tools)&lt;br /&gt;
* http://www.rjamorim.com/rrw/ (Download old versions of foobar2000 and other audio and media tools)&lt;br /&gt;
* http://www.rockbox.org/ (Open-source jukebox firmware for numerous DAP and architectures, GNU/GPL License). &lt;br /&gt;
* http://www.dapreview.net/ (Reviews of some of the most popular digital audio players out there) &lt;br /&gt;
* http://www.anythingbutipod.com/ (Thorough reviews of some of the most popular digital audio players out there)&lt;br /&gt;
&lt;br /&gt;
== Articles/Debates ==&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=31759&amp;amp;st=0 DVD-A vs. SACD debate]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=38041&amp;amp;st=0 Subjective vs. Objective testing]&lt;br /&gt;
* [http://www.ambisonic.net/pdf/ambidvd2001.pdf 5.1 surround vs. Ambisonics comparison]&lt;br /&gt;
&lt;br /&gt;
== Listening Tests ==&lt;br /&gt;
* [http://www.rjamorim.com/test/ Roberto&#039;s listening tests]&lt;br /&gt;
* [[Listening_Tests|Inventory of several listening tests, mainly on HA.org]]&lt;br /&gt;
&lt;br /&gt;
= Other Topics =&lt;br /&gt;
== Video ==&lt;br /&gt;
* [[MPEG-4 Visual]]&lt;br /&gt;
* [[Real Video]]&lt;br /&gt;
* [[Theora]]&lt;br /&gt;
* [[Tarkin]]&lt;br /&gt;
* [[Snow]] &lt;br /&gt;
* [[VP6]]&lt;br /&gt;
* [[Windows Media Video]]&lt;br /&gt;
&lt;br /&gt;
== [[Container format]]s ==&lt;br /&gt;
* [[ASF]]&lt;br /&gt;
* [[AVI]]&lt;br /&gt;
* [[Matroska]]&lt;br /&gt;
* [[MOV]]&lt;br /&gt;
* [[MP4]]&lt;br /&gt;
* [[Ogg]]&lt;br /&gt;
&lt;br /&gt;
= Glossary =&lt;br /&gt;
* [[Glossary_Of_Audio_Terms|Glossary of Audio Terms]]&lt;br /&gt;
&lt;br /&gt;
= Introduction &amp;amp; User Guides =&lt;br /&gt;
&#039;&#039;A starting place for new users to audio, with guides to compression and CD ripping and a glossary of all common terms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Glossary Of Audio Terms]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Audio format guide]]&lt;br /&gt;
* Ripping Guides&lt;br /&gt;
** [[EAC]] (Win32)&lt;br /&gt;
** [[CDex]] (Win32)&lt;br /&gt;
** [[DBpowerAMP with AccurateRip]] (Win32)&lt;br /&gt;
** [[Plextools]] (Win32)&lt;br /&gt;
** [[Max]] (Mac OS/X)&lt;br /&gt;
** [[XLD]] (Mac OS/X) &lt;br /&gt;
** [[Rubyripper]] (Posix/Mac OS/X) &lt;br /&gt;
* [[Tagging]]&lt;br /&gt;
* [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Audio Codecs =&lt;br /&gt;
&#039;&#039;Pros/cons, Recommended settings, Useful tools, etc.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[:Category:Codecs|The Technical/Codecs Category]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
= Container Formats =&lt;br /&gt;
&#039;&#039;What is a [[container format]]?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Matroska]]&lt;br /&gt;
* [[MP4]]&lt;br /&gt;
* [[Ogg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
= Audio Hardware &amp;amp; CD Ripping =&lt;br /&gt;
*&#039;&#039;CD Tools, Secure Ripping, Soundcard Quality&#039;&#039;&lt;br /&gt;
** [[Secure ripping]]&lt;br /&gt;
** Ripping Guide&lt;br /&gt;
*** [[EAC]]&lt;br /&gt;
*** [[CDex]]&lt;br /&gt;
*** [[DBpowerAMP with AccurateRip]]&lt;br /&gt;
*** [[Plextools]]&lt;br /&gt;
** [[CD copy protection]]&lt;br /&gt;
** [[CD Hardware]]&lt;br /&gt;
* Vinyl records and turntables&lt;br /&gt;
** [[Introduction to Vinyl|Introduction]]&lt;br /&gt;
** [[Advantages of Vinyl]]&lt;br /&gt;
** [[Disadvantages of Vinyl]]&lt;br /&gt;
** [[Vinyl Myths]]&lt;br /&gt;
** [[Purchasing Vinyl LPs and Components|Purchasing]]&lt;br /&gt;
** Record Player Components&lt;br /&gt;
*** [[Turntable]]&lt;br /&gt;
*** [[Cartridge]]&lt;br /&gt;
*** [[Phono preamplifier]]&lt;br /&gt;
** [[Evaluating Vinyl Sound Quality]]&lt;br /&gt;
** [[Vinyl Playback and Recording|Playback and Recording]]&lt;br /&gt;
** [[Vinyl Maintenance|Maintenance]]&lt;br /&gt;
** [[Vinyl Forum Posts and FAQs|FAQs]]&lt;br /&gt;
** [[Vinyl Glossary|Glossary]]&lt;br /&gt;
** [[Vinyl Links|Links]]&lt;br /&gt;
** [[Vinyl Mastering|Mastering]]&lt;br /&gt;
* [[Soundcard|Soundcards]]&lt;br /&gt;
* [[Other hardware]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
* [[EAC Vs CDex SecureMode]] (by Pio2001)&lt;br /&gt;
* [[EAC Vs CDex SecureMode II]] (by westgroveg)&lt;br /&gt;
* [[Listening Tests]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
=Downloads=&lt;br /&gt;
&#039;&#039;Where to obtain the software discussed in HAK.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Download page]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
= Using HAK =&lt;br /&gt;
* [[Help:Contents|Wiki User Guide]]&lt;br /&gt;
* Play around at the [[Hydrogenaudio Knowledgebase:Sandbox|Sandbox]] to try your formatting skills. Everything goes here and everything can/may be deleted.&lt;br /&gt;
* Contributors should read [[Help:Editing|editing help]].&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=TAK&amp;diff=22887</id>
		<title>TAK</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=TAK&amp;diff=22887"/>
		<updated>2011-07-27T17:29:03Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Codec Infobox&lt;br /&gt;
| name = Tom&#039;s lossless Audio Kompressor&lt;br /&gt;
| logo =&lt;br /&gt;
| type = lossless&lt;br /&gt;
| purpose = lossless audio compression.&lt;br /&gt;
| maintainer = Thomas Becker&lt;br /&gt;
| recommended_encoder = TAK encoder&lt;br /&gt;
| recommended_text = TAK v1.1.0&lt;br /&gt;
| website = [http://thbeck.de/Tak/Tak.html ThBeck.de/Tak/Tak.html] &#039;&#039;(german)&#039;&#039;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&#039;&#039;&#039;Tom&#039;s lossless Audio Kompressor&#039;&#039;&#039; (&#039;&#039;&#039;TAK&#039;&#039;&#039;) is a lossless audio compressor which promises compression performance similar to [[Monkey&#039;s Audio]] “High” and decompression speed similar to [[Free Lossless Audio Codec|FLAC]].&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* High compression&lt;br /&gt;
* Fast compression and decompression speed&lt;br /&gt;
* Streaming support (necessary headers for decompressing the audio are written to the stream every 2 seconds)&lt;br /&gt;
* Piping support for encoding&lt;br /&gt;
* Error tolerance (single bit error will never affect more than 250 ms)&lt;br /&gt;
* Error detection (each frame protected by a 24-bit checksum (CRC))&lt;br /&gt;
* High-resolution (up to 24-bit/channel) audio support&lt;br /&gt;
* Support for up to 192 Khz Audio&lt;br /&gt;
* Seeking without seek table&lt;br /&gt;
* APEv2 tags supported at end of file&lt;br /&gt;
&lt;br /&gt;
=== Pros ===&lt;br /&gt;
* Fast encoding speed (while providing better compression TAK encodes as fast as [[Free Lossless Audio Codec|FLAC]] -8 in TAK&#039;s “Insane” and several times faster in “Turbo” mode)&lt;br /&gt;
* Fast decompression speed (on par with FLAC / [[WavPack]])&lt;br /&gt;
* Good compression levels (on par with [[Monkey&#039;s Audio]] High)&lt;br /&gt;
* Error Robustness&lt;br /&gt;
* Fast Seeking&lt;br /&gt;
&lt;br /&gt;
=== Cons ===&lt;br /&gt;
* Closed Source (at the moment)&lt;br /&gt;
* No hardware support&lt;br /&gt;
* Very limited software support (playback: [[Winamp]] &amp;amp; [[foobar2000]] plugins, tagging: Mp3Tag)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware and Software That Support TAK ==&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
* None&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
==== Windows ====&lt;br /&gt;
* offical TAK Applications v1.1.0 (Applications, Winamp plugin, SDK, Decoding library) [http://www.hydrogenaudio.org/forums/index.php?showtopic=68456&amp;amp;st=0 here]&lt;br /&gt;
* foo_input_tak, TAK decoder for [[foobar2000]] [http://foosion.foobar2000.org/components/ here] (supports tagging and [[ReplayGain]])&lt;br /&gt;
* [[Mp3tag]] – universal tag editor with support for TAK&lt;br /&gt;
* [http://etree.org/shnutils/shntool/ shntool] (since version 3.0.6)&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
* The TAK reference applications (GUI as well as commandline) are known to run on Linux via Wine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Recommended Settings ==&lt;br /&gt;
* Default compression: “-p2” (formerly &#039;&#039;Normal&#039;&#039;) is the most attractive setting, providing an excellent compromise between compression and encoding speed. (At compression levels close to [[Monkey&#039;s Audio]] High (&amp;lt;0.4% difference), it is able to encode more quickly.)&lt;br /&gt;
 takc -e [input file]&lt;br /&gt;
* Highest compression: “-pMax” (same as -p5m) (This will create files which are comparable in size to file created using [[Monkey&#039;s Audio]] High. Decompression speed is comparable to [[WavPack]] Normal.)&lt;br /&gt;
 takc -e -pMax [input file]&lt;br /&gt;
* Fastest compression: “-p0” (This will create files which are comparable in size to [[Monkey&#039;s Audio]] Fast or [[WavPack]] High. Decompression speed is comparable to [[Free Lossless Audio Codec|FLAC]] 0.)&lt;br /&gt;
 takc -e -p0 [input file]&lt;br /&gt;
&lt;br /&gt;
=== TAK Performance Graph ===&lt;br /&gt;
[[Image:TAK_performance_graph_1-0-4.png|frame|center|Graph showing encoding and decoding rate against compression, using data from Synthetic Soul&#039;s test on TAK 1.0.4&amp;lt;br /&amp;gt;(see [[TAK#External Links|External Links]])]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using TAK ==&lt;br /&gt;
=== TAK with [[foobar2000]] ===&lt;br /&gt;
* Copy the takc.exe to your [[foobar2000]] directory&lt;br /&gt;
* Go to File → Preferences → Tools → Converter&lt;br /&gt;
* Set it up as shown:&lt;br /&gt;
[[Image:Tak_foobar_converter.png|frame|center|Screenshot of foobar 0.9.5 Converter settings for TAK 1.0.3]]&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; replace -p2 with the desired compression level.&lt;br /&gt;
&lt;br /&gt;
* TAK introduced encoding from STDIN in version 1.0.3, eliminating the need for a temporary file and greatly improving overall compression time. If you are using an earlier version of TAK use the following command line instead:&lt;br /&gt;
 -e -p2 %s %d&lt;br /&gt;
* Use [[APEv2 specification|APEv2]] tagging (will be used as internal tagging)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TAK with EAC ===&lt;br /&gt;
Please read the [[EAC and TAK|wiki guide]], which details how to create TAK files with [[Exact Audio Copy|EAC]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Future Features ==&lt;br /&gt;
* Unicode support&lt;br /&gt;
* MD5 audio checksums for verification and identification&lt;br /&gt;
* A German version&lt;br /&gt;
* Embedded cue sheets&lt;br /&gt;
* Embedded cover art&lt;br /&gt;
* Multichannel audio&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
; Is the codec safe for use?&lt;br /&gt;
: Yes. To check, convert a WAVE to TAK and back and compare the two (or use foobar&#039;s bitcompare tool).&lt;br /&gt;
; Why should I use TAK?&lt;br /&gt;
: TAK offers high compression ratios with great decoding rates.&lt;br /&gt;
; What can I compress with TAK?&lt;br /&gt;
: TAK 1.0 can compress any integer-format (up to 24 bits per channel) PCM RIFF WAVE file (.wav). Piping support as of v1.0.3 is implemented, so converting lossless files to WAV first is not necessary.&lt;br /&gt;
; What about hardware support?&lt;br /&gt;
: None at the moment. Although, &#039;&#039;-p0&#039;&#039;, &#039;&#039;-p1&#039;&#039; and &#039;&#039;-p2&#039;&#039; are the candidates for hardware playback.&lt;br /&gt;
; When will the source be opened?&lt;br /&gt;
: Yes, TAK will be open-source, as soon as the code is ported to C or C++ and documented. However, Thomas has mentioned that he would like to improve the codec before opening the source.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://thbeck.de/Tak/Tak.html thbeck.de/Tak/Tak.html] – Official Website &#039;&#039;(german)&#039;&#039;&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=68454 TAK 1.1.0 Release Announcement / Discussion Thread on HA] &#039;&#039;(english)&#039;&#039;&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=68456&amp;amp;st=0 TAK 1.1.0 Downloads]&lt;br /&gt;
* [http://synthetic-soul.co.uk/comparison/lossless/ synthetic-soul.co.uk/comparison/lossless] – Comparison with Other Codecs (by Synthetic Soul)&lt;br /&gt;
* [http://flac.sourceforge.net/comparison.html flac.sourceforge.net/comparison.html] – An Updated Comparison (from FLAC Homepage)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Lossless]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Winamp_DSP_Bridge_(foo_dsp_winamp)&amp;diff=22886</id>
		<title>Foobar2000:Components/Winamp DSP Bridge (foo dsp winamp)</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Winamp_DSP_Bridge_(foo_dsp_winamp)&amp;diff=22886"/>
		<updated>2011-07-27T17:28:44Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{fb2k}}&lt;br /&gt;
[[Category:Foobar2000 3rd-Party Components|Winamp DSP Bridge (foo dsp winamp)]]&lt;br /&gt;
= Description =&lt;br /&gt;
&lt;br /&gt;
Allows the use of Winamp DSP plugins.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
# Choose &amp;quot;Winamp plugins path&amp;quot; with &amp;quot;Browse&amp;quot; button;&lt;br /&gt;
# Click &amp;quot;Rescan&amp;quot; button;&lt;br /&gt;
# Set bit-depth in &amp;quot;Fixed point conversion parameters&amp;quot;([[Foobar2000:Components_0.9/Winamp_DSP_Bridge_%28foo_dsp_winamp%29#Sound_quality_issues|details]]);&lt;br /&gt;
# Choose one of Winamp plugins from &amp;quot;Plugin list&amp;quot;;&lt;br /&gt;
# Click &amp;quot;Show interface window&amp;quot; to show plugin settings window (if available);&lt;br /&gt;
Plugin setting window also available from Foobar2000 main menu: choose &amp;quot;Show Winamp DSP window&amp;quot; from &amp;quot;View&amp;quot; menu;&lt;br /&gt;
&lt;br /&gt;
==Known bugs and limitations==&lt;br /&gt;
* Version 1.4.1 - 1.4.4 startup crashes([[Foobar2000:Components_0.9/Winamp_DSP_Bridge_%28foo_dsp_winamp%29#How_to_avoid_startup_crash|how to avoid]]);&lt;br /&gt;
* Supports only Winamp 2.0 compatible plugins;&lt;br /&gt;
* Doesn&#039;t support plugins with &#039;&#039;Pitch control&#039;&#039; and &#039;&#039;Speed control&#039;&#039; functionality;&lt;br /&gt;
&lt;br /&gt;
==Sound quality issues==&lt;br /&gt;
Due to difference in Foobar and Winamp architecture (Foobar has floating point audio chunks, while Winamp has fixed point ones), floating point to fixed point conversion (and vice versa) is necessary. &lt;br /&gt;
&lt;br /&gt;
Conversion Bit-depth parameter can be set to:&lt;br /&gt;
* 16-bit: low quality, failsafe. Choose this setting, if you encounter a problem while playback;&lt;br /&gt;
* 24-bit: hi-quality;&lt;br /&gt;
* 32-bit: highest quality. &lt;br /&gt;
&lt;br /&gt;
Foo_dsp_winamp converter has built-in limiter to avoid audio signal [[clipping]]. Limiter is non-bypassing (i.e. always on), so if you want to keep signal spectrum close to its original, you should use [[ReplayGain]] subsystem.&lt;br /&gt;
&lt;br /&gt;
==How to avoid startup crash== &lt;br /&gt;
* For Foobar v0.9.6 and later: download the latest version of foo_dsp_winamp (1.4.5);&lt;br /&gt;
* For Foobar versions prior to 0.9.6: you can avoid startup crash by removing dsp_sps.dll from &#039;&#039;C:\Program Files\Winamp\Plugins&#039;&#039; folder (it&#039;s a default path, check your winamp installation to find desired path). Than you can change &amp;quot;Winamp plugins path&amp;quot; in foo_dsp_winamp settings and put dsp_sps.dll back to Plugins folder.&lt;br /&gt;
&lt;br /&gt;
=Link=&lt;br /&gt;
&lt;br /&gt;
* [http://pelit.koillismaa.fi/plugins/dsp.php#149 Official Website]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=49356 Discussion thread]&lt;br /&gt;
* [http://www.fb2k.org/info.php?user=476 Feedback/Bugreports]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Slim_Devices_Squeezebox&amp;diff=22885</id>
		<title>Slim Devices Squeezebox</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Slim_Devices_Squeezebox&amp;diff=22885"/>
		<updated>2011-07-27T17:28:26Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview = &lt;br /&gt;
&#039;&#039;&#039;Squeezebox v3&#039;&#039;&#039; is a hi-end audiophile grade audio player that is designed by Slim Devices (&#039;&#039;now Logitech Inc&#039;&#039;).  It&#039;s made for a vast repotoire of listening environments. Additionally it can interface with the music services [http://wwww.pandora.com Pandora], [http://www.rhapsody.com/ Real Rhapsody], and many other streaming internet radio stations.  The latest version was first released and shipped in October 2005. &lt;br /&gt;
&lt;br /&gt;
== Technical Specifications ==&lt;br /&gt;
=== Audio outputs (general) ===&lt;br /&gt;
==== Digital and analog outputs ==== &lt;br /&gt;
* All RCA connectors are gold-plated &lt;br /&gt;
* Volume control is provided for all outputs &lt;br /&gt;
* Multiple outputs may be used at the same time &lt;br /&gt;
&lt;br /&gt;
==== Analog RCA outputs ====&lt;br /&gt;
* High fidelity [http://focus.ti.com/docs/prod/folders/print/pcm1748.html Burr-Brown™ 24-bit DAC]&lt;br /&gt;
* Two dedicated linear power regulators for DAC and line-out stages &lt;br /&gt;
* Full 6.0Vpp line-level signals &lt;br /&gt;
* Signal-to-noise ratio: over 100dB &lt;br /&gt;
* Total harmonic distortion: less than -93.5dB (0.002%)&lt;br /&gt;
&lt;br /&gt;
==== Digital S/PDIF outputs ====&lt;br /&gt;
* Optical and coax digital connections &lt;br /&gt;
* Dedicated high-precision crystal oscillators (no PLL, no resampling) &lt;br /&gt;
* Standard IEC-958 (S/PDIF) encoding &lt;br /&gt;
* Optical connector: TOSLINK 660nm &lt;br /&gt;
* Coax connector: RCA, 500mVpp into 75 ohms &lt;br /&gt;
* Sample rates: 44.1Khz, 48Khz, 96Khz &lt;br /&gt;
* Audio format: linear PCM, 16 or 24 bits per sample &lt;br /&gt;
* Intrinsic jitter: less than 50ps (standard deviation)&lt;br /&gt;
&lt;br /&gt;
==== Headphone output ====&lt;br /&gt;
* Standard 1/8&amp;quot; jack also functions as an IR blaster &lt;br /&gt;
* Minimum headphone impedance: 16 ohms &lt;br /&gt;
* Total harmonic distortion: less than 0.03% &lt;br /&gt;
* Left/right crosstalk attenuation: 92dB&lt;br /&gt;
&lt;br /&gt;
=== Audio Codecs ===&lt;br /&gt;
==== Lossless ==== &lt;br /&gt;
* [[ALAC]] &lt;br /&gt;
* [[FLAC]] &lt;br /&gt;
* [[WMA Lossless]]&lt;br /&gt;
&lt;br /&gt;
==== Lossy ==== &lt;br /&gt;
* [[MP3]] &lt;br /&gt;
* [[AAC]]&lt;br /&gt;
* [[Ogg Vorbis]] &lt;br /&gt;
* [[Musepack]]&lt;br /&gt;
&lt;br /&gt;
==== Misc ====&lt;br /&gt;
* [[MAD]] decoding &lt;br /&gt;
* High accuracy 24-bit synthesis &lt;br /&gt;
* [[Sound check]] and [[ReplayGain]] support for adjusting the gain on your audio files.&lt;br /&gt;
&lt;br /&gt;
=== Tech Information ===  &lt;br /&gt;
==== Firmware ==== &lt;br /&gt;
* Flash upgradeable firmware &lt;br /&gt;
* Network settings are stored in non-volatile memory &lt;br /&gt;
* Auto-configuration for most networks &lt;br /&gt;
* Easy setup for wireless networks&lt;br /&gt;
&lt;br /&gt;
==== Architecture ====&lt;br /&gt;
* 250 MHz 8-way multithreaded RISC processor &lt;br /&gt;
* &amp;quot;Pure software&amp;quot; SlimDSP™ architecture &lt;br /&gt;
* Field-upgradeable Xilinx CPLD &lt;br /&gt;
* 64 Mb high-speed RAM &lt;br /&gt;
* 16 Mb program flash &lt;br /&gt;
* Low-power design, all solid-state, fanless&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
====Wireless Interface====&lt;br /&gt;
* True 802.11g wireless networking &lt;br /&gt;
* Bridging capability allows Ethernet devices to connect to the network through Squeezebox Wireless &lt;br /&gt;
* Throughput up to 54 Mbps, high speed PCI interface to radio module &lt;br /&gt;
* Dual antennas for improved range and throughput &lt;br /&gt;
* Supports all 802.11b and 802.11g access points &lt;br /&gt;
* Internal antennas: planar inverted-F antenna &lt;br /&gt;
* Automatically detects available networks for quick setup &lt;br /&gt;
* Supports both WPA Personal, WPA2-AES and 64/128-bit WEP encryption &lt;br /&gt;
&lt;br /&gt;
==== Ethernet Interface ====&lt;br /&gt;
* Available on both Wireless and Wired models &lt;br /&gt;
* True 100Mbps throughput &lt;br /&gt;
* Shielded CAT5 RJ-45 connector &lt;br /&gt;
* Connects to any 100 Mbps or 10 Mbps network &lt;br /&gt;
* Auto-detects full duplex and half duplex modes &lt;br /&gt;
* Automatic receive polarity correction &lt;br /&gt;
* Maximum cable length: 100 meters (328 feet)&lt;br /&gt;
&lt;br /&gt;
=== Power ===&lt;br /&gt;
==== Power input ====&lt;br /&gt;
* 5 V DC, regulated &lt;br /&gt;
* Center positive, sleeve ground &lt;br /&gt;
* Connector: 2.5 mm ID, 5.5 mm OD, 11 mm long &lt;br /&gt;
* Min supply rating: 1000 mA &lt;br /&gt;
&lt;br /&gt;
==== Power supply ====&lt;br /&gt;
* Switching power supply included &lt;br /&gt;
* Input voltage range and plug style specific to shipping destination &lt;br /&gt;
* Power supplies are small, efficient, and do not get hot &lt;br /&gt;
* One of four styles is included depending on country&lt;br /&gt;
&lt;br /&gt;
=== Software installation ===&lt;br /&gt;
* All systems: 256 MB RAM, ethernet or wireless network, and 20 MB hard disk space &lt;br /&gt;
* Macintosh: Mac OS X 10.3 or later &lt;br /&gt;
* Windows: 733 MHz Pentium running Windows NT/2000/XP &lt;br /&gt;
* Linux/BSD/Solaris/Other: Perl 5.8.3 or later&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Slim Devices Transporter|Transporter]]  &lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://wiki.slimdevices.com/index.cgi?HardwareComparison Slim Devices comparions] a wiki article comparing the various devices made and a hardware comparison between them&lt;br /&gt;
* [http://forums.slimdevices.com/ Slim Devices forum] 3rd party user forum regarding topics surrounding the Squeezebox &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Hi-Fi]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Slim_Devices_Transporter&amp;diff=22884</id>
		<title>Slim Devices Transporter</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Slim_Devices_Transporter&amp;diff=22884"/>
		<updated>2011-07-27T17:28:11Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview = &lt;br /&gt;
&#039;&#039;&#039;Transporter&#039;&#039;&#039; is an expensive hi-end audiophile grade network audio player that is designed by Slim Devices (&#039;&#039;now Logitech Inc&#039;&#039;). The player is preferred by audiophiles due to it&#039;s reduced clock noise and intrinsic jitter, which is the only distinct difference between it and the [[Slim Devices Squeezebox|Squeezebox]]. Additionally it can interface with many streaming internet radio stations, including the open-source Slim Server software. Transporter was first released and shipped in September 2006.&lt;br /&gt;
&lt;br /&gt;
== Technical Specifications == &lt;br /&gt;
=== Audio Input and Outputs ===&lt;br /&gt;
==== Audio Outputs ====&lt;br /&gt;
* Digital and analog outputs&lt;br /&gt;
* Gold-plated RCA, XLR, and BNC connectors &lt;br /&gt;
* Volume control is provided for all outputs &lt;br /&gt;
* Multiple outputs may be used at the same time&lt;br /&gt;
&lt;br /&gt;
==== Analog Outputs ====&lt;br /&gt;
* [http://www.asahi-kasei.co.jp/akm/en/product/ak4396/ak4396.html AKM AK4396] Multi-bit delta-sigma digital to analog converter &lt;br /&gt;
* Signal-to-noise, Dynamic Range: 120 dB &lt;br /&gt;
* THD+Noise: -106 dB (0.00005 %) &lt;br /&gt;
* Linear Super-Regulated supplies for DAC and line-out stages&lt;br /&gt;
&lt;br /&gt;
==== Digital Outputs and Inputs ====&lt;br /&gt;
* Optical, coax, BNC, and XLR digital connectors &lt;br /&gt;
* Word clock input for synchronization with an external clock &lt;br /&gt;
* Linear-regulated power for all clock paths &lt;br /&gt;
* Dedicated high-precision crystal oscillators (no PLL, no resampling) &lt;br /&gt;
* Standard IEC-958 (S/PDIF) or AES/EBU encoding &lt;br /&gt;
* Optical connector: TOSLINK 660nm &lt;br /&gt;
* RCA connector: capacitor-coupled 500mVpp into 75 ohms &lt;br /&gt;
* BNC connector: transformer-coupled, 500mVpp into 75 ohms &lt;br /&gt;
* XLR connector: 4.7Vpp into 110 ohms &lt;br /&gt;
* Sample rates: 44.1kHz, 48kHz, 96kHz &lt;br /&gt;
* Audio format: linear PCM, 16 or 24 bits per sample &lt;br /&gt;
* Jitter (standard deviation): &lt;br /&gt;
: 11ps at oscillator (intrinsic jitter) &lt;br /&gt;
: 17ps at DAC &lt;br /&gt;
: 35ps at S/PDIF receiver&lt;br /&gt;
&lt;br /&gt;
=== Audio Codecs ===&lt;br /&gt;
==== Lossless ==== &lt;br /&gt;
* [[ALAC]] &lt;br /&gt;
* [[FLAC]] &lt;br /&gt;
* [[WMA Lossless]]&lt;br /&gt;
&lt;br /&gt;
==== Lossy ==== &lt;br /&gt;
* [[MP3]] &lt;br /&gt;
* [[AAC]]&lt;br /&gt;
* [[Ogg Vorbis]] &lt;br /&gt;
* [[Musepack]]&lt;br /&gt;
&lt;br /&gt;
==== Misc ====&lt;br /&gt;
* [[MAD]] decoding &lt;br /&gt;
* High accuracy 24-bit synthesis &lt;br /&gt;
* [[Sound check]] and [[ReplayGain]] support for adjusting the gain on your audio files.&lt;br /&gt;
&lt;br /&gt;
=== Technical information ===&lt;br /&gt;
==== Firmware ==== &lt;br /&gt;
* Flash upgradeable firmware &lt;br /&gt;
* Network settings are stored in non-volatile memory &lt;br /&gt;
* Auto-configuration for most networks &lt;br /&gt;
* Easy setup for wireless networks&lt;br /&gt;
&lt;br /&gt;
==== Architecture ==== &lt;br /&gt;
* 325 MHz 8-way multi-threaded RISC processor &lt;br /&gt;
* Field-upgradeable Xilinx CPLD &lt;br /&gt;
* 64 Mb high-speed RAM &lt;br /&gt;
* 16 Mb program flash &lt;br /&gt;
* Low-power, fanless design&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
==== Wireless Interface ==== &lt;br /&gt;
* True 802.11g wireless networking (can be disabled) &lt;br /&gt;
* Bridging capability allows Ethernet devices to connect to the network through the wireless interface &lt;br /&gt;
* Throughput up to 54Mbps, high speed PCI interface to radio module &lt;br /&gt;
* Dual external antennas for improved range and throughput &lt;br /&gt;
* Supports all 802.11b and 802.11g access points &lt;br /&gt;
* Automatically detects available wireless networks for quick setup &lt;br /&gt;
* Supports both WPA Personal, WPA2-AES and 64/128-bit WEP encryption&lt;br /&gt;
&lt;br /&gt;
==== Ethernet Interface ==== &lt;br /&gt;
* True 100 Mbps throughput &lt;br /&gt;
* Shielded CAT5 RJ-45 connector &lt;br /&gt;
* Connects to any 100Mbps or 10Mbps network &lt;br /&gt;
* Auto-detects full duplex and half duplex modes &lt;br /&gt;
* Automatic receive polarity correction &lt;br /&gt;
* Maximum cable length: 100 meters (328 feet)&lt;br /&gt;
&lt;br /&gt;
=== Power ===&lt;br /&gt;
==== Power Input ==== &lt;br /&gt;
* 100–240 V, 50-60 Hz AC &lt;br /&gt;
* Internal Fuse: 500 mA &lt;br /&gt;
* Standard IEC power connector &lt;br /&gt;
* Included IEC power cable specific to shipping destination&lt;br /&gt;
&lt;br /&gt;
==== Power Supply ==== &lt;br /&gt;
* Separate linear supplies for Analog, DAC, and clocks &lt;br /&gt;
* Auto-ranging, relay-controlled AC input &lt;br /&gt;
* Three Super Regulators for analog stages (+15, -15, +5) &lt;br /&gt;
* High-efficiency, low noise SMPS for CPU, Display &lt;br /&gt;
* Continuous AC voltage monitoring &lt;br /&gt;
* Automatic over-voltage protection &lt;br /&gt;
* Low-power &amp;quot;deep sleep&amp;quot; mode&lt;br /&gt;
&lt;br /&gt;
=== Software installation ===&lt;br /&gt;
==== System Requirements ====&lt;br /&gt;
* All systems: 256MB RAM, ethernet or wireless network, and 20MB hard disk space &lt;br /&gt;
* Macintosh: Mac OS/X 10.3 or later &lt;br /&gt;
* Windows: 733Mhz Pentium running Windows NT/2000/XP &lt;br /&gt;
* Linux/BSD/Solaris/Other: Perl 5.8.3 or later&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://wiki.slimdevices.com/index.cgi?HardwareComparison Slim Devices comparions] a wiki article comparing the various devices made and a hardware comparison between them&lt;br /&gt;
* [http://www.slimdevices.com/su_downloads.html Slim Server downloads] downloading the Slim Server open source software for your machine&lt;br /&gt;
* [http://forums.slimdevices.com/ Slim Devices forum] 3rd party user forum regarding topics surrounding the Transporter.&lt;br /&gt;
* [http://www.engadget.com/2006/07/24/slim-devices-transporter-unwires-high-end/ Engadget review] a technical journalist review of the Transporter&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=48760&amp;amp;st=0 HA Transporter thread] a few screenshots from an HA member who owns a Transporter.&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=11909&amp;amp;hl= Anti-Jitter RAM Buffers thread] discusses whether or not jitter in electronic devices can make a difference audible. &lt;br /&gt;
&lt;br /&gt;
[[Category:Hi-Fi]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=MP3Gain&amp;diff=22883</id>
		<title>MP3Gain</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=MP3Gain&amp;diff=22883"/>
		<updated>2011-07-27T17:27:53Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;MP3Gain&#039;&#039;&#039; is a program that 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&#039;t have to keep reaching for the volume dial on your [[MP3]] player every time it switches to a new song.&lt;br /&gt;
&lt;br /&gt;
MP3Gain is an implementation of [[ReplayGain]], supporting Track mode and Album mode. However, with most other formats, the necessary loudness adjustment of ReplayGain is stored as metadata, thus leaving the encoded results alone. With MP3Gain, the loudness adjustment is done on the data itself, albeit in a lossless/reversible way. Another difference with MP3Gain is the fact that it can only adjust physical volume in 1.5 dB steps.&lt;br /&gt;
&lt;br /&gt;
== Technical Explanation ==&lt;br /&gt;
Here&#039;s the technical reason on why it&#039;s lossless (despite operating on the data itself), and also why the smallest change possible is 1.5 dB: &lt;br /&gt;
&lt;br /&gt;
The MP3 format stores the sound information in small chunks called &amp;quot;frames&amp;quot;. Each frame represents a fraction of a second of sound. In each frame there is a &amp;quot;global gain&amp;quot; field. This field holds an 8-bit integer which can represent values from 0 to 255.&lt;br /&gt;
&lt;br /&gt;
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). &lt;br /&gt;
* If you add 1 to this field in all the MP3 frames, you effectively multiply the amplitude of the whole file by 2^(1/4) = 119 % = +1.5 dB. &lt;br /&gt;
* Likewise, if you subtract 1 from this field, you multiply the amplitude by 2^(-1/4) = 84 % = -1.5 dB.&lt;br /&gt;
&lt;br /&gt;
The way MP3Gain works actually has a very strong benefit: Since it is the data itself that is modified, MP3Gain does not require special support from players.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://mp3gain.sourceforge.net/ MP3Gain&#039;s official website]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=15&amp;amp;t=3274 MP3Gain tutorial] on HA Forums&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Rockbox&amp;diff=22882</id>
		<title>Rockbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Rockbox&amp;diff=22882"/>
		<updated>2011-07-27T17:27:32Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{featured}}&lt;br /&gt;
[[Image:Rockboxlogo.png|right]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rockbox&#039;&#039;&#039; is a [[GPL]]-compliant [[open source]] operating system for portable digital audio players (DAPs). The Rockbox Project began in 2002 and was first implemented on the [[Archos]] Studio DAP because of owner frustration with severe limitations in the manufacturer-supplied user interface and device operations.&lt;br /&gt;
&lt;br /&gt;
Rockbox can completely replace the host device&#039;s operating system firmware and has matured to become an extensible, flexible platform that provides a plug-in architecture for adding PDA functionality, applications, utilities, and games, and has also managed to retrofit video playback functionality onto DAPs first released in mid-2000. Recently, Rockbox now includes a voice-driven user-interface suitable for operation by blind and visually impaired users.&lt;br /&gt;
&lt;br /&gt;
Although Rockbox&#039;s official title is &amp;quot;Rockbox: Open Source Jukebox Firmware&amp;quot;, in many instances it is not actually installed to (or run from) flash memory. Instead a minimal bootloader is installed in the supported device&#039;s flash which is capable of either loading Rockbox from the hard disk or, alternately, the original factory firmware.&lt;br /&gt;
&lt;br /&gt;
== Codecs ==&lt;br /&gt;
&lt;br /&gt;
Rockbox on software decoding platforms (non-Archos) supports playback of eleven [[lossy compression|lossy]] codecs (depending on how one counts), five [[lossless data compression|lossless]], two uncompressed and six miscellaneous formats.&amp;lt;ref&amp;gt;{{cite web|title=Rockbox  Supported audio formats|url=http://download.rockbox.org/daily/manual/rockbox-sansaclipplus/rockbox-buildap2.html#x17-335000B.1|work=Rockbox Manual}}&amp;lt;/ref&amp;gt; This makes a conservative total of 25 supported audio formats, although a few of them do not operate in realtime on all platforms. Extensive work has gone into optimizing each codec, with FLAC, Ogg, WMA, APE and WMA Pro among the fastest known implementations for those formats.&amp;lt;ref&amp;gt;{{cite web|url=http://www.hydrogenaudio.org/forums/index.php?showtopic=82125&amp;amp;view=findpost&amp;amp;p=716976 |title=Codec performance comparison &amp;amp;ndash; Hydrogenaudio Forums |publisher=Hydrogenaudio.org |date= |accessdate=2011-03-12}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lossy formats ===&lt;br /&gt;
&lt;br /&gt;
* MPEG audio layers I-III ([[MP3]]/[[MPEG-1 Audio Layer II|MP2]]/[[MPEG-1 Audio Layer I|MP1]])&lt;br /&gt;
* [[Vorbis|Ogg Vorbis]]&lt;br /&gt;
* [[Advanced Audio Coding|MPEG-4 AAC]](-LC/HE/HEv2 profiles) (in [[MPEG-4 Part 14|MP4]] or [[RealMedia|RM]] containers)&lt;br /&gt;
* [[Musepack]]&lt;br /&gt;
* [[Dolby Digital|AC3]] (raw or [[RealMedia|RM]] container)&lt;br /&gt;
* [[Windows Media Audio|WMA Standard]]&lt;br /&gt;
* [[Windows Media Audio|WMA Professional]]&lt;br /&gt;
* [[Speex]]&lt;br /&gt;
* [[Cook Codec|Cook]]&lt;br /&gt;
* [[Adaptive Transform Acoustic Coding#ATRAC3 (LP2 and LP4 Modes)|ATRAC3]]&lt;br /&gt;
* The lossy portion of [[WavPack]] hybrid files&lt;br /&gt;
&lt;br /&gt;
=== Lossless formats ===&lt;br /&gt;
&lt;br /&gt;
* [[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
* [[WavPack]]&lt;br /&gt;
* [[Shorten]]&lt;br /&gt;
* [[Apple Lossless]]&lt;br /&gt;
* [[Monkey&#039;s Audio]]&lt;br /&gt;
* [[TTA (codec)|TTA]]&lt;br /&gt;
&lt;br /&gt;
=== Uncompressed formats ===&lt;br /&gt;
&lt;br /&gt;
* Intel-style [[WAV]]&lt;br /&gt;
* Apple [[Audio Interchange File Format|AIFF]]&lt;br /&gt;
Together they include over a dozen different [[Pulse-code modulation|PCM]] and [[Adaptive DPCM|ADPCM]] formats.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Rockbox features ==&lt;br /&gt;
&lt;br /&gt;
Beside the ability of playing and recording audio files, Rockbox offers many playback enhancements that other firmware packages may not have implemented yet. Listed below are a handful of these features.&lt;br /&gt;
&lt;br /&gt;
* [[Gapless playback]]&amp;lt;ref&amp;gt;{{cite web|title=Codec Featureset|url=http://download.rockbox.org/daily/manual/rockbox-sansaclipplus/rockbox-buildap2.html#x17-339000B.1.4|work=Rockbox Manual|accessdate=22 May 2011}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[crossfader|Crossfading]]&amp;lt;ref&amp;gt;{{cite web|title=Crossfade|url=http://download.rockbox.org/daily/manual/rockbox-sansaclipplus/rockbox-buildch7.html#x10-1220007.7|work=Rockbox Manual|accessdate=22 May 2011}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[ReplayGain]]&amp;lt;ref name=&amp;quot;soft_decode&amp;quot;&amp;gt;Software decoding targets only&amp;lt;/ref&amp;gt;&lt;br /&gt;
* 5 band fully parametric [[equalization (audio)|equalizer]]&amp;lt;ref name=&amp;quot;soft_decode&amp;quot; /&amp;gt;&lt;br /&gt;
* Variable speed decoding with pitch correction&amp;lt;ref&amp;gt;{{cite web|title=Pitch|url=http://download.rockbox.org/daily/manual/rockbox-sansaclipplus/rockbox-buildch4.html#x7-630004.3.3|work=Rockbox Manual|accessdate=22 May 2011}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[Crossfeed]]&amp;lt;ref name=&amp;quot;soft_decode&amp;quot; /&amp;gt;&lt;br /&gt;
* OTF (&amp;quot;on the fly&amp;quot;) playlists&lt;br /&gt;
* True random shuffle (fresh randomly shuffled list every time)&lt;br /&gt;
* Custom [[Theme (computing)|UI themes]]&lt;br /&gt;
* Dynamic Playlists (queue files to play next, or in other parts of a dynamic playlist)&lt;br /&gt;
* Stereo recording to WAV/AIFF/WavPack (lossless) and MP3&amp;lt;ref&amp;gt;MP3, WavPack and AIFF are available on non-Archos devices. Multiple sample rates and bitrates available (hardware-dependent).&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web|title=Recording|url=http://download.rockbox.org/daily/manual/rockbox-sansaclipplus/rockbox-buildch10.html#x13-14900010|work=Rockbox Manual|accessdate=22 May 2011}}&amp;lt;/ref&amp;gt; (supporting devices)&lt;br /&gt;
* [[FM broadcasting|FM radio]], including FM recording (supporting devices)&lt;br /&gt;
* Remote control (supporting devices)&lt;br /&gt;
* Digital [[S/PDIF]] input/output (supporting devices)&lt;br /&gt;
* [[Last.fm]] support (even on players lacking [[Real-time clock|RTC]])&lt;br /&gt;
* [[cue sheet (computing)|Cue sheet]] support&lt;br /&gt;
* Changeable selector bar&lt;br /&gt;
* Album art&amp;lt;ref&amp;gt;{{cite web|url=http://www.rockbox.org/twiki/bin/view/Main/AlbumArt |title=Some limitations. Details at Rockbox Wiki |publisher=Rockbox.org |date= |accessdate=2011-03-12}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Sleep timer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://www.rockbox.org/ The Rockbox Project]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green;&amp;quot;&amp;gt;&#039;&#039;~ Text taken from [http://en.wikipedia.org/wiki/Rockbox Wikipedia entry for Rockbox]&#039;&#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Firmware]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=OggdropXPd&amp;diff=22881</id>
		<title>OggdropXPd</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=OggdropXPd&amp;diff=22881"/>
		<updated>2011-07-27T17:27:12Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Software&lt;br /&gt;
| name = OggDropXPd&lt;br /&gt;
| logo =&lt;br /&gt;
| screenshot = [[image:Oggdropxpd-idle.PNG|130px]]&lt;br /&gt;
| caption = Graphical drag-n-drop frontend&lt;br /&gt;
| maintainer = John Edwards&lt;br /&gt;
| stable_release = 1.9.0&lt;br /&gt;
| preview_release =&lt;br /&gt;
| operating_system = Windows&lt;br /&gt;
| use = Encoder/Decoder&lt;br /&gt;
| license = GPL&lt;br /&gt;
| website = [http://www.rarewares.org/ogg-oggdropxpd.php RareWares]&lt;br /&gt;
}}&lt;br /&gt;
= Introduction =&lt;br /&gt;
John33&#039;s (Ogg) [[Vorbis]] encoder with a nice drag-and-drop interface.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Compression from [[lossless]] files ([[FLAC]], [[LPAC]], [[Monkey&#039;s Audio]], [[OptimFROG]], and [[WavPack]])&lt;br /&gt;
:&#039;&#039;&#039;Note:&#039;&#039;&#039; if you want to use Monkey&#039;s Audio, LPAC, WavPack, or OptimFrog as source files, you must provide the decoder yourself.&lt;br /&gt;
* Auto-tagging&lt;br /&gt;
* Renaming encoded files (using FLAC Tags)&lt;br /&gt;
* Setting of advanced encoder parameters&lt;br /&gt;
* Use of VorbisGain tags ([[ReplayGain]] for Vorbis) on decode&lt;br /&gt;
* Playlist (.pls) creation&lt;br /&gt;
* And more...&lt;br /&gt;
&lt;br /&gt;
= Quick start manual =&lt;br /&gt;
Here is a short user manual on how to quickly employ OggDropXPd. This is not exhaustive; a far more exhaustive one is hosted at [http://www.rarewares.org/ogg-oggdropxpd.php this site].&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
* Extract the ZIP file you download (see the [[OggDropXPd#Download|Download section]]) to any folder.&lt;br /&gt;
* If you use the processor-optimized version (i.e. for P3/AMD or for P4), also copy &#039;&#039;&#039;libmmd81.dll&#039;&#039;&#039; into the same folder. You can get it at [http://www.rarewares.org/files/libmmd8.1.zip here].&lt;br /&gt;
* (Optional) Create a shortcut and copy it into your Start Menu, Desktop, QuickLaunch bar, etc.&lt;br /&gt;
* If you want support for encoding from lossless file (other than [[FLAC]] support which is built-in), extract the proper decoders in the same folder. You can get them at RareWares.&lt;br /&gt;
&lt;br /&gt;
== Configuring for Encoding ==&lt;br /&gt;
&#039;&#039;Note: All ScreenCaps taken from OggDropXPd v1.8.7&#039;&#039;&lt;br /&gt;
* Start OggDropXPd. The small Drop Target window will open (the right one is for [[Lancer]] OggDropXPd):&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:60px;&amp;quot;&amp;gt;[[Image:Oggdropxpd-idle.PNG]] [[Image:Oggdropxpd-idle_lancer.PNG]]&amp;lt;/div&amp;gt;&lt;br /&gt;
* Right-click on the small window. The following menu will be displayed:&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:60px;&amp;quot;&amp;gt;[[Image:Oggdropxpd-menu.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
* Click on a menu item to change the options. Menu items relevant for Encoding are described below.&lt;br /&gt;
&lt;br /&gt;
=== Encoding Options ===&lt;br /&gt;
This is used to configure the Vorbis Encoder&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:60px;&amp;quot;&amp;gt;[[Image:Oggdropxpd-encodingoptions.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
* General EncoderOptions&lt;br /&gt;
:This is where you choose the quality of the encoded file.&lt;br /&gt;
&lt;br /&gt;
:* &#039;&#039;&#039;Use Standard Quality Mode&#039;&#039;&#039; &amp;lt;font style=&amp;quot;color:red;&amp;quot;&amp;gt;&#039;&#039;-- Recommended&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
::This ensures the highest quality, although you cannot exactly determine the bitrate.&lt;br /&gt;
::You can either type the exact -q value in the textbox, or drag the slider. Higher -q value gives better quality at the expense of larger file size.&lt;br /&gt;
::For some guidelines on what -q value to use, check out the [[Recommended Ogg Vorbis]] page.&lt;br /&gt;
:* &#039;&#039;&#039;Use Quality Mode by selection of Approximate Bitrate&#039;&#039;&#039;&lt;br /&gt;
::Sometimes you need to encode files at a certain bitrate, e.g. for streaming. Choose this and specify the approximate bitrate you&#039;re trying to get.&lt;br /&gt;
:* &#039;&#039;&#039;Bitrate management&#039;&#039;&#039;&lt;br /&gt;
::Although these two radio-buttons seem to be subsets of the previous option, they stand on their own, actually. i.e choosing either one of these two unselects the top 2 options.&lt;br /&gt;
::The following two options are not recommended, as they tend to sacrifice quality.&lt;br /&gt;
:::* &#039;&#039;&#039;Use ABR mode&#039;&#039;&#039;, here you can limit the minimum bitrate (may cause size bloat), maximum bitrate (may reduce quality on &#039;difficult&#039; songs), and the nominal bitrate (affects quality if too low)&lt;br /&gt;
:::* &#039;&#039;&#039;Use CBR mode&#039;&#039;&#039;. Here you just specify the bitrate you want.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Delete input files after encoding&#039;&#039;&#039;&lt;br /&gt;
:Self-explanatory. However, if you do not have the original source (e.g. CD), then &#039;&#039;&#039;it is recommended to uncheck this option&#039;&#039;&#039;. Just in case you need to re-encode, you will still have the source.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Advanced Encoder Options&#039;&#039;&#039;&lt;br /&gt;
:For QuickStarting, you can leave these options &#039;&#039;&#039;unchecked&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Other Advanced Encoder Options&#039;&#039;&#039;&lt;br /&gt;
:For QuickStarting, leave this button alone.&lt;br /&gt;
&lt;br /&gt;
=== Select Output Directory ===&lt;br /&gt;
This is used to configure where the encoded file will be placed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:60px;&amp;quot;&amp;gt;[[Image:Oggdropxpd-output_directory_options.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Same as Input Directory&#039;&#039;&#039;&lt;br /&gt;
:The resulting .ogg file will be placed in the same directory as the source file. This is the default after installation.&lt;br /&gt;
:&amp;lt;div style=&amp;quot;color:blue;&amp;quot;&amp;gt;For the purposes of this QuickStart, choose this option.&amp;lt;/div&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Set Other Output Directory - THIS SESSION ONLY&#039;&#039;&#039;&lt;br /&gt;
:You can specify in where to put the resulting .ogg file by clicking on the &amp;quot;...&amp;quot; button. However, if you close OggDropXPd and restart it later, the setting will revert back to &amp;quot;Same as Input Directory.&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;Set Other Output Directory - AS DEFAULT&#039;&#039;&#039;&lt;br /&gt;
:Same as above, but your specified directory will be used for later sessions also.&lt;br /&gt;
&lt;br /&gt;
=== Select Temporary Directory ===&lt;br /&gt;
If you use the [[lossless]] source files of the formats .ape, .pac, .wv, .ofr, or .ofs, then this is where you store the temporary uncompressed .wav file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:60px;&amp;quot;&amp;gt;[[Image:Oggdropxpd-temporary_directory_options.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This dialog box should be self-explanatory.&lt;br /&gt;
&lt;br /&gt;
=== Other Settings ===&lt;br /&gt;
* Uncheck AUTO Tagging&lt;br /&gt;
* Check: Write Log File, Show Bit Rate, Always On Top&lt;br /&gt;
&lt;br /&gt;
== Encoding! ==&lt;br /&gt;
Drag and drop the file to be encoded from Windows Explorer onto the OggDropXPd droptarget window, and wait. The logo will spin while it is encoding: (Image capture of Lancer OggDropXPd)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:60px;&amp;quot;&amp;gt;[[Image:Oggdropxpd-encoding_lancer.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are 4 information shown while encoding, under the spinning logo:&lt;br /&gt;
* Last granule bitrate&lt;br /&gt;
* Current setting | encoding speed (i.e. x of real time)&lt;br /&gt;
* The lighter bar indicates the progress for the currently encoded file&lt;br /&gt;
* The darker bar indicates the total progress (i.e. when you dropped more than one source file onto OggDropXPd)&lt;br /&gt;
&lt;br /&gt;
When the logo stops spinning... you&#039;re done! The resulting .ogg file can be found in the same directory as the source file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Thus concludes OggDropXPd QuickStart manual for encoding.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
You can download the latest version from [http://www.rarewares.org/ogg.html Vorbis page at RareWares].&lt;br /&gt;
&lt;br /&gt;
A highly-optimized version is also available at the [http://homepage3.nifty.com/blacksword/index_e.htm Ogg Vorbis Acceleration Project], with the codename of [[Lancer]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=MediaMonkey&amp;diff=22880</id>
		<title>MediaMonkey</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=MediaMonkey&amp;diff=22880"/>
		<updated>2011-07-27T17:26:55Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox|&lt;br /&gt;
|name = MediaMonkey&lt;br /&gt;
|logo = [[image:Monkey_head_wiki.png|noframe|MediaMonkey Logo]]&lt;br /&gt;
|screenshot =&lt;br /&gt;
|caption =&lt;br /&gt;
|maintainer = [http://www.ventismedia.com/ Ventis Media, Inc.]&lt;br /&gt;
|stable_release = [http://www.mediamonkey.com/MediaMonkey_Setup.exe 3.2.6.1307]&lt;br /&gt;
|preview_release = [http://www.mediamonkey.com/forum/viewtopic.php?f=6&amp;amp;t=54426&amp;amp;sd=d 4.0.0.1411]&lt;br /&gt;
|operating_system = Windows&lt;br /&gt;
|use = Music Organizer, Mass Tagger, [http://wiki.hydrogenaudio.org/index.php?title=Category:Media_Players Media Player], Burning Media, Portable Player Synchronizing&lt;br /&gt;
|license = Freeware, Proprietary&lt;br /&gt;
|website = [http://www.mediamonkey.com/ www.mediamonkey.com]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MediaMonkey&#039;&#039;&#039; is a Windows-based media player/library, with built-in file tagger &amp;amp; organizer, [[Compact Disc Digital Audio|Audio CD]] ripper/burner (limited speed on free version), Data CD burner (also limited speed on free version), [[transcoding]] tool, [[ReplayGain]] tool, and lots others, all in an integrated user interface natively themed as a (skinnable) media library.&lt;br /&gt;
&lt;br /&gt;
It maintains its library in a database that is compatible with &#039;&#039;&#039;Microsoft Access&#039;&#039;&#039; database format, and as such, the database entries can be changed by using Access or other compatible programs. However, it also stores most of its information into the media files&#039; [[tags]] ([[ID3v1]], [[ID3v2]], [[Vorbis comment]], [[WMA]], [[APEv2]], [[WAV]] and [[AAC]] tags are supported), thus ensuring usability with other media players.&lt;br /&gt;
&lt;br /&gt;
MediaMonkey also provides auto-tagging/auto-renaming support, in which tag information are deduced from file&#039;s path and name (or alternatively through Amazon which support tagging/adding [[Album Art]]), or reversely, renaming (and relocating) files based on their tag or path information.&lt;br /&gt;
&lt;br /&gt;
Finally, MediaMonkey also support integration with various portable DAPs, including [[Apple iPod]], [[iRiver]], and [[Creative Labs]] devices. Latest MediaMonkey 3.2 added support for [[Palm Pre]]&lt;br /&gt;
&lt;br /&gt;
== Supported Formats ==&lt;br /&gt;
* [[Free Lossless Audio Codec]] (FLAC)&lt;br /&gt;
* [[Monkey&#039;s Audio]] (APE)&lt;br /&gt;
* [[MP3]]&lt;br /&gt;
* [[Musepack]] (MPC)&lt;br /&gt;
* (Ogg) [[Vorbis]]&lt;br /&gt;
* [[WAV]]&lt;br /&gt;
* [[Windows Media Audio]] (WMA)&lt;br /&gt;
* [[AAC]] *Version 3.x and Above&lt;br /&gt;
&lt;br /&gt;
Additional formats may be supported through Winamp input plugins (see below)&lt;br /&gt;
&lt;br /&gt;
== Extensibility ==&lt;br /&gt;
MediaMonkey supports most Winamp&#039;s input, output, DSP, general, and visualization plugins.&lt;br /&gt;
&lt;br /&gt;
In addition, MediaMonkey provides [http://www.mediamonkey.com/wiki/index.php/Scripting scripting interfaces], so it is scriptable (built-in support for JavaScript/VB Script) and also controllable by external applications (through Winamp Compatible Messages or OLE Automatization Server/COM+).&lt;br /&gt;
&lt;br /&gt;
Finally, MediaMonkey is skinnable. Many MediaMonkey users have developed various skins for it, which you can find in the [http://www.mediamonkey.com/wiki/index.php/Skinning MediaMonkey Wiki].&lt;br /&gt;
&lt;br /&gt;
== Price ==&lt;br /&gt;
The [http://www.mediamonkey.com/product.htm free (Standard) version], is, well, free.&lt;br /&gt;
&lt;br /&gt;
[http://www.mediamonkey.com/product_gold.htm The Gold version] – which adds, among others, automatic/periodic scan of &amp;quot;watched folders&amp;quot; – is 29.95 USD for lifetime.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://www.mediamonkey.com MediaMonkey homepage]&lt;br /&gt;
* [http://www.mediamonkey.com/forum/ MediaMonkey forums]&lt;br /&gt;
* [http://www.mediamonkey.com/wiki/ MediaMonkey Wiki]&lt;br /&gt;
* [http://mediamonkey.com/faq/ MediaMonkey FAQ]&lt;br /&gt;
* [http://mediamonkey.com/support/ MediaMonkey Support Knowledgebase]&lt;br /&gt;
* [http://home.scarlet.be/ruben.castelein/MediaMonkey%20Scripts.htm Ruben Castelein (Steegy) Script Collection]&lt;br /&gt;
* [http://trixmoto.net/mm/ Richard Lewis (t-rix-mo-to) MediaMonkey page]&lt;br /&gt;
* [http://webmonkey.flyinglowlander.com/ Martin Warning (FlyingLowlander) WebMonkey Page]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Media Players]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Music_Player_Daemon&amp;diff=22879</id>
		<title>Music Player Daemon</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Music_Player_Daemon&amp;diff=22879"/>
		<updated>2011-07-27T17:26:40Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Music Player Daemon&#039;&#039;&#039; (&#039;&#039;&#039;MPD&#039;&#039;&#039;) is an open-source music playback and playlist handling daemon. It can be controlled via local clients or remotely.&lt;br /&gt;
&lt;br /&gt;
== Supported formats ==&lt;br /&gt;
* [[MP3]], (Ogg) [[Vorbis]], [[Free Lossless Audio Codec|FLAC]], [[Advanced Audio Coding|AAC]], [[MOD]], [[RIFF WAVE|WAV]] and [[Musepack]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* [[Tags]]&lt;br /&gt;
* [[ReplayGain]]&lt;br /&gt;
* Gapless playback&lt;br /&gt;
&lt;br /&gt;
== Supported languages ==&lt;br /&gt;
* English.&lt;br /&gt;
&lt;br /&gt;
== Supported platforms ==&lt;br /&gt;
* Linux/BSD&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://musicpd.org/ Homepage]&lt;br /&gt;
* [http://musicpd.org/download.shtml Download]&lt;br /&gt;
&lt;br /&gt;
[[Category:Media Players]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Lossless_comparison&amp;diff=22878</id>
		<title>Lossless comparison</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Lossless_comparison&amp;diff=22878"/>
		<updated>2011-07-27T17:26:21Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;lossless comparison page&#039;&#039;&#039; aims to gather information about lossless codecs available so users can make an informed decision as to what lossless codec to choose for their needs.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Given the enormous amount of [[lossless]] audio compressor choices available, it is a very difficult task to choose the one most suited for each person&#039;s needs.&lt;br /&gt;
&lt;br /&gt;
Several people only take into consideration compression performance when choosing a codec. But as the following table and article shows, there are several other features worth taking into consideration when making that choice.&lt;br /&gt;
&lt;br /&gt;
For example, users wanting good multiplatform compatibility and robustness (E.G, people sharing live recordings) would favour [[WavPack]] or [[FLAC]]. Another user, looking for the very highest compression available, would go with [[OptimFROG]]. Someone wanting portable support would use [[FLAC]] or [[ALAC]], and so on.&lt;br /&gt;
&lt;br /&gt;
En fin, this is not a matter worth getting too worked up about. If you later find out the codec you chose isn&#039;t the best for your needs, you can just transcompress to another format, without risk of losing quality.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; for latest comparison of lossless compression, scroll down to the [[Lossless comparison#External links|Links section of this page]].&lt;br /&gt;
&lt;br /&gt;
== Comparison Table ==&lt;br /&gt;
&amp;lt;!-- Do NOT add links to the table. It&#039;s cluttered and colourful enough as it is. Please add them to the article itself if needed. Thanks --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center; border:1px solid blue;&amp;quot;&lt;br /&gt;
|width=&amp;quot;120px&amp;quot;|&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | FLAC&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | WavPack&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | TAK&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | Monkey&#039;s&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | OptimFROG&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | ALAC&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | WMA&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Encoding speed&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | fast&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | fast&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | slow&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Decoding speed&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | fast&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Compression*&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 58.70%&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 58.0%&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 57.0%&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | 55.50%&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | 54.70%&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 58.50%&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | 56.30%&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Flexibility**&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Error handling&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Seeking&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Tagging&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | Vorbis tags&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | ID3/APE&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | APEv2 (exp.)&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | ID3/APE&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | ID3/APE&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | iTunes&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | ASF&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Hardware support &lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | limited&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | limited&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | good&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | limited&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Software support&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | good&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | good&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | good&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Hybrid/lossy&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | ReplayGain&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | sort of&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | RIFF chunks&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Streaming&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Pipe support&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Open source&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes (third-party)&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Multichannel&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | High resolution&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | OS support&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | Win/Linux Wine&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | Win/Mac/Linux&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | Win/Mac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(table continued below)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;2&amp;quot; style=&amp;quot;text-align:center; border:1px solid blue;&amp;quot;&lt;br /&gt;
|width=&amp;quot;120px&amp;quot;|&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | Shorten&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | LA&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | TTA&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | LPAC&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | MPEG-4 ALS&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | MPEG-4 SLS&lt;br /&gt;
| width=&amp;quot;95px&amp;quot; style=&amp;quot;background: #00FFFF&amp;quot; | Real Lossless&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Encoding speed&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | slow&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | slow&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | slow           &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Decoding speed&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very fast&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | slow&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | fast&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | fast&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | fast&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | slow&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | fast        &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Compression*&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | 63.50%&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | 53.50%&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 57.10%&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 57.20%&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 57.10%&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | ?&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | 57.0%            &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Flexibility**&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad              &lt;br /&gt;
|-&lt;br /&gt;
|! style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Error handling&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;            &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Seeking&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | slow&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Tagging&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | ID3v1&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | ID3&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | proprietary &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Hardware support&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | limited&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no              &lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | limited&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Software support&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | very good&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | average&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | bad              &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Hybrid/lossy&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | ReplayGain&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | RIFF chunks&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;            &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Streaming&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Pipe support&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #FFFFFF&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Open source&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | Multichannel&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | High resolution&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | yes&lt;br /&gt;
| style=&amp;quot;background: #FF9900&amp;quot; | no               &lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;left&amp;quot; style=&amp;quot;background: #FFFF99&amp;quot; | OS support&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | Win/Linux&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #CCFFCC&amp;quot; | Win/Linux/Sol&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | All&lt;br /&gt;
| style=&amp;quot;background: #00FF00&amp;quot; | Win/Mac/Linux     &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; The Compression ratio is calculated with the division of compressed size by uncompressed size * 100. So, lower is better.&lt;br /&gt;
&lt;br /&gt;
Encoding speed, Decoding speed and Compression ratio are based on each encoder&#039;s default settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt; Flexibility refers to the amount of encoding choices offered to the users (Fast/low compression, Slow/high compression and everything inbetween)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the most popular lossless codecs, in alphabetical order:&lt;br /&gt;
&lt;br /&gt;
== Apple Lossless Audio Codec (ALAC) ==&lt;br /&gt;
http://www.apple.com/itunes/import.html &lt;br /&gt;
&lt;br /&gt;
[[ALAC]] is a codec developed by Apple for usage in [[Apple iPod|iPod]] and AirPort Express.&lt;br /&gt;
&lt;br /&gt;
=== ALAC pros ===&lt;br /&gt;
* Very fast decoding&lt;br /&gt;
* [[Open source]] (encoding and decoding via FFmpeg and [[CueTools|CUETools]], decoding only via [http://craz.net/programs/itunes/alac.html a standalone decoder])&lt;br /&gt;
* Hardware support ([[Apple iPod|iPod]], AirPort Express)&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Tagging support (QT tags)&lt;br /&gt;
* Excellent hardware-software-lossy format integration with [[iTunes]]/iPod.&lt;br /&gt;
* Supports [[multichannel]] audio and [[high resolution]]s&lt;br /&gt;
&lt;br /&gt;
=== ALAC cons ===&lt;br /&gt;
* Limited software support&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
&lt;br /&gt;
=== ALAC Other features ===&lt;br /&gt;
* Fits in the [[MP4]] container&lt;br /&gt;
* Can be used with the AirPort Express gadget&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Free Lossless Audio Codec (FLAC) ==&lt;br /&gt;
http://flac.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
[[FLAC]] is a lossless codec developed by Josh Coalson. It&#039;s part of the Xiph multimedia portfolio, along with [[Ogg]], [[Vorbis]], [[Speex]] and [[Theora]].&lt;br /&gt;
&lt;br /&gt;
=== FLAC pros ===&lt;br /&gt;
* [[Open source]]&lt;br /&gt;
* Very fast decoding&lt;br /&gt;
* Fast encoding&lt;br /&gt;
* Hardware support ([[Rio Karma|Karma]], Phatbox, etc.)&lt;br /&gt;
* Very good software support&lt;br /&gt;
* Error robustness&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Supports [[multichannel]] audio and [[high resolution]]s&lt;br /&gt;
* Tagging support (FLAC tags)&lt;br /&gt;
* Supports [[RIFF]] chunks&lt;br /&gt;
* Pipe support&lt;br /&gt;
* [[ReplayGain]] compatible&lt;br /&gt;
&lt;br /&gt;
=== FLAC cons ===&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
&lt;br /&gt;
=== FLAC Other features ===&lt;br /&gt;
* Supports embedded CUE sheets (with [http://flac.sourceforge.net/faq.html#general__no_cuesheet_tags limitations])&lt;br /&gt;
* Includes MD5 hashes for quick integrity checking&lt;br /&gt;
* Fits the [[Ogg]] and [[Matroska]] containers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LosslessAudio (LA) ==&lt;br /&gt;
http://www.lossless-audio.com/&lt;br /&gt;
&lt;br /&gt;
[[LA]] is a lossless codec developed by Michael Bevin.&lt;br /&gt;
&lt;br /&gt;
=== LA pros ===&lt;br /&gt;
* Very high compression&lt;br /&gt;
* Tagging support ([[ID3v1]])&lt;br /&gt;
* Supports [[RIFF]] chunks&lt;br /&gt;
* Pipe support&lt;br /&gt;
&lt;br /&gt;
=== LA cons ===&lt;br /&gt;
* Closed source&lt;br /&gt;
* Very slow encoding and decoding&lt;br /&gt;
* Doesn&#039;t support [[multichannel]] audio and [[high resolution]]s&lt;br /&gt;
* No hardware support&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
* Bad software support&lt;br /&gt;
* Doesn&#039;t support [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;It&#039;s important to mention that the LA foobar plugin is buggy and doesn&#039;t produce lossless streams!&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Lossless Predictive Audio Coder (LPAC) ==&lt;br /&gt;
http://www.nue.tu-berlin.de/wer/liebchen/lpac.html&lt;br /&gt;
&lt;br /&gt;
[[Lossless Predictive Audio Coder]] (LPAC) is a lossless codec developed by Tilman Liebchen. Development of it has been halted in favour of development of [[MPEG-4]] ALS.&lt;br /&gt;
&lt;br /&gt;
=== LPAC pros ===&lt;br /&gt;
* Reasonable compression ratios&lt;br /&gt;
* [[High resolution]] audio support&lt;br /&gt;
* Supports [[RIFF]] chunks&lt;br /&gt;
&lt;br /&gt;
=== LPAC cons ===&lt;br /&gt;
* Closed source&lt;br /&gt;
* No error robustness&lt;br /&gt;
* Slow seeking&lt;br /&gt;
* No tagging&lt;br /&gt;
* No [[multichannel]] support&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
* No hardware support&lt;br /&gt;
* Doesn&#039;t support [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Monkey&#039;s Audio (APE) ==&lt;br /&gt;
http://www.monkeysaudio.com/&lt;br /&gt;
&lt;br /&gt;
[[Monkey&#039;s Audio]] is a very efficient lossless compressor developed by Matt Ashland.&lt;br /&gt;
&lt;br /&gt;
=== APE pros ===&lt;br /&gt;
* [[Open source]]&lt;br /&gt;
* High efficiency&lt;br /&gt;
* Good software support&lt;br /&gt;
* Simple and user friendly. Official GUI provided.&lt;br /&gt;
* Java version (multiplatform)&lt;br /&gt;
* Tagging support ([[ID3v1]], [[APE tags]])&lt;br /&gt;
* [[High resolution]] audio support&lt;br /&gt;
* Supports [[RIFF]] chunks (only in the GUI encoder)&lt;br /&gt;
* Pipe support (only in a [http://www.etree.org/shnutils/shntool/ special] version)&lt;br /&gt;
&lt;br /&gt;
=== APE cons ===&lt;br /&gt;
* No [[multichannel]] support&lt;br /&gt;
* No error robustness&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
* Limited hardware support (Rockbox, some Cowon players); poor battery life due to complicated decoding [http://www.rockbox.org/wiki/SoundCodecMonkeysAudio MP3 player benchmarks]&lt;br /&gt;
* Higher compression levels are extremely CPU intensive&lt;br /&gt;
* Doesn&#039;t support [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
=== APE Other features ===&lt;br /&gt;
* Includes MD5 hashes for quick integrity checking&lt;br /&gt;
* Supports APL image link files (similar to CUE sheets)&lt;br /&gt;
&lt;br /&gt;
== MPEG-4 SLS ==&lt;br /&gt;
MPEG-4 SLS allows audio encoding from lossless scalable to [[AAC]].&lt;br /&gt;
&lt;br /&gt;
=== SLS pros ===&lt;br /&gt;
* Transcoding to standard AAC or any higher lossy bitrate at the speed of copying a file&lt;br /&gt;
* Scalable decoding from lossless, to any bitrate down to the AAC core track&lt;br /&gt;
* Best lossless compression available when you count the AAC track (~5% gain over any other lossless compression + AAC)&lt;br /&gt;
* [[High resolution]] audio support&lt;br /&gt;
* Multi channel audio support&lt;br /&gt;
* [[Open source]] (MPEG-4 Reference code)&lt;br /&gt;
* Embedded in standard MP4 files, so supports same tagging and ReplayGain features as AAC does.&lt;br /&gt;
&lt;br /&gt;
=== SLS cons ===&lt;br /&gt;
* No usable software available yet&lt;br /&gt;
* Pure lossless compression not the best there is&lt;br /&gt;
* Seems to be slow in encoding and decoding, but we have to wait for released software&lt;br /&gt;
&lt;br /&gt;
=== SLS Other features ===&lt;br /&gt;
* Transform based lossless codec with optional LC AAC core track&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== OptimFROG (OFR) ==&lt;br /&gt;
http://losslessaudiocompression.com/&lt;br /&gt;
&lt;br /&gt;
[[OptimFROG]] is a lossless format developed by Florin Ghido to become the champion in audio compression.&lt;br /&gt;
&lt;br /&gt;
=== OFR pros ===&lt;br /&gt;
* Very high compression&lt;br /&gt;
* Good software support&lt;br /&gt;
* Error robustness&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Supports [[high resolution]]s&lt;br /&gt;
* Hybrid/lossy mode&lt;br /&gt;
* Tagging support ([[ID3]], [[APE tags]])&lt;br /&gt;
* Supports [[RIFF]] chunks&lt;br /&gt;
* [[ReplayGain]] compatible&lt;br /&gt;
&lt;br /&gt;
=== OFR cons ===&lt;br /&gt;
* Closed source&lt;br /&gt;
* No [[multichannel]] audio support&lt;br /&gt;
* No hardware support&lt;br /&gt;
* Quite slow decoding&lt;br /&gt;
&lt;br /&gt;
=== OFR Other features ===&lt;br /&gt;
* Supports 32bit float streams&lt;br /&gt;
* Includes MD5 hashes for quick integrity checking&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RealAudio Lossless (RAL) ==&lt;br /&gt;
http://www.realnetworks.com/products/codecs/realaudio.html&lt;br /&gt;
&lt;br /&gt;
RealAudio lossless is the lossless codec developed by Real Networks for their multimedia portfolio&lt;br /&gt;
&lt;br /&gt;
=== RAL pros ===&lt;br /&gt;
* Very fast decoding&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Tagging support (proprietary)&lt;br /&gt;
&lt;br /&gt;
=== RAL cons ===&lt;br /&gt;
* Closed source&lt;br /&gt;
* No [[multichannel]] and [[high resolution]] audio support&lt;br /&gt;
* Little software support (Real Player)&lt;br /&gt;
* No hardware support&lt;br /&gt;
* Compression efficiency not on par with other lossless codecs&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
* No pipe support&lt;br /&gt;
* Doesn&#039;t support [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Shorten (SHN) ==&lt;br /&gt;
http://www.etree.org/shnutils/shorten/&lt;br /&gt;
&lt;br /&gt;
[[Shorten]] is a very old and featureless lossless codec developed by Tony Robinson at SoftSound.&lt;br /&gt;
&lt;br /&gt;
=== SHN pros ===&lt;br /&gt;
* [[Open source]]&lt;br /&gt;
* Fast decoding&lt;br /&gt;
* Very good software support&lt;br /&gt;
* Supports [[RIFF]] chunks&lt;br /&gt;
* Pipe support&lt;br /&gt;
&lt;br /&gt;
=== SHN cons ===&lt;br /&gt;
* Quite inefficient&lt;br /&gt;
* No [[multichannel]] or [[high resolution]] audio support&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
* No error robustness&lt;br /&gt;
* Not streamable&lt;br /&gt;
* No hardware support&lt;br /&gt;
* No native tagging&lt;br /&gt;
* Doesn&#039;t support [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== True Audio (TTA) ==&lt;br /&gt;
http://www.true-audio.com/&lt;br /&gt;
&lt;br /&gt;
[[TTA]] is a new lossless codec developed by a team of russian programmers.&lt;br /&gt;
&lt;br /&gt;
=== TTA pros ===&lt;br /&gt;
* [[Open source]]&lt;br /&gt;
* Good efficiency&lt;br /&gt;
* Hardware support (obscure DVD player)&lt;br /&gt;
* Supports [[multichannel]] audio and [[high resolution]]s&lt;br /&gt;
* Tagging support ([[ID3]])&lt;br /&gt;
* [[ReplayGain]] compatible&lt;br /&gt;
* Error robustness&lt;br /&gt;
&lt;br /&gt;
=== TTA cons ===&lt;br /&gt;
* No streaming support&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
* Doesn&#039;t support [[RIFF]] chunks&lt;br /&gt;
* No pipe support&lt;br /&gt;
&lt;br /&gt;
=== TTA Other features ===&lt;br /&gt;
* Fits the [[Matroska]] container&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== WavPack (WV) ==&lt;br /&gt;
http://www.wavpack.com/&lt;br /&gt;
&lt;br /&gt;
[[WavPack]] is a fast and featureful lossless codec developed by David Bryant.&lt;br /&gt;
&lt;br /&gt;
=== WV pros ===&lt;br /&gt;
* [[Open source]]&lt;br /&gt;
* Very fast decoding&lt;br /&gt;
* Very fast encoding&lt;br /&gt;
* Good efficiency&lt;br /&gt;
* Error robustness&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Hardware support ([http://www.rockbox.org/ RockBox])&lt;br /&gt;
* Supports [[multichannel]] audio and [[high resolution]]s&lt;br /&gt;
* Hybrid/lossy mode&lt;br /&gt;
* Tagging support ([[ID3v1]], [[APE tags]])&lt;br /&gt;
* Supports [[RIFF]] chunks&lt;br /&gt;
* Ability to create self extracting files for Win32 platform&lt;br /&gt;
* Pipe support&lt;br /&gt;
* Good software support&lt;br /&gt;
* [[ReplayGain]] compatible&lt;br /&gt;
&lt;br /&gt;
=== WV cons ===&lt;br /&gt;
* Limited hardware player support&lt;br /&gt;
&lt;br /&gt;
=== WV Other features ===&lt;br /&gt;
* Supports 32bit float streams&lt;br /&gt;
* Supports embedded CUE sheets&lt;br /&gt;
* Includes MD5 hashes for quick integrity checking&lt;br /&gt;
* Can encode in both symmetrical and assymmetrical modes.&lt;br /&gt;
* Fits the [[Matroska]] container&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Windows Media Audio Lossless (WMAL) ==&lt;br /&gt;
http://www.microsoft.com/windows/windowsmedia/9series/codecs/audio.aspx&lt;br /&gt;
&lt;br /&gt;
WMA Lossless is the lossless codec developed by Microsoft to be featured in their Windows Media codec portfolio.&lt;br /&gt;
&lt;br /&gt;
=== WMAL pros ===&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Very good software support&lt;br /&gt;
* Hardware support (All Microsoft Zunes though older models may need firmware updates, also supported by some non-Microsoft devices like the [http://en.wikipedia.org/wiki/Gigabeat Gigabeat V and S line from Toshiba].&lt;br /&gt;
* Supports [[multichannel]] audio and [[high resolution]]s.&lt;br /&gt;
* Tagging support (proprietary)&lt;br /&gt;
* Pipe support&lt;br /&gt;
&lt;br /&gt;
=== WMAL cons ===&lt;br /&gt;
* Closed source&lt;br /&gt;
* No hybrid/lossy mode&lt;br /&gt;
* Doesn&#039;t support [[RIFF]] chunks&lt;br /&gt;
* Doesn&#039;t support [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
=== WMAL Other features ===&lt;br /&gt;
* Fits the [[ASF]] container&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Oddball Formats ==&lt;br /&gt;
There are several old lossless formats that aren&#039;t being featured in the article above. Reasons are: lack of widespread support, lack of features, bad efficiency and, most importantly, it seems no one is really interested in them.&lt;br /&gt;
&lt;br /&gt;
Most of those would have disappeared by now, but they are being preserved for posterity at [[User:Rjamorim|rjamorim]]&#039;s [http://www.rjamorim.com/rrw/ ReallyRareWares]&lt;br /&gt;
&lt;br /&gt;
=== Advanced Digital Audio (ADA) ===&lt;br /&gt;
* http://www.rjamorim.com/rrw/ada.html&lt;br /&gt;
&lt;br /&gt;
=== Bonk ===&lt;br /&gt;
* http://www.logarithmic.net/pfh/bonk&lt;br /&gt;
&lt;br /&gt;
=== Marian&#039;s a-Pac ===&lt;br /&gt;
* http://www.marian.de/en/downloads#APAC&lt;br /&gt;
* http://www.rjamorim.com/rrw/apac.html&lt;br /&gt;
&lt;br /&gt;
=== AudioZip ===&lt;br /&gt;
* http://www.rjamorim.com/rrw/audiozip.html&lt;br /&gt;
&lt;br /&gt;
=== Dakx WAV ===&lt;br /&gt;
* http://www.dakx.com/&lt;br /&gt;
* http://www.rjamorim.com/rrw/daxwav.html&lt;br /&gt;
&lt;br /&gt;
=== Entis Lab MIO ===&lt;br /&gt;
* http://www.entis.gr.jp/eri/frame.html&lt;br /&gt;
* http://www.rjamorim.com/rrw/mio.html&lt;br /&gt;
&lt;br /&gt;
=== LiteWave ===&lt;br /&gt;
* http://www.clearjump.com/products/LiteWave.html&lt;br /&gt;
* http://www.rjamorim.com/rrw/litewave.html&lt;br /&gt;
&lt;br /&gt;
=== Pegasus SPS ===&lt;br /&gt;
* http://www.krishnasoft.com/sps.htm&lt;br /&gt;
* http://www.rjamorim.com/rrw/pegasussps.html&lt;br /&gt;
&lt;br /&gt;
=== RK Audio (RKAU) ===&lt;br /&gt;
* http://www.rjamorim.com/rrw/split2000.html&lt;br /&gt;
&lt;br /&gt;
=== Sonarc ===&lt;br /&gt;
* http://www.rjamorim.com/rrw/sonarc.html&lt;br /&gt;
&lt;br /&gt;
=== VocPack ===&lt;br /&gt;
* http://www.rjamorim.com/rrw/vocpack.html&lt;br /&gt;
&lt;br /&gt;
=== WavArc ===&lt;br /&gt;
* http://www.rjamorim.com/rrw/wavarc.html&lt;br /&gt;
&lt;br /&gt;
=== WaveZip/MUSICompress ===&lt;br /&gt;
* http://members.aol.com/_ht_a/sndspace/&lt;br /&gt;
* http://www.rjamorim.com/rrw/wavezip.html&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Lossless]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
=== Other lossless compressions comparisons ===&lt;br /&gt;
&#039;&#039;Sorted based on last &#039;&#039;&#039;update&#039;&#039;&#039; date.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [http://uclc.info/LossLess.pdf Johan De Bock&#039;s speed oriented comparison] - best choices speedwise are indicated in green, mostly electronic music (last updated 2006-07-22)&lt;br /&gt;
* [http://web.inter.nl.net/users/hvdh/lossless/lossless.htm Hans Heijden&#039;s] -- used as reference to build the table (last updated 2006-07-07)&lt;br /&gt;
* [http://synthetic-soul.co.uk/comparison/lossless/ Synthetic Soul&#039;s comparison] (last update 2007-07-28)&lt;br /&gt;
* [http://synthetic-soul.co.uk/comparison/josef/ Josef Pohm&#039;s comparison, hosted by Synthetic Soul] (last update 2006-05-29)&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/lossless_audio_2006.html Bobulous&#039; lossless audio comparison] — a look at six lossless formats in terms of speed and file size (last updated 2006-05-22)&lt;br /&gt;
* [http://uclc.info/lossless_audio_compression_test.htm Johan De Bock&#039;s size oriented comparison] - aimed only at the maximum compression setting for each codec (based on a somewhat limited set of samples, however) (last updated 2006-05-19)&lt;br /&gt;
* [http://guruboolez.free.fr/lossless/ Guruboolez&#039;] -- comparing only classical music (last updated 2005-02-27)&lt;br /&gt;
* [http://members.home.nl/w.speek/comparison.htm Speek&#039;s] (last updated 2005-02-07)&lt;br /&gt;
&lt;br /&gt;
=== More on lossless compressions ===&lt;br /&gt;
* [http://losslessaudioblog.com/ The Lossless Audio Blog] - by windmiller, is a reliable and complete source of news about lossless compression.&lt;br /&gt;
* Go to the [http://www.hydrogenaudio.org/forums/index.php?showtopic=33226 Hydrogenaudio thread] to discuss this article.&lt;br /&gt;
&lt;br /&gt;
[[Category:Guides]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Download_page&amp;diff=22877</id>
		<title>Download page</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Download_page&amp;diff=22877"/>
		<updated>2011-07-27T17:25:19Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All programs mentioned anywhere in the wiki can be downloaded here.&lt;br /&gt;
See also the [[:Category:Software|Software Category]] article for more software not listed here. &lt;br /&gt;
&lt;br /&gt;
==CD Rippers==&lt;br /&gt;
===Windows===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ccccff; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ccccff&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:150px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:90px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:300px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[CDex]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://cdexos.sourceforge.net/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | An open-source ripper for Windows that uses cdparanoia functionality&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[DBpowerAMP with AccurateRip|DBpowerAMP]]&lt;br /&gt;
| Free, Shareware &lt;br /&gt;
| [http://www.dbpoweramp.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | A secure ripper for Windows that includes Accurate Stream functionality&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Deep Ripper&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://www.deepburner.com/ here]&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[EAC]]&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.exactaudiocopy.de/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | A secure ripper for Windows, C2 error pointers, Accurate Stream, etc.&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[BonkEnc]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://www.bonkenc.org/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Ripper with [[Cdparanoia]] support. It&#039;s an open-source project.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Mac OS X===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #bbffbb; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#bbffbb;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:150px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:90px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:350px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Max]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://sbooth.org/Max/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | A secure ripper for OS X that uses additional cdparanoia functionality&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[XLD]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://tmkk.hp.infoseek.co.jp/xld/index_e.html here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | X Lossless Decoder(XLD) is a tool for Mac OS X that is able to decode/convert/play various &#039;lossless&#039; audio files. The supported audio files can be split into some tracks with cue sheet when decoding. Can convert between many lossless and lossy formats. Plugin oriented design, for easy exchange for new encoders.&lt;br /&gt;
|}&lt;br /&gt;
===Linux===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ffcccc; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ffcccc;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:150px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:90px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:320px;&amp;quot; | Description&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | abcde &lt;br /&gt;
| GPL &lt;br /&gt;
|[http://www.hispalinux.es/~data/abcde.php here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | A command-line based ripper with cdparanoia functionality&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[cdparanoia]]&lt;br /&gt;
| BSD, GPL&lt;br /&gt;
| [http://www.xiph.org/paranoia/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | One of the first secure standalone rippers for the Linux platform&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Grip]] &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://www.nostatic.org/grip here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | An open-source Gnome interface ripper that uses cdparanoia functionality &lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Rubyripper]] &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://www.rubyforge.org/ here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | A secure ripper for the Linux that uses additional cdparanoia functionality&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CD/DVD Writers==&lt;br /&gt;
===Windows===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ccccff; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ccccff&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:185px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:80px;&amp;quot; | Unicode&lt;br /&gt;
! style=&amp;quot;width:90px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:270px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | BurnAtOnce&lt;br /&gt;
| N&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.burnatonce.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | CD writing application based upon CDRDAO &lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Burrrn]] (CDA only)&lt;br /&gt;
| N&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.burrrn.net/ here]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | CDBurnerXP&lt;br /&gt;
| &lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.cdburnerxp.se/ here]&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | DeepBurner Free&lt;br /&gt;
| N&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://www.deepburner.com/ here]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | DeepBurner Pro&lt;br /&gt;
| &lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://www.deepburner.com/ here]&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Express Burn&lt;br /&gt;
| N&lt;br /&gt;
| Free&lt;br /&gt;
| [http://nch.com.au/burn/index.html here]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Express Burn Plus&lt;br /&gt;
| &lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://nch.com.au/burn/index.html here]&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Infra Recorder&lt;br /&gt;
| N&lt;br /&gt;
| GPL &lt;br /&gt;
| [http://infrarecorder.sourceforge.net/ here]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Nero]]&lt;br /&gt;
| N&lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://www.nero.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; |&lt;br /&gt;
|-style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | SilentNight Micro-CD Burner&lt;br /&gt;
| N&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.silentnight2004.com/Download.html here]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Mac OS X===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #bbffbb; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#bbffbb;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:130px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:80px;&amp;quot; | Unicode&lt;br /&gt;
! style=&amp;quot;width:90px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:310px;&amp;quot; | Description&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[DVD-Audio Tools]]&lt;br /&gt;
| Y &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://dvd-audio.sourceforge.net/ here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Open-source DVD-Audio authoring application  &lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[FireStarter FX]] &lt;br /&gt;
| N &lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.projectomega.org/subcat.php?lg=en&amp;amp;php=products_firestarter here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Free OS X Cocoa CD writing application&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[X-CD-Roast]] &lt;br /&gt;
| N &lt;br /&gt;
| Free &lt;br /&gt;
| [http://www.xcdroast.org/xcdr098/xcdrosX.html here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | New OS X port of this Linux CD writing application&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Burn&lt;br /&gt;
| N &lt;br /&gt;
| Free&lt;br /&gt;
| [http://burn-osx.sourceforge.net/Pages/English/home.html/ here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Versatile CD/DVD authoring application&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ffcccc; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ffcccc;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:130px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:80px;&amp;quot; | Unicode&lt;br /&gt;
! style=&amp;quot;width:90px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! align=&amp;quot;center&amp;quot; style=&amp;quot;width:260px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | CDRDAO &lt;br /&gt;
| N &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://www.cdrdao.org/ here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Cdrdao records audio or data CD-Rs in disk-at-once (DAO) mode&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | DVD-Audio Tools &lt;br /&gt;
| Y &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://dvd-audio.sourceforge.net/ here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Open-source DVD-Audio authoring application&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Gnome Baker]] &lt;br /&gt;
| N&lt;br /&gt;
| GPL &lt;br /&gt;
| [http://www.gnomefiles.org/app.php?soft_id=291 here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Popular open-source Gnome interface CD/DVD writing application&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[K3b]]&lt;br /&gt;
| N&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://www.k3b.org/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Popular open-source KDE CD writing application for Linux platform  &lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[X-CD-Roast]] &lt;br /&gt;
| Y &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://www.xcdroast.org here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | New open-source Gnome interface CD/DVD writing application&lt;br /&gt;
|- style=&amp;quot;background-color:#eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Brasero]]&lt;br /&gt;
| N&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://projects.gnome.org/brasero/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Brasero is a application to burn CD/DVD for the Gnome Desktop.(Gnome Default) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Multimedia Players==&lt;br /&gt;
===Windows===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ccccff; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ccccff&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:120px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! align=&amp;quot;center&amp;quot; style=&amp;quot;width:220px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[foobar2000]]&lt;br /&gt;
| Free, BSD&lt;br /&gt;
| [http://www.foobar2000.org/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Advanced tagging, plugin capabilities, and kernel streaming support&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[MediaMonkey]]&lt;br /&gt;
| Free, Shareware&lt;br /&gt;
| [http://www.mediamonkey.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Supports many Winamp plugins&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | MusikCube&lt;br /&gt;
| BSD&lt;br /&gt;
| [http://www.musikcube.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Supports dynamic playlists and advanced SQL capabilities &lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | VUplayer&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.vuplayer.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Supports many popular digital audio codecs and MOD tracker formats  &lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Winamp]]&lt;br /&gt;
| Free, Shareware&lt;br /&gt;
| [http://www.winamp.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Popular audio player for Windows&lt;br /&gt;
| align=&amp;quot;left&amp;quot; |&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[wxMusik]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://musik.berlios.de/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; |A cross-platform open-source audio player&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[VLC]]&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.videolan.org/vlc// here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | VLC media player is a highly portable multimedia player and multimedia framework capable of reading most audio and video formats as well as DVDs, Audio CDs VCDs, and various streaming protocols. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Mac OS X===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #bbffbb; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#bbffbb;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:120px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:220px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Cog&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://cogosx.sourceforge.net/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | An open-source digital audio player for OS X.&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[wxMusik]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://musik.berlios.de/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; |A cross-platform open-source audio player&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Play&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://sbooth.org/Play/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; |Play is an application for playing and managing audio files.&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[VLC]]&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.videolan.org/vlc// here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | VLC media player is a highly portable multimedia player and multimedia framework capable of reading most audio and video formats as well as DVDs, Audio CDs VCDs, and various streaming protocols. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ffcccc; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ffcccc;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:120px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:220px;&amp;quot; | Description&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Amarok]] &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://amarok.kde.org/ here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Popular open-source KDE audio player similiar to Foobar2000&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[wxMusik]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://musik.berlios.de/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; |A cross-platform open-source audio player&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[XMMS]] &lt;br /&gt;
| GPL &lt;br /&gt;
| [http://www.xmms.org/ here] &lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Popular open-source audio player similiar to Winamp &lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[VLC]]&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.videolan.org/vlc// here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | VLC media player is a highly portable multimedia player and multimedia framework capable of reading most audio and video formats as well as DVDs, Audio CDs VCDs, and various streaming protocols. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===PocketPC===&lt;br /&gt;
&#039;&#039;These players may not play all your media files. Check their websites for the format support.&#039;&#039;&lt;br /&gt;
* GSPlayer: http://hp.vector.co.jp/authors/VA032810/&lt;br /&gt;
* MortPlayer: http://www.sto-helit.de/&lt;br /&gt;
* TCPMP: http://tcpmp.corecodec.org/about&lt;br /&gt;
&lt;br /&gt;
==Tagging Utilities==&lt;br /&gt;
===Windows===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ccccff; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ccccff&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:150px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:270px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Abander TagControl&lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://www.softartstudio.com/tagcontrol/ here]&lt;br /&gt;
| &lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | AudioShell&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.softpointer.com/AudioShell.htm here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Integrates with Windows Explorer&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Frontah&lt;br /&gt;
| Free&lt;br /&gt;
| [http://home.vxu.se/mdati00/frontah/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Transcode and tag editor for ID3v1.x, ID3v2.x, Lyrics3, Vorbis Comment, APEv1 &amp;amp; APEv2 tags. Supports ANSI, UTF8 and UTF16 text encoding depends on tag type.&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Magic MP3 Tagger&lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://www.magic-tagger.com here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Optimized for automatic music identification&lt;br /&gt;
|- &lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[MediaMonkey]]&lt;br /&gt;
| Free, Shareware&lt;br /&gt;
| [http://www.mediamonkey.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Also a Media Player &amp;amp; Library&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | MetatOGGer&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.luminescence-software.org/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Tags MP3 ([[ID3]]), Ogg files (Vorbis comment, including Ogg FLAC and Speex), Musepack, Windows Media, WavPack et Monkey&#039;s Audio&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | MP3 Book Helper&lt;br /&gt;
| Free&lt;br /&gt;
| [http://mp3bookhelper.sourceforge.net/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Tags [[ID3v1]], ID3v2.3, and Vorbis comments. Features: FreeDB, unicode, guessing and matching, and supporting PAR, SFV, SV, and NFO generation.&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[MP3tag]]&lt;br /&gt;
| Free&lt;br /&gt;
| [http://www.mp3tag.de/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Tags all files supporting [[ID3]], [[APEv2]], and [[Vorbis_Comment|Vorbis Comments]], not only MP3s&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [http://www.mp3-tag.com/ MP3 Tag Editor]&lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://www.mp3-tag.com/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Software to edit tags in audio files of [[MP3]], [[WMA]], [[OGG]], [[ASF]], and other music format.&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Mp3/Tag Studio&lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://www.magnusbrading.com/mp3ts/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Supports ID3v1 &amp;amp; v2 &#039;&#039;&#039;only&#039;&#039;&#039;. Powerful matching and fancy filters&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[Tag.exe]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://www.synthetic-soul.co.uk/tag/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Command-line universal tagger for Windows&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Tag &amp;amp;amp; Rename&lt;br /&gt;
| Shareware&lt;br /&gt;
| [http://www.softpointer.com/tr.htm here]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | TagScanner&lt;br /&gt;
| Free/Donate&lt;br /&gt;
| [http://xdev.narod.ru/tagscan_e.htm here]&lt;br /&gt;
|&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | The GodFather&lt;br /&gt;
| Card/Donate&lt;br /&gt;
| [http://users.otenet.gr/~jtcliper/tgf/ here]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [http://wmptagext.sourceforge.net/download.html WMPTSE]&lt;br /&gt;
| Free/Donate&lt;br /&gt;
| [http://wmptagext.sourceforge.net here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Software to integrate other tag format than [[ID3]] into Microsoft Windows Media Player.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Mac OS X===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #bbffbb; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#bbffbb;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:150px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:270px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | Tag&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://sbooth.org/Tag/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | An open-source tagging application for OS X&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ffcccc; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ffcccc;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:150px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:270px;&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | EasyTAG&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://easytag.sourceforge.net/ here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | Gnome tagging utility&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Encoders, Decoders, Etc.==&lt;br /&gt;
All basic tools needed to make use of the audio formats supported here.&lt;br /&gt;
&lt;br /&gt;
===[[MP3]]===&lt;br /&gt;
* [[LAME]] encoder/decoder: [http://www.rarewares.org/mp3.html download pre-compiled binaries here]. Also check the [[Lame Compiles|Latest recommended version]] page.&lt;br /&gt;
* [[MP3Gain]], a ReplayGain-like utility: [http://mp3gain.sourceforge.net/download.php download here]&lt;br /&gt;
&lt;br /&gt;
===Ogg [[Vorbis]]===&lt;br /&gt;
Currently, all recommended Ogg Vorbis utilities are available at the [http://www.rarewares.org/ogg.html Rarewares Ogg Vorbis page]. The following tools are important:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;OggEnc2&#039;&#039;&#039;: A command-line Ogg Vorbis encoder that can be used with most CD rippers.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;OggDec&#039;&#039;&#039;: Command-line decoder.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;[[OggDropXPd]]&#039;&#039;&#039;: An easy to use, drag&#039;n&#039;drop encoder/decoder with support for automatic tagging, renaming and  playlist creation on encoding.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;Encoding DLLs&#039;&#039;: For encoding within CDex or WinLame.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;VorbisGain&#039;&#039;&#039;: The [[ReplayGain]] utility for Ogg Vorbis.&lt;br /&gt;
&lt;br /&gt;
In addition, the [[Lancer]] suite — a highly SSE-optimized suite of utilities and libraries — are available at [http://homepage3.nifty.com/blacksword/ this page] &#039;&#039;(in Japanese)&#039;&#039;. See [[Lancer#Platform-specific Builds|this section]] for information about the different builds.&lt;br /&gt;
&lt;br /&gt;
===[[Musepack]] (MPC)===&lt;br /&gt;
* [http://www.musepack.net/index.php?pg=win Download MPC for Windows]&lt;br /&gt;
* [http://www.musepack.net/index.php?pg=lin Download MPC for Linux]&lt;br /&gt;
* [http://www.musepack.net/index.php?pg=osx Download MPC for Mac OS X]&lt;br /&gt;
* [http://www.musepack.net/index.php?pg=src Download MPC source code]&lt;br /&gt;
&lt;br /&gt;
* [http://forum.musepack.net/showthread.php?t=395 Forum announcement of SV8 release]&lt;br /&gt;
&lt;br /&gt;
===[[FLAC]]===&lt;br /&gt;
* CoolEdit / Adobe Audition Filter supporting FLAC: [http://www.vuplayer.com/other.php download here]&lt;br /&gt;
* Various FLAC-related utilities (incl. ReplayGain utility): [http://flac.sourceforge.net/download.html FLAC&#039;s SourceForge Download page]&lt;br /&gt;
&lt;br /&gt;
==Transcoders==&lt;br /&gt;
&#039;&#039;Note: Although these tools may convert from one encoding to another, please remember that [[transcoding]] to any [[lossy]] encoding &amp;lt;u&amp;gt;will&amp;lt;/u&amp;gt; result in a degraded quality.&#039;&#039;&lt;br /&gt;
* BeSweet: http://besweet.notrace.dk/&lt;br /&gt;
* [[BonkEnc]]&lt;br /&gt;
* dBpowerAMP Music Converter (dMC): http://www.dbpoweramp.com/dmc.htm&lt;br /&gt;
* [[foobar2000]] (needs 3rd-party encoders)&lt;br /&gt;
* MediaCoder: http://www.rarewares.org/mediacoder/&lt;br /&gt;
* Omni Encoder: http://omniencoder.autobotcity.net/&lt;br /&gt;
* [[Winamp]]&lt;br /&gt;
* WinLAME: http://winlame.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
==Processing utilities==&lt;br /&gt;
===Windows===&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;1&amp;quot; style=&amp;quot;text-align:center; border:2px solid #ccccff; margin-bottom: 20px;&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#ccccff;&amp;quot;&lt;br /&gt;
! style=&amp;quot;width:120px;&amp;quot; | Name&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | License&lt;br /&gt;
! style=&amp;quot;width:100px;&amp;quot; | Website&lt;br /&gt;
! style=&amp;quot;width:400px;&amp;quot; | Description&lt;br /&gt;
|- style=&amp;quot;background-color: #eeeeee;&amp;quot;&lt;br /&gt;
! align=&amp;quot;left&amp;quot; | [[lossyWAV]]&lt;br /&gt;
| GPL&lt;br /&gt;
| [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=56129&amp;amp;view=findpost&amp;amp;p=504087 here]&lt;br /&gt;
| align=&amp;quot;left&amp;quot; | lossyWAV is a lossy pre-processor for [[Wikipedia:Pulse-code modulation|PCM]] (uncompressed) WAV files. It reduces [[Wikipedia:Audio bit depth|bit depth]] of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate of the encoded file significantly.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Drivers==&lt;br /&gt;
===ASPI===&lt;br /&gt;
* Ahead Nero ASPI Driver: [ftp://ftp6.nero.com/wnaspi32.dll download]&lt;br /&gt;
* Adaptec Windows ASPI Package: [http://www.adaptec.com/worldwide/support/suppdetail.jsp?sess=no&amp;amp;prodkey=ASPI-4.70 official website]&lt;br /&gt;
* ForceASPI [http://radified.com/ASPI/forceaspi.htm radified.com]&lt;br /&gt;
* ASPI4all [http://www.cdr-zone.com/software/aspi_layers/aspi4all.html CDR-Zone.COM]&lt;br /&gt;
* FrogAspi [http://www.frogaspi.org/ official website]&lt;br /&gt;
* VOB ASAPI Driver 1.3: [http://www.rarewares.org/files/ASAPI.exe download]&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
* ALSA Project [http://www.alsa-project.org/ official website]&lt;br /&gt;
* kX Project [http://kxproject.lugosoft.com/ official website]&lt;br /&gt;
* ZonaISIS [http://www.hispasonic.com/zonaisis/index.htm unofficial]&lt;br /&gt;
* I have a dream ... [http://members.aol.com/cridi/ unofficial]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
* [http://www.reactos.org/wiki/index.php/Untested_%28open_source%29_software_list Open source softwares @ ReactOS wiki]&lt;br /&gt;
* [http://www.rarewares.org/ RareWares]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=WavPack&amp;diff=22876</id>
		<title>WavPack</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=WavPack&amp;diff=22876"/>
		<updated>2011-07-27T17:24:51Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;WavPack&#039;&#039;&#039; is a free, open source [[lossless]] audio compression format developed by David Bryant.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
WavPack (pronounced &amp;quot;wave-pack&amp;quot;) allows users to compress (and restore) all [[PCM]] audio formats including 8, 16, and 24-bit ints; 32-bit floats; [[mono]], [[stereo]], and [[multichannel]]; [[sampling rate]]s from 6 to 192 kHz. Like other lossless compression schemes the data reduction varies with the source, but it is generally between 25 % and 50 % for typical popular music and somewhat better than that for classical music and other sources with greater dynamic range.&lt;br /&gt;
&lt;br /&gt;
WavPack also incorporates a unique &amp;quot;hybrid&amp;quot; mode that provides all the advantages of lossless compression with an additional bonus. Instead of creating a single file, this mode creates both a relatively small, high-quality lossy file that can be used all by itself, and a &amp;quot;correction&amp;quot; file that (when combined with the lossy file) provides full lossless restoration. For some users this means never having to choose between lossless and lossy compression!&lt;br /&gt;
&lt;br /&gt;
== Feature Summary ==&lt;br /&gt;
* Fast and efficient encoding and decoding&lt;br /&gt;
* [[Open source]], released under a BSDish license&lt;br /&gt;
* Multiplatform&lt;br /&gt;
* Hardware support&lt;br /&gt;
* Error robustness&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Supports multichannel audio and high resolutions&lt;br /&gt;
* Hybrid/lossy mode&lt;br /&gt;
* Tagging support ([[ID3v1]], [[APE]])&lt;br /&gt;
* Supports [[RIFF]] chunks&lt;br /&gt;
* Supports embedded CUE sheets&lt;br /&gt;
* Includes MD5 hashes for quick integrity checking&lt;br /&gt;
* Ability to create self extracting files for Win32 platform&lt;br /&gt;
* [[ReplayGain]] compatible&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
David Bryant started development on WavPack in mid-1998, with the release of version 1.0. This first version compressed and decompressed audio losslessly, nothing else, but by then it already featured one of the best efficiency versus speed ratio among lossless encoders.&lt;br /&gt;
&lt;br /&gt;
Very soon after the release of version 1.0, Bryant released v. 2.0, which featured lossy encoding (using only quantization for data reduction – no psychoacoustic process was applied to the stream).&lt;br /&gt;
&lt;br /&gt;
In 1999, the developer released version 3.0, which featured novelties such as a fast mode (with reduced compression ratio), compression of RAW files and error detection using CRC checksums.&lt;br /&gt;
&lt;br /&gt;
WavPack development is still going on, and a major feature added in late 3.x versions is the hybrid mode, where the encoder generates a lossy file + a correction file, so that both can be decompressed back to the original PCM stream.&lt;br /&gt;
&lt;br /&gt;
WavPack 4 has been recently released. It included important changes, such as fast seeking, multichannel support, high resolution audio support, etc. turning it into one of the most full featured and modern lossless audio compressors.&lt;br /&gt;
&lt;br /&gt;
== Software support ==&lt;br /&gt;
=== Players ===&lt;br /&gt;
* NullSoft [[Winamp]] (plugin with ReplayGain &amp;amp; Media Library support) and Winamp-compatible players&lt;br /&gt;
* [[foobar2000]] Advanced Audio Player (official encoding/decoding addon, with ReplayGain &amp;amp; Cuesheets support)&lt;br /&gt;
* [http://www.vuplayer.com/vuplayer.htm VUPlayer] (official plugin, supports encoding)&lt;br /&gt;
* [[Windows Media Player]] and other directshow-based players (MPC, TCMP, RadLight) (with [http://corewavpack.corecodec.org/ CoreWavPack] directshow filter)&lt;br /&gt;
* [http://koti.welho.com/hylinen/apollo/ Apollo] Audio Player (plugin with ReplayGain support)&lt;br /&gt;
* [http://www.un4seen.com/xmplay.html XMplay] (official plugin)&lt;br /&gt;
* [http://cogosx.sourceforge.net/ Cog] Audio player for MacOS X.&lt;br /&gt;
* [[XMMS]] (with Kuniklo&#039;s plugin)&lt;br /&gt;
* [http://fondriest.frederic.free.fr/realisations/lamip/ LAMIP] (official plugin)&lt;br /&gt;
* [http://mpxplay.net/ MPXplay] for DOS!&lt;br /&gt;
* [http://aqualung.sourceforge.net/ Aqualung] for GNU/Linux&lt;br /&gt;
&lt;br /&gt;
=== Frontends ===&lt;br /&gt;
* Custom [http://members.home.nl/w.speek/wavpack.htm Windows Frontend] (by Speek)&lt;br /&gt;
* [http://www.unifront.boereck.de/ UniversalFront] by Böreck&lt;br /&gt;
* [http://home.vxu.se/mdati00/frontah/ Frontah] by Madah&lt;br /&gt;
* [http://www.webearce.com.ar/ MAREO] by Kwanbis&lt;br /&gt;
&lt;br /&gt;
=== Converters ===&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; &#039;&#039;Several players, like foobar2000 and VUplayer, can also convert from other formats to WavPack)&#039;&#039;&lt;br /&gt;
* [http://www.dbpoweramp.com/ dBpowerAMP] Music Converter / Audio Player / CD Writer (official addon)&lt;br /&gt;
* [http://www.board-24.de/ GX:Transcoder] Music converter&lt;br /&gt;
&lt;br /&gt;
=== Editors ===&lt;br /&gt;
* [[Adobe Audition]] and Cool Edit (filter with 32-bit floats &amp;amp; extra info save support)&lt;br /&gt;
&lt;br /&gt;
=== CD writers/rippers ===&lt;br /&gt;
* [http://www.ahead.de Ahead Nero Burning Rom]&lt;br /&gt;
* [http://www.burrrn.net Burrrn] Audio CD burner&lt;br /&gt;
* [[Exact Audio Copy]] CD Ripper&lt;br /&gt;
* [http://cdexos.sourceforge.net CDex] CD ripper&lt;br /&gt;
&lt;br /&gt;
=== Taggers ===&lt;br /&gt;
* [http://www.mp3tag.de/en/index.html Mp3tag] Universal Tag Editor&lt;br /&gt;
* [http://users.otenet.gr/~jtcliper/tgf/ The GodFather] Tagger / Music manager&lt;br /&gt;
* [[Tag.exe|Case&#039;s Tag]] command line tagger&lt;br /&gt;
&lt;br /&gt;
=== Other tools ===&lt;br /&gt;
* [http://www.burrrn.net/mrq/ Mr. QuestionMan]&lt;br /&gt;
* [http://www.bitattack.ro/ai/ Audio Identifier]&lt;br /&gt;
* [http://www.bunkus.org/videotools/mkvtoolnix/ mkvtoolnix] – tool to multiplex WavPack streams inside the Matroska container&lt;br /&gt;
&#039;&#039;It&#039;s worth mentioning the [[Matroska]] guys decided to concentrate on WavPack as the lossless compressor of choice for their container. Quite an honor... :-)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Hardware Support ==&lt;br /&gt;
* iRiver iHP-120/iHP-140 with the open source [http://www.rockbox.org Rockbox firmware]&lt;br /&gt;
* [http://www.rokulabs.com/products/photobridge/features.php Roku PhotoBridge HD] (with [http://www.wavpack.com/downloads.html plugin])&lt;br /&gt;
&lt;br /&gt;
== Technology description ==&lt;br /&gt;
To ensure high-speed operation, WavPack uses a very simple predictor that is implemented entirely in integer math. In its &amp;quot;fast&amp;quot; mode the prediction is simply the arithmetic extrapolation of the previous two samples. For example, if the previous two samples were -10 and 20, then the prediction would be 50. For the default mode a simple adaptive factor is added to weigh the influence of the earlier sample on the prediction. In our example the resulting prediction could then vary between 20 for no influence to 50 for full influence. This weight factor is constantly updated based on the audio data&#039;s changing spectral characteristics, which is why it is called &amp;quot;adaptive&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The prediction generated is then subtracted from the actual sample to be encoded to generate the error value. In mono mode this value is sent directly to the coder. However, stereo signals tend to have some correlation between the two channels that can be further exploited. Therefore, two error values are calculated that represent the difference and average of the left and right error values. In the &amp;quot;fast&amp;quot; mode of operation these two new values are simply sent to the coder instead of the left and right values. In the default mode, the difference value is always sent to the coder along with one of the other three values (average, left, or right). An adaptive algorithm continuously determines the most efficient of the three to send based on the changing balance of the channels.&lt;br /&gt;
&lt;br /&gt;
The developer has developed a unique data encoder for WavPack that he believes is better than Rice coding in two different areas. It is impossible to encode more efficiently than Rice coding because it represents the optimal bit coding (sometimes known as the Huffman code) for this type of data. WavPack&#039;s encoder is slightly less efficient than this, but only by about 0.15 bits/sample (or less than 1% for 16-bit data). The first advantage of WavPack&#039;s coder is that it does not require the data to be buffered ahead of encoding, instead it converts each sample directly to bitcodes. This is more computationally efficient and it is better in some applications where coding delay is critical. The second advantage is that it is easily adaptable to lossy encoding because all significant bits (except the implied &amp;quot;one&amp;quot; MSB) are transmitted directly. In this way it is possible to only transmit, for example, the 3 most significant bits (with sign) of each sample. In fact, it is possible to transmit only the sign and implied MSB for each sample with an average of only 3.65 bits/sample.&lt;br /&gt;
&lt;br /&gt;
This coding scheme is used to implement the &amp;quot;lossy&amp;quot; mode of WavPack. In the &amp;quot;fast&amp;quot; mode the output of the non-adaptive decorrelator is simply rounded to the nearest codable value for the specified number of bits. In the default mode the adaptive decorrelator is used (which reduces the average noise about 1 dB) and also both the current and the next sample are considered in choosing the better of the two available codes (which reduces noise another 1 dB).&lt;br /&gt;
&lt;br /&gt;
The developer has decided to not use any floating-point arithmetic in WavPack&#039;s data path because he believes that integer operations are less susceptible to subtle chip to chip variations that could corrupt the lossless nature of the compression, the Pentium floating point bug being a blatant example of this. It is possible that a lossless compressor that used floating-point math could generate different output when running on that faulty Pentium. Even disregarding actual bugs, floating-point math is complicated enough that there could be subtle differences between &amp;quot;correct&amp;quot; implementations that could cause trouble for this type of application. To further ensure confidence in the integrity of WavPack&#039;s compression, the encoder includes a 32-bit error detection code to the generated streams.&lt;br /&gt;
&lt;br /&gt;
WavPack source code is very portable. It has been compiled on several Unices (Linux, Mac OS X, Solaris, FreeBSD, OpenBSD, NetBSD, Compaq Tru64, HP-UX...) as well as Windows, DOS and OpenVMS. It works on architectures such as x86, ARM, PowerPC, SPARC, DEC Alpha, PA-RISC, MIPS, Motorola 68k...&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://www.wavpack.com/ Official website]&lt;br /&gt;
* [http://www.rarewares.org/lossless.html Unofficial multiplatform versions] at RareWares&lt;br /&gt;
* [http://www.rjamorim.com/rrw/wavpack.html Historical versions] at ReallyRareWares&lt;br /&gt;
* [[Lossless_comparison|Lossless Codec Comparison]] by Rjamorim&lt;br /&gt;
* [[EAC_and_WavPack | Configuring EAC and Wavpack]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Codecs]]&lt;br /&gt;
[[Category:Lossless]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=IRiver_H-Series&amp;diff=22875</id>
		<title>IRiver H-Series</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=IRiver_H-Series&amp;diff=22875"/>
		<updated>2011-07-27T17:24:22Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;H-series&#039;&#039;&#039; is a series of portable harddisk based audio player created by Korean company iRiver.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
== Common features ==&lt;br /&gt;
These features are common for all players in the H-series:&lt;br /&gt;
* Supports playback of [[MP3]], [[WMA]], [[ASF]], and [[WAV]]&lt;br /&gt;
* USB 2.0&lt;br /&gt;
* FM Radio&lt;br /&gt;
* Microphone/dictaphone&lt;br /&gt;
* Real-time encoding to MP3&lt;br /&gt;
* H100 and H300 series support [[Ogg Vorbis]]&lt;br /&gt;
&lt;br /&gt;
== H100-series ==&lt;br /&gt;
The H100-series consist of the H110, H120 and H140, with capacities of 10GB, 20GB and 40GB respectively.&lt;br /&gt;
&lt;br /&gt;
* Digital optical-in/out&lt;br /&gt;
* Microphone/line-in recording in .wav or [[MP3]] format&lt;br /&gt;
&lt;br /&gt;
With the open source [http://www.rockbox.org Rockbox firmware], the H100 series also has the following features:&lt;br /&gt;
* User can switch back to the original firmware at boot time&lt;br /&gt;
* [[FLAC]] and [[WavPack]] support&lt;br /&gt;
* True gapless playback&lt;br /&gt;
* [[ReplayGain]] support on some formats&lt;br /&gt;
* Crossfade&lt;br /&gt;
* On-the-fly playlist&lt;br /&gt;
* Speech menus and directories (Talkbox) for visually impaired users&lt;br /&gt;
* No [[WMA]] support, user must switch back to original firmware to decode WMA.&lt;br /&gt;
&lt;br /&gt;
== H300-series ==&lt;br /&gt;
The H300 series includes the H320 and the H340, which are 20 GB and 40 GB, respectively.  The H300 series is available in a North American version and an international version, with some slight differences noted below. The H300 line has been &#039;&#039;&#039;discontinued&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
* 2&amp;quot; Color TFT screen&lt;br /&gt;
* FM Recording&lt;br /&gt;
* USB On The Go (international models only)&lt;br /&gt;
* DRM capability (North American models only)&lt;br /&gt;
* Video playback supported at 10 FPS (international models only.  North American models can be modified to support video playback by upgrading to international firmware 1.25 or higher; however, installation of international firmware will permanently disable DRM support)&lt;br /&gt;
&lt;br /&gt;
== H10 Series ==&lt;br /&gt;
* Available in 5 GB, 6 GB and 20 GB models&lt;br /&gt;
* Play for sure compatible&lt;br /&gt;
* Color screen&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://www.iriver.com iRiver: Homepage]&lt;br /&gt;
* [http://www.iriver.us/ Mistic River - Site for iriver enthusiasts]&lt;br /&gt;
* [http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iriver_H110_H115_H120_H140 IRiver H1xx Rockbox Port]&lt;br /&gt;
&lt;br /&gt;
[[Category:Digital Audio Players]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Vorbis&amp;diff=22874</id>
		<title>Vorbis</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Vorbis&amp;diff=22874"/>
		<updated>2011-07-27T17:24:02Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{featured}}&lt;br /&gt;
{{Codec Infobox&lt;br /&gt;
| name = Ogg Vorbis&lt;br /&gt;
| logo = [[Image:Fish logo.png]]&lt;br /&gt;
| type = lossy&lt;br /&gt;
| purpose = General audio compression at bitrates ~64–400 kbps&lt;br /&gt;
| maintainer = Christopher Montgomery, Xiph Community&lt;br /&gt;
| recommended_encoder = aoTuV&lt;br /&gt;
| recommended_text = aoTuV Beta 5&lt;br /&gt;
| website = http://www.vorbis.com/&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&#039;&#039;&#039;Vorbis&#039;&#039;&#039; (commonly used inside the [[Ogg]] container) is a fully open, non-proprietary, patent-free (subject to [http://www.hydrogenaudio.org/forums/index.php?showtopic=13531 speculation]), and royalty-free, general-purpose compressed audio format for mid to high quality (8 khz–48.0 kHz, 16+ bit, [[multichannel]]) audio and music at fixed and variable bitrates from 16 to &amp;gt;256 kbps/channel. This places vorbis in the same competitive class as audio representations such as MPEG-4 ([[AAC]]), and similar to, but higher performance than [[MP3]], TwinVQ ([[VQF]]), [[WMA]] and [[PAC]]. Vorbis is the first of a planned family of Ogg multimedia coding formats being developed as part of Xiph.org&#039;s ogg multimedia project.&lt;br /&gt;
&lt;br /&gt;
Informal listening test suggests Vorbis to be comparable to MPEG-4 [[AAC]] at most bitrates and [[Musepack]] at 128 kbps. Transparency is generally reached at about 150–170 kbps (-q 5) (with some exceptions). The encoder is reasonably young and unoptimized, so further improvements can always be expected.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, Xiph.org has failed to improve Vorbis at a steady rate since its initial 1.0 release in July 2002 (due to other developement projects and time constraints). Since then development has been led by other coders such as [http://sjeng.org/vorbisgt3.html Garf] and [http://www.geocities.jp/aoyoume/aotuv/ Aoyumi]. Aoyumi&#039;s &#039;&#039;&#039;[[aoTuV]]&#039;&#039;&#039; series of encoders was incorporated into the September 2004 release of 1.1, which brought about the first quality improvements across the board for 2 years. Aoyumi&#039;s Beta 4.51 was found to be very good, so it was re-branded into aoTuV Release 1 and it was the recommended encoder until June 2007. The latest tuning is aoTuV beta 5, which improves further on the low-bitrate quality without sacrificing compression, and &amp;lt;span style=&amp;quot;color:blue;&amp;quot;&amp;gt;it is currently the recommended Vorbis encoder at Hydrogenaudio.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the time being, Aoyumi&#039;s tuning (since aoTuV Release 1 up to aoTuV Beta 5) has not been incorporated yet into the &#039;official&#039; Vorbis line.&lt;br /&gt;
&lt;br /&gt;
Vorbis has had success with many recent video game titles employing Vorbis as opposed to MP3 (with Epic Games&#039; Unreal Tournament 2003 and Unreal Tournament 2004, the PC port of Microsoft&#039;s Halo and Uru being notable examples). (Ogg) Vorbis is also an official part of the [http://www.openal.org/extensions.html OpenAL] API extension library, used in many popular [http://www.openal.org/titles.html computer games]. On April 10, 2006, [http://www.radgametools.com/ RAD Game Tools] integrated (Ogg) Vorbis support to their Miles Sound System (MSS), which has been used in over 3,200 games worldwide. This ensures that future games utilizing MSS will have the capability to play (Ogg) Vorbis files. Check out [http://wiki.xiph.org/index.php/Games_that_use_Vorbis xiph wiki] for a full list of games confirmed to use (Ogg) Vorbis.&lt;br /&gt;
&lt;br /&gt;
Vorbis was recently adopted in May of 2010 as the open source codec for Google&#039;s new [http://www.webmproject.org/ WebM] project. WebM is combination of the BSD licensed VP8 video codec, Vorbis, and the [[webm]] container a subset of the [[Matroska]] container. It is expected to obtain widespread adoption with a major backing by many hardware based chip manufactures and with the release of Google&#039;s new mobile Android platform and Google TV by the year 2011. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before encoding files using (Ogg) Vorbis, check out the [[Recommended Ogg Vorbis|Recommended (Ogg) Vorbis]] article to determine what encoder to use and what settings are recommended by Hydrogenaudio.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Pros ==&lt;br /&gt;
* (Ogg) Vorbis specification is in the public domain; it is free for commercial or noncommercial use, under both (LGPL and BSD licenes)&lt;br /&gt;
* Easy to use high-level API (Application Programming Interface)&lt;br /&gt;
* Good all-round performance (&amp;gt;48 kbps – a leading codec at [http://www.rjamorim.com/test/multiformat128/results.html 128 kbps])&lt;br /&gt;
* Well written [http://www.xiph.org/ogg/vorbis/docs.html specs]&lt;br /&gt;
* Supported by most portable (Ogg) [[Vorbis#Supporting Digital Audio Players|DAPs]]&lt;br /&gt;
* Suitable for internet-streaming (via [http://www.icecast.org/ Icecast] and other methods)&lt;br /&gt;
* Fully [[gapless]] playback&lt;br /&gt;
* High potential for further tuning&lt;br /&gt;
* Structured to allow the design for a hybrid filterbank&lt;br /&gt;
&lt;br /&gt;
== Cons ==&lt;br /&gt;
* Limited official development (third-party developement is always encouraged)&lt;br /&gt;
* Some implementations are more computationally intensive to decode than MP3 (depending upon the architecture and [[Tremor]] optimizations).&lt;br /&gt;
&lt;br /&gt;
= Technical Information =&lt;br /&gt;
* Multiple block sizes for window switching including overlap (powers of two only) &#039;&#039;(128/1024, 256/2048, 512/4096)&#039;&#039;&lt;br /&gt;
* Customly designed [[window function]] is applied similiar to the sine window. it has (good sidelobe rejection)&lt;br /&gt;
:&amp;lt;math&amp;gt;w_k = \sin{(\frac{\pi}{2} \cdot sin^2[(\pi\div2n \cdot (k+0.5))]}&amp;lt;/math&amp;gt;&lt;br /&gt;
* Psychoacoustics masking is exploited via an ([[ATH]] model)&lt;br /&gt;
* Masking curves are computed from an &#039;&#039;emperically&#039;&#039; adjusted set of [http://www.zainea.com/masking2.htm Ehmer Curves]&lt;br /&gt;
* Modified Discrete Cosine Transform ([[MDCT]]) is used for noise analysis&lt;br /&gt;
* Fast Fourier Transform ([[FFT]]) is used for tonal analysis&lt;br /&gt;
* Global masking curve is a mixture between calculated FFT+MDCT curves and ATH curves overlayed&lt;br /&gt;
* Floor 1 or the noise-floor (envelope) is calculated using the global masking curve &amp;amp; piecewise linear approximation divided by spectrum to generate the residue (fine detail). The Levinson-Durbin [http://www.data-compression.com/speech.html#ana LPC model] in Floor 0 is no longer used, however the code still exists&lt;br /&gt;
* [[Noise normalization]] is applied to compensate for energy lost in certain frequency bands due to quantization (rounding).&lt;br /&gt;
* The channels are [[channel coupling|coupled]] &#039;&#039;strictly&#039;&#039; by residue using ([http://us.xiph.org/ogg/vorbis/doc/stereo.html point/phase stereo] and lossless)&lt;br /&gt;
* Multistage [[Vector quantization]] is used for coding the noise-floor and residue backend using &#039;&#039;trained&#039;&#039; codebooks.&lt;br /&gt;
* [[Huffman coding]] is used to minimize vector codeword redundancy&lt;br /&gt;
&lt;br /&gt;
= Software =&lt;br /&gt;
=== Encoders ===&lt;br /&gt;
* [[Oggenc]] official command-line encoder (Win32/Posix)&lt;br /&gt;
* [[OggDropXPd|OggdropXPd]] advanced drag-and-drop encoder by John33 (Win32)&lt;br /&gt;
* [[Lancer]] SSE-optimized vorbis encoder utility and libraries by BlackSword (Win32/Posix)&lt;br /&gt;
* [http://www.saunalahti.fi/cse/foobar2000/ foo_vorbisenc] vorbis encoder library for foobar2000 (Win32)&lt;br /&gt;
&lt;br /&gt;
=== Decoders ===&lt;br /&gt;
* [http://www.rarewares.org/ogg.html OggDec] for Windows, by John33, a very featureful command line decoder (Win32)&lt;br /&gt;
* [[Ogg123]] for Unix systems (GPL), a very simple to use command-line player. (Win32/Posix)&lt;br /&gt;
* [http://www.illiminable.com/ogg/ illiminable Ogg Directshow Filters] also plays Speex, Theora and FLAC (Win32)&lt;br /&gt;
* [http://www.xiph.org/quicktime/ XiphQT] (Xiph&#039;s QuickTime Components) allows playback in [[QuickTime]]/[[iTunes]] (Win32/MacPPC/MacIntel)&lt;br /&gt;
* [http://corevorbis.corecodec.org/ CoreVorbis] DirectShow filter (Win32)&lt;br /&gt;
&lt;br /&gt;
=== ReplayGain ===&lt;br /&gt;
* [http://www.rarewares.org/ogg.html VorbisGain] to apply [[ReplayGain]] on Vorbis files (Win32)&lt;br /&gt;
** Instructions to integrate VorbisGain into foobar2000, Winamp, and Windows Explorer can be found in [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=41880&amp;amp;view=findpost&amp;amp;p=396612 this HA thread]&amp;lt;br /&amp;gt;&#039;&#039;A precompiled script of the procedure (in RAR format) can be found in [http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=45196&amp;amp;view=findpost&amp;amp;p=397803 this HA posting]&#039;&#039;&lt;br /&gt;
** RPM packages for VorbisGain are available [http://rpm.pbone.net/index.php3?stat=3&amp;amp;search=vorbisgain&amp;amp;srodzaj=3 here], and source code for VorbisGain is available [http://sjeng.org/vorbisgain.html here]&lt;br /&gt;
* [http://www.rarewares.org/quantumknot/vorbisgain.gz VorbisGain Static GCC 4 compile] (Posix)&lt;br /&gt;
* [[foobar2000]]&#039;s &#039;&#039;ReplayGain scanner&#039;&#039; supports (Ogg) Vorbis files&lt;br /&gt;
* [[Winamp]]&#039;s &#039;&#039;ReplayGain Analyzer&#039;&#039; supports (Ogg) Vorbis files&lt;br /&gt;
* [[MediaMonkey]]&#039;s &#039;&#039;Volume Levelling&#039;&#039; supports (Ogg) Vorbis files&lt;br /&gt;
&lt;br /&gt;
=== Splitters ===&lt;br /&gt;
The following utilities are used to splice Vorbis streams without decoding/re-encoding.&lt;br /&gt;
&lt;br /&gt;
* [http://www.free-codecs.com/download/Ogg_Cutter.htm Ogg Cutter] (Win32)&lt;br /&gt;
* [http://mp3splt.sourceforge.net/ mp3splt] (Win32)&lt;br /&gt;
* [http://www.xiph.org/downloads/ vcut] (CLI tool part of the official vorbis-tools package) (Win32/Posix)&lt;br /&gt;
* [http://sourceforge.net/projects/ogg-cut/ (Ogg) Vorbis Stream Cutter (ogg-cut)] (Posix)&lt;br /&gt;
&lt;br /&gt;
=== Taggers ===&lt;br /&gt;
Most tagger supporting (Ogg) Vorbis are listed in [[download page#Tagging Utilities|the download page]].&lt;br /&gt;
* [http://www.rarewares.org/files/ogg/vorbiscomment-1.1.1.zip Vorbis Comment]&lt;br /&gt;
&lt;br /&gt;
= Supported Digital Audio Players =&lt;br /&gt;
The following list contains some players that support Vorbis playback.&lt;br /&gt;
* [[Apple iPod]] with [[Rockbox]] firmware – check out this [http://www.hydrogenaudio.org/forums/index.php?s=32eeac65958144db631c8a739b41983c&amp;amp;showtopic=40992 HA thread]&lt;br /&gt;
* [http://www.ifreemax.com/ FreeMax] FW-960&lt;br /&gt;
* [http://www.iaudiophile.net/ iAudio] [[IAudio M3|M3]], M5, U2, G3, X5, I5, 7, D2, F2, T2, A3, Q5W, A2; VorbisGain support only on X5/M5 with [[Rockbox]] firmware&lt;br /&gt;
* [[iRiver H-Series]] with [[Rockbox]] firmware&lt;br /&gt;
* [[MPIO H-Series]]&lt;br /&gt;
* [[Neuros]] with [[Rockbox]] firmware&lt;br /&gt;
* [[Rio Karma]]&lt;br /&gt;
* [http://www.samsung.com/Products Samsung]&lt;br /&gt;
* [http://www.slimdevices.com/ Slim Devices: Squeezebox] External player&lt;br /&gt;
* [http://www.yepp.co.kr/ Yepp] YP-T6, YP-T7, YP-C1, YP-F1, YP-53 (Firmware 1.200), other..&lt;br /&gt;
&lt;br /&gt;
A longer list can be found at [http://wiki.xiph.org/index.php/PortablePlayers xiph&#039;s wiki].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note:&#039;&#039;&#039; There may be players out there that support (Ogg) Vorbis, although they are not marketed as such.&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
The following links contain information surrounding the (Ogg) Vorbis codec that can be found on Hydrogenaudio and elsewhere throughout the web.&lt;br /&gt;
&lt;br /&gt;
=== Hydrogenaudio Wiki ===&lt;br /&gt;
* [[Ogg]] (Container)&lt;br /&gt;
* [[Listening Tests#Multiformat Tests|Listening tests comparing Vorbis against MP3, AAC, WMA, etc.]]&lt;br /&gt;
* [[Recommended Ogg Vorbis|Recommended settings for encoding with Vorbis]] and its related [http://www.hydrogenaudio.org/forums/index.php?showtopic=15049 HA thread]&lt;br /&gt;
* [[EAC and Ogg Vorbis|Configuring EAC and Vorbis as an external command-line encoder]]&lt;br /&gt;
&lt;br /&gt;
=== Websites ===&lt;br /&gt;
* [http://www.vorbis.com Vorbis official website] (updated continually)&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Vorbis Vorbis at Wikipedia]&lt;br /&gt;
* [http://www.playogg.org/ PlayOgg initiative] by the [http://www.fsf.org/ Free Software Foundation]&lt;br /&gt;
* [http://www.audiocoding.com/modules/wiki/?page=Ogg+Vorbis (Ogg) Vorbis at AudioCoding]&lt;br /&gt;
* [http://www.rarewares.org/ogg.html (Ogg) Vorbis binaries at Rarewares]&lt;br /&gt;
* [http://www.geocities.jp/aoyoume/aotuv/ Aoyumi&#039;s homepage of tuned versions of Vorbis encoder and current beta binaries]&lt;br /&gt;
* [http://homepage3.nifty.com/blacksword/index_e.htm The (Ogg) Vorbis Acceleration Project] – Archer/[[Lancer]] homepage for optimized versions of aoTuV Vorbis encoder and other SSE optmizations&lt;br /&gt;
* [http://www.xiph.org/ Xiph.org Foundation]&lt;br /&gt;
&lt;br /&gt;
=== Scientific/R&amp;amp;D ===&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=20132&amp;amp;st=0 Noise Normalization and HF Boost problem solution that ultimatly lead to the aoTuV tunings (HA Thread)]&lt;br /&gt;
* [http://www.free-comp-shop.com/vorbis.pdf Keith Wright rendition of understanding the MDCT in Vorbis by defining it&#039;s basic trig properties (PDF)]&lt;br /&gt;
* [http://www.mp3-tech.org/programmer/docs/embedded_vorbis_thesis.pdf (Ogg) Vorbis decoder for an embedded system (Master Thesis in PDF)]&lt;br /&gt;
* [http://wiki.xiph.org/index.php/Bounties Xiph.org Vorbis bounties]&lt;br /&gt;
&lt;br /&gt;
[[Category:Lossy]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Free_Lossless_Audio_Codec&amp;diff=22873</id>
		<title>Free Lossless Audio Codec</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Free_Lossless_Audio_Codec&amp;diff=22873"/>
		<updated>2011-07-27T17:23:32Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Codec Infobox&lt;br /&gt;
| name = FLAC&lt;br /&gt;
| logo = [[Image:FLAC logo.gif]]&lt;br /&gt;
| type = lossless&lt;br /&gt;
| purpose = Popular open source patent free lossless compression scheme.&lt;br /&gt;
| maintainer = Josh Coalson, Xiph Community &lt;br /&gt;
| recommended_encoder = FLAC encoder&lt;br /&gt;
| recommended_text = FLAC v1.2.1&lt;br /&gt;
| website = http://flac.sourceforge.net/&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039;Free Lossless Audio Codec&#039;&#039;&#039; (&#039;&#039;&#039;FLAC&#039;&#039;&#039;) is a codec for lossless audiocompression.&lt;br /&gt;
Grossly oversimplified, FLAC is similar to [[MP3]], but [[lossless]], meaning that audio is compressed in FLAC without any loss in quality. This is similar to how Zip works, except with FLAC you will get much better compression because it is designed specifically for audio, and you can play back compressed FLAC files in your favorite player (or your car or home stereo, if supported) just like you would an MP3 file.&lt;br /&gt;
&lt;br /&gt;
== General aspects of the format ==&lt;br /&gt;
FLAC is freely available and supported on most operating systems, including Windows, UNIX (Linux, *BSD, Solaris, OS X, IRIX), BeOS, OS/2, and Amiga. There are build systems for autotools, MSVC, Watcom C, and Project Builder.&lt;br /&gt;
&lt;br /&gt;
The FLAC project consists of:&lt;br /&gt;
* the stream format&lt;br /&gt;
* reference encoders and decoders in library form&lt;br /&gt;
* flac, a command-line program to encode and decode FLAC files&lt;br /&gt;
* metaflac, a command-line metadata editor for FLAC files&lt;br /&gt;
* input plugins for various music players&lt;br /&gt;
&lt;br /&gt;
When it&#039;s said that FLAC is &#039;&#039;free&#039;&#039;, it means more than just that it is available at no cost. It means that the specification of the format is fully open to the public to be used for any purpose, although the FLAC project reserves the right to set the FLAC specification and certify compliance. It also means that neither the FLAC format nor any of the implemented encoding/decoding methods are covered by any known patent. And it means that all the source code is available under open-source licenses. It is the first truly open and free lossless audio format.&lt;br /&gt;
&lt;br /&gt;
Some claim FLAC is the most widely used lossless compression format on UNIX systems, though it seems more likely that shn retains that honor on all OS platforms. FLAC files also can be placed inside an Ogg container using libOggFLAC and libOggFLAC++.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* &#039;&#039;&#039;Lossless:&#039;&#039;&#039; The encoding of audio (PCM) data incurs no loss of information, and the decoded audio is bit-for-bit identical to what went into the encoder. Each frame contains a 16-bit CRC of the frame data for detecting transmission errors. The integrity of the audio data is further insured by storing an MD5 signature of the original unencoded audio data in the file header, which can be compared against later during decoding or testing.&lt;br /&gt;
* &#039;&#039;&#039;Fast:&#039;&#039;&#039; FLAC is asymmetric in favor of decode speed. Decoding requires only integer arithmetic, and is much less compute-intensive than for most perceptual codecs. Real-time decode performance is easily achievable on even modest hardware.&lt;br /&gt;
* &#039;&#039;&#039;Hardware support:&#039;&#039;&#039; Because of FLAC&#039;s free reference implementation and low decoding complexity, FLAC is currently the only lossless codec that has any kind of hardware support.&lt;br /&gt;
* &#039;&#039;&#039;Streamable:&#039;&#039;&#039; Each FLAC frame contains enough data to decode that frame. FLAC does not even rely on previous or following frames. FLAC uses sync codes and CRCs (similar to MPEG and other formats), which, along with framing, allow decoders to pick up in the middle of a stream with a minimum of delay.&lt;br /&gt;
* &#039;&#039;&#039;Seekable:&#039;&#039;&#039; FLAC supports fast sample-accurate seeking. Not only is this useful for playback, it makes FLAC files suitable for use in editing applications.&lt;br /&gt;
* &#039;&#039;&#039;Flexible metadata:&#039;&#039;&#039; New metadata blocks can be defined and implemented in future versions of FLAC without breaking older streams or decoders. Currently there are metadata types for tags, cue sheets, and seek tables. Applications can write their own APPLICATION metadata once they register an ID.&lt;br /&gt;
* &#039;&#039;&#039;Suitable for archiving:&#039;&#039;&#039; FLAC is an open format, and there is no generation loss if you need to convert your data to another format in the future. In addition to the frame CRCs and MD5 signature, flac has a verify option that decodes the encoded stream in parallel with the encoding process and compares the result to the original, aborting with an error if there is a mismatch.&lt;br /&gt;
* &#039;&#039;&#039;Convenient CD archiving:&#039;&#039;&#039; FLAC has a &#039;&#039;cue sheet&#039;&#039; metadata block for storing a CD table of contents and all track and index points. For instance, you can rip a CD to a single file, then import the CD&#039;s extracted cue sheet while encoding to yield a single file representation of the entire CD. If your original CD is damaged, the cue sheet can be exported later in order to burn an exact copy.&lt;br /&gt;
* &#039;&#039;&#039;Error resistant:&#039;&#039;&#039; Because of FLAC&#039;s framing, stream errors limit the damage to the frame in which the error occurred, typically a small fraction of a second worth of data. Contrast this with some other lossless codecs, in which a single error destroys the remainder of the stream.&lt;br /&gt;
&lt;br /&gt;
== Pros ==&lt;br /&gt;
* Portable to many systems&lt;br /&gt;
* Source open and freely licenced&lt;br /&gt;
* Hardware support (PhatBox, Kenwood MusicKeg, Rio Karma, etc.  See below)&lt;br /&gt;
* Streaming support&lt;br /&gt;
* Extremely fast decoding&lt;br /&gt;
* Supports multichannel and high resolution streams&lt;br /&gt;
* Supports [[ReplayGain]]&lt;br /&gt;
* Supports cue-sheet (with some limitations)&lt;br /&gt;
* Gaining wide use as successor to [[Shorten]]&lt;br /&gt;
&lt;br /&gt;
== Cons ==&lt;br /&gt;
* Compresses less efficiently than other popular modern compressors ([[Monkey&#039;s Audio]], [[OptimFROG]])&lt;br /&gt;
* Higher compression modes slow, for little gain over the default setting.&lt;br /&gt;
&lt;br /&gt;
== Hardware and software that support FLAC ==&lt;br /&gt;
For a more comprehensive list see the [http://flac.sourceforge.net/links.html FLAC links page].&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
==== Home stereo ====&lt;br /&gt;
* [http://www.request.com/us/ AudioReQuest] music servers&lt;br /&gt;
* [http://www.avegasystems.com/ Avega Systems]&#039; wireless [http://www.avegasystems.com/_documents/Oyster_Specifications.pdf Oyster] loudspeakers&lt;br /&gt;
* Digital Techniques&#039; &amp;quot;iStereo&amp;quot; [http://www.digitaltechniques.com/M300A_Overview.html M300A Digital Music Player]&lt;br /&gt;
* Escient&#039;s [http://www.escient.com/ FireBall servers (E2-40/160/300, DVDM-300)]&lt;br /&gt;
* [http://www.hermstedt.com/english/hifidelio/hifidelio.html Hifidelio]&lt;br /&gt;
* [http://www.imuse.us/ iMuse] audio/video media servers&lt;br /&gt;
* Meda Systems&#039; [http://www.medainc.com/ Bravo servers]&lt;br /&gt;
* The [http://www.cesweb.org/attendees/show_floor/product_locator/product_details.asp?prodid=5181 MS300 Music Server] by McIntosh Laboratory&lt;br /&gt;
* Olive&#039;s [http://www.olive.us/ Symphony] wireless digital music center&lt;br /&gt;
* [http://www.phatnoise.com/products/homeplayer/index.php PhatNoise Home Digital Media Player]&lt;br /&gt;
* [http://www.numark.com/ Numark]&#039;s DJ equipment (HDX and CDX turntables, HDMIX mixer)&lt;br /&gt;
* [http://www.mock.com/receiver/ Rio Reciever] and Dell Digital Audio Receiver&lt;br /&gt;
* [http://www.rokulabs.com/products/photobridge/features.php Roku PhotoBridge HD] (with [http://homepage.ntlworld.ie/p.mc.quillan/FLAC_V0.7.zip plugin])&lt;br /&gt;
* [http://www.skipjam.com/ SkipJam]&#039;s networked audio/video devices&lt;br /&gt;
* [http://www.sonos.com/ Sonos Digital Music System]&lt;br /&gt;
* Slim Devices&#039; [http://www.slimdevices.com/pi_transporter.html Transporter] and [http://www.slimdevices.com/pi_squeezebox.html Squeezebox] networked audio players&lt;br /&gt;
* [http://www.z500series.com/ Zensonic Z500 Networked DVD Media Player]&lt;br /&gt;
* Ziova&#039;s [http://www.ziova.com/cs510.php CS510] and [http://www.ziova.com/cs505.php CS505] network media players&lt;br /&gt;
&lt;br /&gt;
==== Car stereo ====&lt;br /&gt;
* [http://www.phatnoise.com/products/digitalmediaplayers/kenwood_music_keg.php Kenwood Music Keg]&lt;br /&gt;
* [http://www.phatnoise.com/products/digitalmediaplayers/index.php PhatBox]&lt;br /&gt;
&lt;br /&gt;
==== Portable ====&lt;br /&gt;
* [[Apple iPod]] with [[Rockbox]] firmware&lt;br /&gt;
* Bluedot&#039;s [http://www.digitalworldtokyo.com/2006/07/bluedot_pmp_runs_linux_loves.php BMP-1430]&lt;br /&gt;
* Green Apple&#039;s portable media player: [http://www.apod.com.cn/show_products.asp?photoID=437 AP3000]&lt;br /&gt;
* [[iAudio M3]], M5 and X5&lt;br /&gt;
* [[iRiver]] iHP-120/iHP-140 with [[Rockbox]] firmware&lt;br /&gt;
* [[Iwod G10]]&lt;br /&gt;
* [[Rio Karma]]&lt;br /&gt;
* TrekStor&#039;s [http://www.trekstor.de/en/products/detail_mp3.php?pid=66 Vibez]&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
==== Players ====&lt;br /&gt;
* [http://koti.welho.com/hylinen/apollo/ Apollo]&lt;br /&gt;
* [http://cogosx.sourceforge.net Cog] — for Mac OS X&lt;br /&gt;
* [[foobar2000]]&lt;br /&gt;
* [[JRiver Media Center]]&lt;br /&gt;
* [http://fondriest.frederic.free.fr/realisations/lamip/ LAMIP]&lt;br /&gt;
* [[MediaMonkey]]&lt;br /&gt;
* [http://www.mplayerhq.hu/ MPlayer]&lt;br /&gt;
* [http://www.mythtv.org/ MythTV]&lt;br /&gt;
* [http://www.quinnware.com/ QCD] ([http://www.quinnware.com/list_plugins.php?type=input plugin])&lt;br /&gt;
* [http://www.videolan.org/ VLC]&lt;br /&gt;
* [http://www.vuplayer.com/vuplayer.htm VUPlayer]&lt;br /&gt;
* [[Winamp]]&lt;br /&gt;
* [[Windows Media Player]] and other directshow-based players (MPC, TCMP, RadLight) (with [http://www.illiminable.com/ogg/ Illiminable&#039;s directshow filters] or [http://corecodec.org/projects/coreflac CoreFLAC])&lt;br /&gt;
* [http://xine.sourceforge.net/ Xine]&lt;br /&gt;
* [[XMMS]]&lt;br /&gt;
* [http://www.un4seen.com/ XMplay]&lt;br /&gt;
&lt;br /&gt;
==== Frontends (Windows) ====&lt;br /&gt;
* [http://www.uninformative.com/flacattack/ Flacattack]&lt;br /&gt;
* Custom [http://members.home.nl/w.speek/flac.htm Windows Frontend] (by Speek)&lt;br /&gt;
* [http://www.unifront.boereck.de/ UniversalFront] by Böreck&lt;br /&gt;
* [http://home.vxu.se/mdati00/frontah/ Frontah] by Madah&lt;br /&gt;
* [http://www.webearce.com.ar/ MAREO] by Kwanbis&lt;br /&gt;
&lt;br /&gt;
==== Frontends (Mac) ====&lt;br /&gt;
* [http://www.danrules.com/macflac/ MacFLAC]&lt;br /&gt;
* [http://www.sbooth.org/Max/ Max]&lt;br /&gt;
* [http://members.rogers.com/beamsplitter/ RipBeak]&lt;br /&gt;
* [http://www.versiontracker.com/dyn/moreinfo/macosx/21952 xACT]&lt;br /&gt;
&lt;br /&gt;
==== Converters ====&lt;br /&gt;
* [http://www.dbpoweramp.com/ dBpowerAMP] Music Converter / Audio Player / CD Writer&lt;br /&gt;
* [http://www.mediamonkey.com/ MediaMonkey] Music Manager / Audio Player / CD Writer&lt;br /&gt;
* [http://www.germanixsoft.de/ GX:Transcoder] Music converter&lt;br /&gt;
&lt;br /&gt;
==== Editors ====&lt;br /&gt;
* [[Adobe Audition]]&lt;br /&gt;
* [http://www.goldwave.com/ GoldWave]&lt;br /&gt;
&lt;br /&gt;
==== CD writers/rippers ====&lt;br /&gt;
* [http://www.ahead.de Ahead Nero Burning Rom]&lt;br /&gt;
* [http://arson.sourceforge.net/ Arson]&lt;br /&gt;
* [http://www.burnatonce.com/ burnatonce]&lt;br /&gt;
* [http://www.burrrn.net Burrrn] Audio CD burner&lt;br /&gt;
* [[Exact Audio Copy]] CD Ripper&lt;br /&gt;
* [http://cdexos.sourceforge.net CDex] CD ripper&lt;br /&gt;
* [http://www.cdwave.com/ CD Wave]&lt;br /&gt;
* [http://www.mediamonkey.com/ MediaMonkey] - [[MediaMonkey]] CD ripper/writer&lt;br /&gt;
* [http://cdburnerxp.se/ CDburner XP] CD writer&lt;br /&gt;
&lt;br /&gt;
==== Taggers ====&lt;br /&gt;
* [http://www.saunalahti.fi/cse/files/Tag.zip Case&#039;s Tag] command line tagger&lt;br /&gt;
* [http://users.otenet.gr/~jtcliper/tgf/ The GodFather] Tagger / Music manager&lt;br /&gt;
* [http://www.mp3tag.de/en/index.html Mp3tag] Universal Tag Editor&lt;br /&gt;
* [http://sbooth.org/Tag/ Tag] — for Mac OS X 10.4 (Tiger)&lt;br /&gt;
* [http://flac.sourceforge.net/documentation.html#metaflac metaflac] - for general metadata (including Vorbis comments) maintenance&lt;br /&gt;
* [http://www.mediamonkey.com MediaMonkey] - [[MediaMonkey]] Tagger / Music manager (Including Multiple and Linked Album Art support)&lt;br /&gt;
&lt;br /&gt;
==== Other tools ====&lt;br /&gt;
* [http://www.burrrn.net/mrq/ Mr. QuestionMan]&lt;br /&gt;
* [http://www.bitattack.ro/ai/ Audio Identifier]&lt;br /&gt;
* [http://www.bunkus.org/videotools/mkvtoolnix/ mkvtoolnix] - tool to multiplex FLAC streams inside the Matroska container&lt;br /&gt;
* [http://flac.sourceforge.net/documentation.html#metaflac metaflac] - for general metadata (including Vorbis comments) maintenance, also to calculate [[ReplayGain]] values for FLAC files lacking such&lt;br /&gt;
&lt;br /&gt;
...and many more; see the [http://flac.sourceforge.net/links.html#software FLAC software section] and [http://flac.sourceforge.net/download.html#extras download section] for a more comprehensive list.&lt;br /&gt;
&lt;br /&gt;
== Frequently asked questions ==&lt;br /&gt;
&#039;&#039;Question:&#039;&#039; Does the compression level affect decompression speed?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Short Answer&#039;&#039;: No.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Long Answer&#039;&#039;: In truth, the compression level does affect the decompression speed, but the difference between the various compress levels can barely be measured and is too small to be noticed, even on low-end machines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Question:&#039;&#039; What is the best compression level for encoding my music?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Short Answer&#039;&#039;: The default setting, 5.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Long Answer&#039;&#039;: Encoding at the default setting will give the best balance between compression and encoding speed. Encoding at 8 can more than quadruple the encoding time, while having an insignificant effect on compression.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Lossless]]&lt;br /&gt;
* [[Lossless comparison]]&lt;br /&gt;
&lt;br /&gt;
== Externals links ==&lt;br /&gt;
* [http://flac.sourceforge.net/ FLAC website]&lt;br /&gt;
* [http://flac.sourceforge.net/download.html FLAC download]&lt;br /&gt;
* [http://flac.sourceforge.net/format.html Detailed description of the FLAC format]&lt;br /&gt;
* [http://flac.sourceforge.net/documentation.html FLAC documentation]&lt;br /&gt;
* [http://flac.sourceforge.net/faq.html FLAC FAQ]&lt;br /&gt;
* [http://people.ucsc.edu/~rswilson/flactest Omion&#039;s FLAC &amp;quot;File Size vs. Decoding Speed&amp;quot; test] - a very thorough test on [[Free Lossless Audio Codec#Frequently Asked Questions|the influence of the chosen encoding level on the decoding speed of FLAC]]; the only one so far to have covered FLAC&#039;s --super-secret-totally-impractical-compression-level to this extent as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Lossless]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Winamp&amp;diff=22872</id>
		<title>Winamp</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Winamp&amp;diff=22872"/>
		<updated>2011-07-27T17:23:10Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox|&lt;br /&gt;
|name = Winamp&lt;br /&gt;
|logo =&lt;br /&gt;
|screenshot = [[Image:Winamp-screenshot.png|250px]]&lt;br /&gt;
|caption = Modern Winamp skin&lt;br /&gt;
|maintainer = Team Nullsoft&lt;br /&gt;
|stable_release = [http://www.winamp.com/player/ 5.54]&lt;br /&gt;
|preview_release = None&lt;br /&gt;
|operating_system = Windows&lt;br /&gt;
|use = Media Player&lt;br /&gt;
|license = freeware&lt;br /&gt;
|website = [http://www.winamp.com/ www.winamp.com]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Winamp&#039;&#039;&#039; is a music player for Windows developed by Nullsoft with a feature-reduced freeware edition. The commercial &amp;quot;Pro&amp;quot; version is also available.&lt;br /&gt;
&lt;br /&gt;
The main advantages of Winamp is its ease of use. In addition, it is skinnable, and extensible using plugins. As of version 5.2, it fully supports multi-user (i.e. each user of your computer may have their own skin, playlist, and other settings).&lt;br /&gt;
&lt;br /&gt;
You can download Winamp at [http://www.winamp.com/ winamp.com]. While you are there, you might also check their [http://www.winamp.com/skins/ skin library] and [http://www.winamp.com/plugins/ plugin library]. And also check the very useful [http://forums.winamp.com/ community (forums)] where new plugins are announced and publicly tested, and very minor updates (i.e. 0.001 version increment) are posted.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
=== Free ===&lt;br /&gt;
* Crippled CD burning (~8×)&lt;br /&gt;
* Crippled CD ripping (~8×)&lt;br /&gt;
* [[AAC]], [[MP4]], [[FLAC]] ([http://win32builds.sourceforge.net/flake/index.html Flake] encoder), [[WAV]], [[WMA]] encoding&lt;br /&gt;
* [[Transcoding]] of the different audio formats&lt;br /&gt;
* [[ReplayGain]] support&lt;br /&gt;
* ReplayGain scanner to apply Album Gain or Track Gain to the tags&lt;br /&gt;
* Media library&lt;br /&gt;
* Full Unicode support&lt;br /&gt;
&lt;br /&gt;
=== Pro ===&lt;br /&gt;
The Pro version, which can be bought online, comes with some additional features compared to the free version.&lt;br /&gt;
* Burn CDs at full speed&lt;br /&gt;
* Rip CDs at full speed&lt;br /&gt;
* additional [[MP3]] encoding&lt;br /&gt;
&lt;br /&gt;
== Supported formats ==&lt;br /&gt;
=== Playback ===&lt;br /&gt;
Directly supported formats (i.e. provided with installer) include: [[MP1]], [[MP2]], [[MP3]], [[WAV]], [[AAC]], [[WMA]], (Ogg) [[Vorbis]], [[MIDI]], [[FLAC]], and [[Module]]&lt;br /&gt;
&lt;br /&gt;
Plugins also exist for many other formats, such as [[TTA]], [[WavPack]], [[Musepack]], [[TAK]]. Go to Winamp&#039;s [http://www.winamp.com/plugins/ plugin library] to download.&lt;br /&gt;
&lt;br /&gt;
== Supported languages ==&lt;br /&gt;
* English&lt;br /&gt;
&lt;br /&gt;
== Supported platforms ==&lt;br /&gt;
* Win 2000&lt;br /&gt;
* Win XP&lt;br /&gt;
* Win Vista [http://www.winamp.com/player/faq#35 with issues]&lt;br /&gt;
&lt;br /&gt;
== Recommended plugins ==&lt;br /&gt;
* &#039;&#039;&#039;Playlist Separator&#039;&#039;&#039; – provides a customizable separator line to delimit albums in a long playlist.&lt;br /&gt;
* &#039;&#039;&#039;MojoMaster&#039;&#039;&#039; – sexy dancer visualization.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://www.winamp.com Winamp: Homepage]&lt;br /&gt;
* [http://winamp.com/player/ Winamp: Download]&lt;br /&gt;
* [http://winamp.com/about/story.php More information]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Media Players]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Foobar2000&amp;diff=22871</id>
		<title>Foobar2000:Foobar2000</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Foobar2000&amp;diff=22871"/>
		<updated>2011-07-27T17:22:47Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{title|foobar2000}}&lt;br /&gt;
&lt;br /&gt;
{{Software Infobox|&lt;br /&gt;
|name = foobar2000&lt;br /&gt;
|logo = [[Image:foobar2000 Logo.png|48px]]&lt;br /&gt;
|screenshot = [[Image:Foobar2000-1.0-default-ui.png|250px]]&lt;br /&gt;
|caption = Screenshot of foobar2000 v1.0 using the default user interface&lt;br /&gt;
|maintainer = Peter Pawlowski&lt;br /&gt;
|stable_release = 1.1.7&lt;br /&gt;
|preview_release = 1.1.8 beta 2&lt;br /&gt;
|operating_system = Windows&lt;br /&gt;
|use = Media Player&lt;br /&gt;
|license = Proprietary, BSD&lt;br /&gt;
|website = [http://www.foobar2000.org/ www.foobar2000.org]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;foobar2000&#039;&#039;&#039; is an advanced freeware audio player for the Windows platform. Some of the basic features include full unicode support, ReplayGain support and native support for several popular audio formats.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The latest stable version is:&#039;&#039;&#039; [http://www.foobar2000.org/download v1.1.7]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The latest beta version is:&#039;&#039;&#039; [http://www.foobar2000.org/download v1.1.8 beta 2]&lt;br /&gt;
&lt;br /&gt;
== Platforms ==&lt;br /&gt;
&lt;br /&gt;
foobar2000 has been written specifically for the Windows platform and there are no plans to port it to any others.  However, while not officially supported, it is known to run on [http://www.hydrogenaudio.org/forums/index.php?showtopic=54933 Linux] and [http://www.hydrogenaudio.org/forums/index.php?showtopic=77261 Mac OS X] through Wine and WineBottler, respectively.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
* Powerful open component architecture allowing third-party developers to extend functionality of the player, including the ability to fully replace the user interface.&lt;br /&gt;
* Full Unicode support: File names, user interface, tagging, etc.&lt;br /&gt;
* [[ReplayGain]] support: Both playback and writing ReplayGain information to file tags.&lt;br /&gt;
* [[Gapless playback]].&lt;br /&gt;
* Advanced [[tagging]] capabilities - through built-in [[foobar2000:Properties|Properties dialog]] and various optional tagging-related components.&lt;br /&gt;
* Built-in [[foobar2000:Preferences:Media Library|Media Library]] functionality.&lt;br /&gt;
** Intuitive [[foobar2000:Query syntax|query syntax]] for searching the Media Library.&lt;br /&gt;
** [[foobar2000:Autoplaylist|Autoplaylist]] support: Generate dynamically updating playlists based on queries.&lt;br /&gt;
* [[foobar2000:Preferences:General:Keyboard Shortcuts|Customizable keyboard shortcuts]].&lt;br /&gt;
* Support for transcoding all supported audio formats using the [[Foobar2000:Converter|Converter component]] (requires external command-line encoder executables for different output formats).&lt;br /&gt;
* [[Secure_ripping|Secure]] [[foobar2000:Ripping CDs|CD ripping]].&lt;br /&gt;
* Streaming support.&lt;br /&gt;
* Efficient handling of large playlists.&lt;br /&gt;
* [[foobar2000:Components/Default_user_interface_%28foo_ui_std%29|User interface]] with simple configuration to create even complex layouts quickly and easily.&lt;br /&gt;
* Highly customizable display of track information using [[foobar2000:Titleformat_Introduction|title formatting scripts]].&lt;br /&gt;
&lt;br /&gt;
== Supported Audio Formats ==&lt;br /&gt;
Native Support (&amp;quot;out-of-the-box&amp;quot;):&lt;br /&gt;
* [[MP1]], [[MP2]], [[MP3]], [[MP4]], [[Musepack]], [[AAC]], [[Ogg Vorbis]], [[FLAC]] / Ogg FLAC, [[Speex]], [[WavPack]], [[WAV]], [[AIFF]], [[AU|AU/SND]], [[CDDA]], [[WMA]], [[Matroska]].&lt;br /&gt;
&lt;br /&gt;
Supported through optional components:&lt;br /&gt;
* [[TTA]], [[Monkey&#039;s Audio]], [[ALAC]], [[MOD]], [[SPC]], [[Shorten]], [[OptimFROG]], [[AC3]], [[DTS]], [[PSF]], [[NSF]], [[XID]], [[XA]], [[MMS]], [[RSTP]], [[TAK]], [[AMR]], etc.&lt;br /&gt;
&lt;br /&gt;
In addition, foobar2000 can also play music directly from compressed ZIP and without requiring the user to extract the files prior to playing. More archive formats supported through additional components: [http://kode54.foobar2000.org/ JMA], [http://kode54.foobar2000.org/ LHA].&lt;br /&gt;
&lt;br /&gt;
== Using foobar2000 ==&lt;br /&gt;
* [http://www.foobar2000.org/FAQ foobar2000 FAQ]&lt;br /&gt;
* [[foobar2000:components|foobar2000 Components]]&lt;br /&gt;
* [[foobar2000:Directories|foobar2000 Directories]]&lt;br /&gt;
* [[foobar2000:Encouraged Tag Standards|foobar2000 Encouraged Tag Standards]]&lt;br /&gt;
* [[foobar2000:FAQ|foobar2000 FAQ (unofficial)]]&lt;br /&gt;
* [http://wiki.hydrogenaudio.org/index.php?title=Category:Foobar2000_Guides foobar2000 Guides (category)]&lt;br /&gt;
* [http://wiki.hydrogenaudio.org/index.php?title=Category:Foobar2000_Preferences foobar2000 Preferences (category)]&lt;br /&gt;
=== Technical Information ===&lt;br /&gt;
* [[foobar2000:ID3 Tag Mapping|ID3 Tag Mapping]]&lt;br /&gt;
&lt;br /&gt;
=== Specific Guides ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Preferences&#039;&#039;&#039;&lt;br /&gt;
* [[foobar2000:Preferences|Preferences Dialog]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Metadata&#039;&#039;&#039;&lt;br /&gt;
* [[foobar2000:Properties|Tag editing: the Properties dialog]]&lt;br /&gt;
* [[foobar2000:Query syntax|Query Syntax]]: details of Syntax for querying metadata.&lt;br /&gt;
* [[foobar2000:Metadata Compatibility|Metadata Compatibility]]: information about compatibility with metadata written by other applications&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title formatting&#039;&#039;&#039;&lt;br /&gt;
* [[foobar2000:Title Formatting Introduction|Introduction to titleformat scripts]]&lt;br /&gt;
* [[foobar2000:Title Formatting Reference|Titleformat Reference]]: reference guide to all fields and functions&lt;br /&gt;
* [[foobar2000:Titleformat Examples|Titleformat Examples]]: user-submitted code for various purposes; submit your own!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Others&#039;&#039;&#039;&lt;br /&gt;
* [[foobar2000:File operations|File operations dialog]]: move, copy, rename, and delete files from within foobar2000&lt;br /&gt;
* [[foobar2000:Commandline Guide|Commandline Usage]]&lt;br /&gt;
&lt;br /&gt;
=== External Guides ===&lt;br /&gt;
* [http://foobar2000.audiohq.de/ Frank Bicking&#039;s German-language guide].&lt;br /&gt;
* [http://foobar2000.xrea.jp/ fb2k Wiki Page] for Japanese users.&lt;br /&gt;
* [http://winamp2foobar.blogspot.com Winamp To Foobar Guide] with information relevant for general users also.&lt;br /&gt;
&lt;br /&gt;
== Important Links ==&lt;br /&gt;
=== Official Site ===&lt;br /&gt;
* [http://www.foobar2000.org foobar2000.org: Homepage]&lt;br /&gt;
* [http://www.foobar2000.org/download foobar2000.org: Download]&lt;br /&gt;
* [http://www.foobar2000.org/components foobar2000.org: Components]&lt;br /&gt;
&lt;br /&gt;
=== Community ===&lt;br /&gt;
* [http://forums.foobar2000.org/ Official foobar2000 forum]&lt;br /&gt;
* [http://foobar-users.de/ German Support Forum]&lt;br /&gt;
* [http://foobar2000.pl/ Polish Support Forum]&lt;br /&gt;
* [http://www.fforum.ru/index.php?showforum=59 Russian-language forum]&lt;br /&gt;
* [http://www.foobar2000.ru/forum/ Another Russian-language forum]&lt;br /&gt;
&lt;br /&gt;
=== Appearance ===&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=61333 Default UI .fth Thread] Fast way to clone another&#039;s DUI Configuration.&lt;br /&gt;
* [[foobar2000:Preferences:Columns UI/Appearance|Columns UI appearance customization guides]]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=31027 Columns UI configurations]&lt;br /&gt;
&lt;br /&gt;
[[Category:foobar2000]]&lt;br /&gt;
[[Category:Media Players|foobar2000]]&lt;br /&gt;
[[Category:CD Rippers]]&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Tag editors]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Muine&amp;diff=22870</id>
		<title>Muine</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Muine&amp;diff=22870"/>
		<updated>2011-07-27T17:22:15Z</updated>

		<summary type="html">&lt;p&gt;Notat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Muine&#039;&#039;&#039; is open source music player for Linux/GNOME. Features automatic album-cover fetching, multiple artist and performer tags per song, [[ReplayGain]] support and more. &lt;br /&gt;
&lt;br /&gt;
== Supported formats ==&lt;br /&gt;
* [[MP3]], (Ogg) [[Vorbis]], [[FLAC]]&lt;br /&gt;
&lt;br /&gt;
== Supported languages ==&lt;br /&gt;
* English, French, German, Spanish, Portugese, Japanese, Korean, Norwegian, Swedish, Polish and more.&lt;br /&gt;
&lt;br /&gt;
== Supported platforms ==&lt;br /&gt;
* Linux/BSD&lt;br /&gt;
* [http://muine.gooeylinux.org/download.shtml Additional requirements]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://muine.gooeylinux.org Homepage]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Media Players]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Topic_Index&amp;diff=22869</id>
		<title>Topic Index</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Topic_Index&amp;diff=22869"/>
		<updated>2011-07-27T17:22:02Z</updated>

		<summary type="html">&lt;p&gt;Notat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* For a more structured &#039;table of contents&#039;, use the &#039;&#039;&#039;[[Main Page#Categories|Categories List]]&#039;&#039;&#039;.&lt;br /&gt;
* Please see [http://www.hydrogenaudio.org/forums/index.php?showtopic=12979&amp;amp;st=25&amp;amp;p=247441&amp;amp;#entry247441 this thread] for a discussion of the future structure of this wiki.  If you have thoughts, comments, suggestions, etc., please join in this discussion.  In the meantime, please feel free to fill in gaps in the information below.&lt;br /&gt;
* See also [http://www.hydrogenaudio.org/forums/index.php?showtopic=28658 the style related discussion thread] in the forums.&lt;br /&gt;
&lt;br /&gt;
= General Information =&lt;br /&gt;
== General Guides ==&lt;br /&gt;
* [[Create a long-term archive]]&lt;br /&gt;
* [[Secure ripping|Secure Ripping]]&lt;br /&gt;
* [[Enabling DMA]]&lt;br /&gt;
* [[Choosing_the_best_codec.|Choosing the best codec]]&lt;br /&gt;
* [[Lossless_comparison|Lossless Comparison]]&lt;br /&gt;
&lt;br /&gt;
== EAC Guides == &lt;br /&gt;
* Configuring [[EAC Drive Configuration|EAC and CD-ROM Drives]] &lt;br /&gt;
* Configuring [[EAC and Lame]]&lt;br /&gt;
* Configuring [[EAC and AAC | EAC and Nero AAC]]&lt;br /&gt;
* Configuring [[EAC and Ogg Vorbis | EAC and Vorbis]]&lt;br /&gt;
* Configuring [[EAC and Musepack]] &lt;br /&gt;
* Configuring [[EAC and WavPack]]&lt;br /&gt;
* Configuring [[EAC and FLAC]]&lt;br /&gt;
* Configuring [[EAC and Monkey&#039;s Audio]]&lt;br /&gt;
* Configuring [[EAC and Cue Sheets]]&lt;br /&gt;
* Configuring EAC and [[REACT]]&lt;br /&gt;
&lt;br /&gt;
== CDex Guides ==&lt;br /&gt;
* Configuring [[CDex Drive Configuration|CDex and CD-ROM Drives]] &lt;br /&gt;
* Configuring [[CDex and FLAC]]&lt;br /&gt;
&lt;br /&gt;
== AAC Guides == &lt;br /&gt;
* [[AAC_FAQ|AAC FAQ]] frequently asked questions in reguard to AAC the latest industry standard.&lt;br /&gt;
* [[AAC encoders|AAC Encoders]] known AAC encoder/decoder implementations and configuring them (Apple Itunes, Nero AAC, etc)&lt;br /&gt;
* [[Linux and Nero AAC]] a short guide for configuring Nero AAC encoder to run under Linux.&lt;br /&gt;
&lt;br /&gt;
== Vorbis Guides ==&lt;br /&gt;
* [[Recommended_Ogg_Vorbis|Recommended encoders and settings for Vorbis]].&lt;br /&gt;
* [[Lancer|Ogg Vorbis Acceleration Project]] information reguarding optimized Vorbis binaries.&lt;br /&gt;
* [[OggDropXPd|OggDropXPd]] guide for encoding with John 33&#039;s popular drag-n-drop frontend.&lt;br /&gt;
* [[Compiling_aoTuV|Compiling AoTuV]] compiling the AoTuV binaries under Linux.&lt;br /&gt;
&lt;br /&gt;
= Audio Codecs =&lt;br /&gt;
== [[Lossy]] ==&lt;br /&gt;
* [[Advanced Audio Coding]] (AAC)&lt;br /&gt;
* [[AC3]]&lt;br /&gt;
* [[ATRAC3]]&lt;br /&gt;
* [[DTS]]&lt;br /&gt;
* [[MP2]]&lt;br /&gt;
* [[MP3]]&lt;br /&gt;
* [[Musepack]] (MPC, MP+)&lt;br /&gt;
* (Ogg) [[Vorbis]]&lt;br /&gt;
* [[QDesign]]&lt;br /&gt;
* [[VQF]]&lt;br /&gt;
* [[Windows Media Audio]] (WMA)&lt;br /&gt;
&lt;br /&gt;
== [[Lossless]] ==&lt;br /&gt;
* [[ALAC|Apple Lossless]]&lt;br /&gt;
* [[ALS|Audio Lossless Coding]]&lt;br /&gt;
* [[DTS-HD|DTS Master Audio]] &lt;br /&gt;
* [[Free Lossless Audio Codec]] (FLAC)&lt;br /&gt;
* [[Lossless Audio]] (LA)&lt;br /&gt;
* [[Lossless Predictive Audio Compression]] (LPAC)&lt;br /&gt;
* [[Monkey&#039;s Audio]]&lt;br /&gt;
* [[OptimFROG]]&lt;br /&gt;
* [[Lossless comparison#RealAudio Lossless|RealAudio Lossless]]&lt;br /&gt;
* [[Shorten]]&lt;br /&gt;
* [[TTA|True Audio]]&lt;br /&gt;
* [[WavPack]]&lt;br /&gt;
* [[Windows Media Audio|WMA Lossless]]&lt;br /&gt;
&lt;br /&gt;
= [[Metadata]] (Tags) =&lt;br /&gt;
* [[APEv1]]&lt;br /&gt;
* [[APEv2]]&lt;br /&gt;
* [[ID3v1]]&lt;br /&gt;
* [[ID3v1.1]]&lt;br /&gt;
* [[ID3v2]]&lt;br /&gt;
* [[Vorbis Comment]]&lt;br /&gt;
&lt;br /&gt;
= Media Extractors =&lt;br /&gt;
== CD Extractors ==&lt;br /&gt;
* [[Audiograbber]] (Win32)&lt;br /&gt;
* [[CDex]] (Win32)&lt;br /&gt;
* [[cdparanoia]] (Posix)&lt;br /&gt;
* [[dBpowerAMP with AccurateRip]] (Win32)&lt;br /&gt;
* [[Exact_Audio_Copy|Exact Audio Copy]] (Win32)&lt;br /&gt;
* [[Grip]] (Posix) &lt;br /&gt;
* [[iTunes]] (Win32/Mac OS/X)&lt;br /&gt;
* [[MediaMonkey]] (Win32)&lt;br /&gt;
* [[Max]] (Mac OS/X)&lt;br /&gt;
* [[XLD]] (Mac OS/X) &lt;br /&gt;
* [[PlexTools]] (Win32)&lt;br /&gt;
* [[Rubyripper]] (Posix/Mac OS/X)&lt;br /&gt;
&lt;br /&gt;
== DVD Extractors ==&lt;br /&gt;
* [http://pessoal.onda.com.br/rjamorim/SetupDVDDecrypter_3.5.4.0.exe DVD Decrypter] (Win32)&lt;br /&gt;
* DVD-A / CPPM Decrypter (Win32/Posix)&lt;br /&gt;
&lt;br /&gt;
= Media Players =&lt;br /&gt;
== Windows ==&lt;br /&gt;
* [[Apollo]]&lt;br /&gt;
* [[dBpowerAMP]]&lt;br /&gt;
* [[Foobar2000:Foobar2000|foobar2000]]&lt;br /&gt;
* [[iTunes]]&lt;br /&gt;
* [[MediaMonkey]]&lt;br /&gt;
* [[musikCube]]&lt;br /&gt;
* [[Quintessential Player]]&lt;br /&gt;
* [[VUplayer]]&lt;br /&gt;
* [[Winamp]]&lt;br /&gt;
* [[Windows Media Player]]&lt;br /&gt;
* [[wxMusik]]&lt;br /&gt;
* [[XMPlay]]&lt;br /&gt;
* [[WMPTSE]] (with WMP)&lt;br /&gt;
&lt;br /&gt;
== Linux/BSD ==&lt;br /&gt;
* [[Amarok]]&lt;br /&gt;
* [[BMP]]&lt;br /&gt;
* [[JuK]]&lt;br /&gt;
* [[LAMIP]]&lt;br /&gt;
* [[Muine]]&lt;br /&gt;
* [[Music Player Daemon (MPD)]]&lt;br /&gt;
* [[Quod Libet]]&lt;br /&gt;
* [[Rhythmbox]]&lt;br /&gt;
* [[wxMusik]]&lt;br /&gt;
* [[XMMS]]&lt;br /&gt;
&lt;br /&gt;
== Mac OS X (Non-BSD Specific) ==&lt;br /&gt;
* [[iTunes]]&lt;br /&gt;
* [[skiTunes]]&lt;br /&gt;
* [[Whamb]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [[CL-Amp]] (BeOS)&lt;br /&gt;
&lt;br /&gt;
= Audio Editors =&lt;br /&gt;
== Windows ==&lt;br /&gt;
* [[Adobe Audition]] (previously known as &#039;&#039;Cool Edit&#039;&#039;)&lt;br /&gt;
* [[Audacity]]&lt;br /&gt;
* [[Goldwave]]&lt;br /&gt;
* [http://www.sonymediasoftware.com/products/soundforgefamily.asp Sony Sound Forge] (Previously released by Sonic Foundry)&lt;br /&gt;
&lt;br /&gt;
== Linux/BSD ==&lt;br /&gt;
* [[Ardour]] &lt;br /&gt;
* [[Audacity]]&lt;br /&gt;
* [[ReZound]]&lt;br /&gt;
&lt;br /&gt;
== Mac OS X (Non-BSD Specific) ==&lt;br /&gt;
* [[Ardour]] &lt;br /&gt;
* [[Audacity]]&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
* [http://timidity.sourceforge.net/ Timidity++] (MIDI to PCM (WAV) converter)&amp;lt;br&amp;gt;Timidity++ synthesizes MIDI files (sequences) in real-time using Gravis UltraSound Soundfont patches (loosly based upon Wavetable Synthesis) to common digital audio file formats such as, WAV, AU, AIFF, Ogg Vorbis, FLAC, etc. Useful for those who want to bypass FM Synthesizers on their sound card&#039;s to hear MIDI sequence as it was intended to be heard.)&lt;br /&gt;
&lt;br /&gt;
= Testing Software =&lt;br /&gt;
== Subjective Perceptual ==&lt;br /&gt;
* [[ABC/HR]]&lt;br /&gt;
* [[PCABX]]&lt;br /&gt;
&lt;br /&gt;
== Objective ==&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:green;&amp;quot;&amp;gt;&#039;&#039;Note: Might be good to put something here about the problems of quality comparisons using graphs, frequency sweeps, etc.&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[EAQUAL]]&lt;br /&gt;
* [[Rightmark_Audio_Analyzer|Rightmark Audio Analyzer]]&lt;br /&gt;
&lt;br /&gt;
= Audio Hardware =&lt;br /&gt;
== PC Audio ==&lt;br /&gt;
* [[Terratec EWX 24/96]]&lt;br /&gt;
* [[M-Audio Audiophile 24/96]]&lt;br /&gt;
* [[M-Audio Revolution 5.1]] &lt;br /&gt;
* [[M-Audio Revolution 7.1]] &lt;br /&gt;
* [[Chaintech AV-710]] &lt;br /&gt;
* [[E-MU 0404 24/192]]&lt;br /&gt;
* [[ASUS Xonar D1]]&lt;br /&gt;
* [[ASUS Xonar D2/PM]]&lt;br /&gt;
&lt;br /&gt;
== Notebook Audio == &lt;br /&gt;
* [[Echo Indigo IO 24/96]]&lt;br /&gt;
&lt;br /&gt;
== Firewire ==&lt;br /&gt;
* [[E-MU 1212M 24/192]]&lt;br /&gt;
* [[M-Audio Firewire 410]]&lt;br /&gt;
&lt;br /&gt;
== HiFi ==&lt;br /&gt;
* [[M-Audio Fast Track USB]]&lt;br /&gt;
* [[Slim Devices Squeezebox]] &lt;br /&gt;
* [[Slim Devices Transporter]]&lt;br /&gt;
* [[Hermstedt AG Hifidelio]]&lt;br /&gt;
* [[Olive Musica]]&lt;br /&gt;
&lt;br /&gt;
== MIDI Interfaces ==&lt;br /&gt;
* M-Audio MIDISport Uno 1x1 &lt;br /&gt;
* M-Audio MIDISport 2x2 &lt;br /&gt;
* MOTU 5x5 Micro Lite &lt;br /&gt;
* MOTU Fastlane USB&lt;br /&gt;
&lt;br /&gt;
== Digital Audio Players ==&lt;br /&gt;
=== Portable Flash ===&lt;br /&gt;
&#039;&#039;(These players make use of a internal flash drive.)&#039;&#039;&lt;br /&gt;
* [[Apple iPod]] Nano&lt;br /&gt;
* [[Apple iPod]] Shuffle&lt;br /&gt;
* Creative MuVo&lt;br /&gt;
* iRiver iFP Series&lt;br /&gt;
* MPIO lFP Series&lt;br /&gt;
* [[Rio Carbon]]&lt;br /&gt;
&lt;br /&gt;
=== Portable HD ===&lt;br /&gt;
&#039;&#039;(These players make use of a internal harddrive.)&#039;&#039;&lt;br /&gt;
* [[Apple iPod]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iriver_H110_H115_H120_H140 Rockbox firmware])&#039;&#039;&lt;br /&gt;
* [[Archos Jukebox with Rockbox Software]]&lt;br /&gt;
* [[Cowon iAudio]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iAudio_X5 Rockbox firmware])&#039;&#039;&lt;br /&gt;
* [[iRiver H-Series]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iriver_H110_H115_H120_H140 Rockbox firmware])&#039;&#039;&lt;br /&gt;
* [[MPIO H-Series]]&lt;br /&gt;
* [[Neuros]]&lt;br /&gt;
* [[Rio Karma]]&lt;br /&gt;
* [[Sandisk]] with &#039;&#039;([http://www.rockbox.org/twiki/bin/view/Main/TargetStatus#iAudio_X5 Rockbox firmware])&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Portable CD ===&lt;br /&gt;
&lt;br /&gt;
=== Car Players ===&lt;br /&gt;
&#039;&#039;(Car stereos that can read MP3, Vorbis, WMA, etc.).&#039;&#039;&lt;br /&gt;
* [[Aiwa CDC-MP3]]&lt;br /&gt;
* [[Yakumo Ultrasound]]&lt;br /&gt;
&lt;br /&gt;
===DVD Players=== &lt;br /&gt;
* [[Neuston&#039;s Maestro DVX-1201]]&lt;br /&gt;
&lt;br /&gt;
=== Firmware ===&lt;br /&gt;
* [[Rockbox]]&lt;br /&gt;
&lt;br /&gt;
= Audio Theory =&lt;br /&gt;
== Analog Audio ==&lt;br /&gt;
* [[Tube Amplifiers]]&lt;br /&gt;
* [[Vinyl_Playback_and_Recording|Vinyl Audio]]&lt;br /&gt;
&lt;br /&gt;
== Digital Audio ==&lt;br /&gt;
* [[Solid State Amplifiers]] &lt;br /&gt;
* [[ReplayGain]]&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
* [[ABX]]&lt;br /&gt;
* [[EAQUAL]]&lt;br /&gt;
&lt;br /&gt;
= Audio Development =&lt;br /&gt;
&#039;&#039;note: Let&#039;s start with basic development tools (compilers, engineering tools, dev. libraries) until we think of more tools to add. I am also adding external links to books, tutorials, etc under resources.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
* [http://www.mathworks.com/products/matlab/ MATLAB 7.0] commercial software for algorithmic design, developement, engineering, and scientific computing. (multi-platform support)&lt;br /&gt;
* [http://www.octave.org/ GNU Octave] open-source alternative software (GPL) to MATLAB for numerical computations, engineering, and scientific computing. (multi-platform support)&lt;br /&gt;
* [http://www.fftw.org/ FFTW] Is a C subroutine library for computing the Discrete Fourier transform (DFT) in one or more dimensions on real and complex inputs.&lt;br /&gt;
* [http://gcc.gnu.org/ GCC] THE GNU compiler collection for C, C++, Objective-C, Fortran, Java, and Ada.&lt;br /&gt;
* [http://www.gnu.org/software/emacs/emacs.html GNU Emacs] an extensible, customizable, self-documenting real-time display editor. Great for writing all types of source code especially on Unix. (multi-platform support) &lt;br /&gt;
* [http://www.bloodshed.net/devcpp.html DevCPP] free front-end IDE and compiler for the C and C++ languages. Delphi and C source code available. (Win 9x, NT, 2000, and XP)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showforum=30 Scientific/R&amp;amp;D Forums] for Psychoacoustic, DSP, Electrical Engineering, theory, and coding related questions. (most questions are generally answered)&lt;br /&gt;
* [http://www.aes.org/ AES] The Audio Engineering Society website. Home of year-round world AES conferences.&lt;br /&gt;
* [http://www.dspguru.com/info/books/favor.htm DSP Tutorials] this site provides another good introduction in to the area of DSP.   &lt;br /&gt;
* [http://www.musicdsp.org/archive.php?classid=2 Music-DSP] source-code archive for analysis, filters, effects and synthesis. (C, C++, and Java code)&lt;br /&gt;
* [http://www.itakura.nuee.nagoya-u.ac.jp/HRTF/ HRTF] A database of measurements and research papers on Head Related Transfer Functions for 3D-Audio. (PDF, Audio)&lt;br /&gt;
* [http://www.midi.org/about-midi/specshome.shtml MIDI Specifications] MIDI 1.0, the new MusicXMF specification, and SP-MIDI for third generation 3GPP mobile devices (PDF) &lt;br /&gt;
* [http://www.gamedev.net/reference/articles/article2008.asp OpenAL] a beginners tutorial on writing code using OpenAL for audio programming in computer games and other applications. (C, C++). &lt;br /&gt;
* [http://www.alsa-project.org/ ALSA Project] (Advanced Linux Sound Architecture) bringing audio and MIDI capabilities to Linux.&lt;br /&gt;
* [http://www.engmath.dal.ca/courses/engm6610/notes/notes.html A Really friendly guide to Wavelets] A good introduction to wavelets aimed towards engineer, requires a fair amount of background knowledge.&lt;br /&gt;
&lt;br /&gt;
== Books/Research == &lt;br /&gt;
* [http://www.amazon.com/gp/product/3540231595/qid=1135380559/sr=1-3/ref=sr_1_3/102-1730075-7300931?s=books&amp;amp;v=glance&amp;amp;n=283155 Psychoacoustics - Facts and Models] author&#039;s Zwicker, Fastl, and Hugo, revised 2005 third edition. The book for comprehensive psychoacoustics models and figures.  &lt;br /&gt;
* [http://www.eas.asu.edu/~spanias/papers/paper-audio-tedspanias-00.pdf  Perceptual Audio Coding] authors A. Painter and T. Spanias. A comprehensive paper on percepual audio coding (PDF)&lt;br /&gt;
* [http://www.amazon.com/gp/product/0780334493/103-2094923-9567001?v=glance&amp;amp;n=283155&amp;amp;%5Fencoding=UTF8&amp;amp;me=ATVPDKIKX0DER&amp;amp;no=283155&amp;amp;st=books Speech Communications Human and Machine] this book provides a good introduction to speech coding, inlcuding anaylsis, recognition, and perception. This text is a very good introduction for beginners. &lt;br /&gt;
* [http://www.dspguide.com/ Scientist and Engineer&#039;s Guide to DSP] author Steve Smith, a great guide for beginners new to the subject of DSP (free online text)(PDF)&lt;br /&gt;
*[http://www.amazon.com/exec/obidos/tg/detail/-/0792391810/ref=ase_theinternetdatac/103-9882844-5344648?v=glance&amp;amp;s=books Vector Quantization] authors Gersho and Gray. Good read for understanding how VQ and arithmetic coding work.&lt;br /&gt;
&lt;br /&gt;
= Audio Resources =&lt;br /&gt;
== Websites ==&lt;br /&gt;
&#039;&#039;Note: Let&#039;s include a small description to the side for now, so that we have something to work with when this section becomes large enough for its own page&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* http://www.audiocoding.com (Page with a wiki on technical audio topics, homepage of FAAC and FAAD2, also has an AAC forum.)&lt;br /&gt;
* http://www.ff123.net (Lots of general information on various MP3 implementations, test samples, testing methodology information, homepage of ABC/HR)&lt;br /&gt;
* http://www.head-fi.org (general information/board about head phones and portable audio players)&lt;br /&gt;
* http://www.rarewares.org (Downloads for many audio and media tools)&lt;br /&gt;
* http://www.rjamorim.com/rrw/ (Download old versions of foobar2000 and other audio and media tools)&lt;br /&gt;
* http://www.rockbox.org/ (Open-source jukebox firmware for numerous DAP and architectures, GNU/GPL License). &lt;br /&gt;
* http://www.dapreview.net/ (Reviews of some of the most popular digital audio players out there) &lt;br /&gt;
* http://www.anythingbutipod.com/ (Thorough reviews of some of the most popular digital audio players out there)&lt;br /&gt;
&lt;br /&gt;
== Articles/Debates ==&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=31759&amp;amp;st=0 DVD-A vs. SACD debate]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=38041&amp;amp;st=0 Subjective vs. Objective testing]&lt;br /&gt;
* [http://www.ambisonic.net/pdf/ambidvd2001.pdf 5.1 surround vs. Ambisonics comparison]&lt;br /&gt;
&lt;br /&gt;
== Listening Tests ==&lt;br /&gt;
* [http://www.rjamorim.com/test/ Roberto&#039;s listening tests]&lt;br /&gt;
* [[Listening_Tests|Inventory of several listening tests, mainly on HA.org]]&lt;br /&gt;
&lt;br /&gt;
= Other Topics =&lt;br /&gt;
== Video ==&lt;br /&gt;
* [[MPEG-4 Visual]]&lt;br /&gt;
* [[Real Video]]&lt;br /&gt;
* [[Theora]]&lt;br /&gt;
* [[Tarkin]]&lt;br /&gt;
* [[Snow]] &lt;br /&gt;
* [[VP6]]&lt;br /&gt;
* [[Windows Media Video]]&lt;br /&gt;
&lt;br /&gt;
== [[Container format]]s ==&lt;br /&gt;
* [[ASF]]&lt;br /&gt;
* [[AVI]]&lt;br /&gt;
* [[Matroska]]&lt;br /&gt;
* [[MOV]]&lt;br /&gt;
* [[MP4]]&lt;br /&gt;
* [[Ogg]]&lt;br /&gt;
&lt;br /&gt;
= Glossary =&lt;br /&gt;
* [[Glossary_Of_Audio_Terms|Glossary of Audio Terms]]&lt;br /&gt;
&lt;br /&gt;
= Introduction &amp;amp; User Guides =&lt;br /&gt;
&#039;&#039;A starting place for new users to audio, with guides to compression and CD ripping and a glossary of all common terms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Glossary Of Audio Terms]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Audio format guide]]&lt;br /&gt;
* Ripping Guides&lt;br /&gt;
** [[EAC]] (Win32)&lt;br /&gt;
** [[CDex]] (Win32)&lt;br /&gt;
** [[DBpowerAMP with AccurateRip]] (Win32)&lt;br /&gt;
** [[Plextools]] (Win32)&lt;br /&gt;
** [[Max]] (Mac OS/X)&lt;br /&gt;
** [[XLD]] (Mac OS/X) &lt;br /&gt;
** [[Rubyripper]] (Posix/Mac OS/X) &lt;br /&gt;
* [[Tagging]]&lt;br /&gt;
* [[Replay Gain]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Audio Codecs =&lt;br /&gt;
&#039;&#039;Pros/cons, Recommended settings, Useful tools, etc.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[:Category:Codecs|The Technical/Codecs Category]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
= Container Formats =&lt;br /&gt;
&#039;&#039;What is a [[container format]]?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Matroska]]&lt;br /&gt;
* [[MP4]]&lt;br /&gt;
* [[Ogg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
= Audio Hardware &amp;amp; CD Ripping =&lt;br /&gt;
*&#039;&#039;CD Tools, Secure Ripping, Soundcard Quality&#039;&#039;&lt;br /&gt;
** [[Secure ripping]]&lt;br /&gt;
** Ripping Guide&lt;br /&gt;
*** [[EAC]]&lt;br /&gt;
*** [[CDex]]&lt;br /&gt;
*** [[DBpowerAMP with AccurateRip]]&lt;br /&gt;
*** [[Plextools]]&lt;br /&gt;
** [[CD copy protection]]&lt;br /&gt;
** [[CD Hardware]]&lt;br /&gt;
* Vinyl records and turntables&lt;br /&gt;
** [[Introduction to Vinyl|Introduction]]&lt;br /&gt;
** [[Advantages of Vinyl]]&lt;br /&gt;
** [[Disadvantages of Vinyl]]&lt;br /&gt;
** [[Vinyl Myths]]&lt;br /&gt;
** [[Purchasing Vinyl LPs and Components|Purchasing]]&lt;br /&gt;
** Record Player Components&lt;br /&gt;
*** [[Turntable]]&lt;br /&gt;
*** [[Cartridge]]&lt;br /&gt;
*** [[Phono preamplifier]]&lt;br /&gt;
** [[Evaluating Vinyl Sound Quality]]&lt;br /&gt;
** [[Vinyl Playback and Recording|Playback and Recording]]&lt;br /&gt;
** [[Vinyl Maintenance|Maintenance]]&lt;br /&gt;
** [[Vinyl Forum Posts and FAQs|FAQs]]&lt;br /&gt;
** [[Vinyl Glossary|Glossary]]&lt;br /&gt;
** [[Vinyl Links|Links]]&lt;br /&gt;
** [[Vinyl Mastering|Mastering]]&lt;br /&gt;
* [[Soundcard|Soundcards]]&lt;br /&gt;
* [[Other hardware]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
* [[EAC Vs CDex SecureMode]] (by Pio2001)&lt;br /&gt;
* [[EAC Vs CDex SecureMode II]] (by westgroveg)&lt;br /&gt;
* [[Listening Tests]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
=Downloads=&lt;br /&gt;
&#039;&#039;Where to obtain the software discussed in HAK.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[Download page]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Spacer--&amp;gt;&lt;br /&gt;
= Using HAK =&lt;br /&gt;
* [[Help:Contents|Wiki User Guide]]&lt;br /&gt;
* Play around at the [[Hydrogenaudio Knowledgebase:Sandbox|Sandbox]] to try your formatting skills. Everything goes here and everything can/may be deleted.&lt;br /&gt;
* Contributors should read [[Help:Editing|editing help]].&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Replaygain&amp;diff=22868</id>
		<title>Replaygain</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Replaygain&amp;diff=22868"/>
		<updated>2011-07-27T17:20:41Z</updated>

		<summary type="html">&lt;p&gt;Notat: Redirected page to ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[ReplayGain]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=ReplayGain&amp;diff=22867</id>
		<title>ReplayGain</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=ReplayGain&amp;diff=22867"/>
		<updated>2011-07-27T17:20:21Z</updated>

		<summary type="html">&lt;p&gt;Notat: rename&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;ReplayGain&#039;&#039;&#039; is the name of a technique invented to achieve the same perceived playback loudness of audio files. It defines an algorithm to measure the &#039;&#039;&#039;perceived&#039;&#039;&#039; loudness of audio data.&lt;br /&gt;
&lt;br /&gt;
ReplayGain allows the loudness of each song within a collection of songs to be consistent. This is called &#039;Track Gain&#039; (or &#039;Radio Gain&#039; in earlier parlance). It also allows the loudness of a specific sub-collection (an &amp;quot;album&amp;quot;) to be consistent with the rest of the collection, while allowing the dynamics from song to song on the album to remain intact. This is called &#039;Album Gain&#039; (or &#039;Audiophile Gain&#039; in earlier parlance). This is especially important when listening to classical music albums, because quiet tracks need to remain a certain degree quieter than the louder ones.&lt;br /&gt;
&lt;br /&gt;
ReplayGain is different from [[Normalization|peak normalization]]. Peak normalization merely ensures that the peak amplitude reaches a certain level. This does not ensure equal loudness. The ReplayGain technique measures the &#039;&#039;effective power&#039;&#039; of the waveform (i.e. the RMS power after applying an &amp;quot;equal loudness contour&amp;quot;), and then adjusts the amplitude of the waveform accordingly. The result is that Replay Gained waveforms are usually more uniformly amplified then peak-normalized waveforms.&lt;br /&gt;
&lt;br /&gt;
==Target loudness==&lt;br /&gt;
The target loudness of almost all ReplayGain utilities is 89 dB SPL (an early departure from the proposal, endorsed by its author&amp;lt;ref&amp;gt;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=83397&amp;amp;view=findpost&amp;amp;p=721854 Does Replay gain work differtly in Media monkey]&amp;lt;/ref&amp;gt;) &amp;amp;mdash; the ReplayGain proposal and SMPTE recommendation are 6dB lower.&amp;lt;ref&amp;gt;[http://www.mars.org/mailman/public/mad-dev/2004-February/000993.html ReplayGain discussion at mad-dev]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clipping==&lt;br /&gt;
Audio is generally recorded such that the loudest sounds don&#039;t clip, but the use of ReplayGain can cause clipping if the average volume of a song is below the target level. That is, upon playback, the volume of a quiet song is increased, so the parts of the song with above-average loudness, especially in the bass frequencies, will exceed the limits of the format and will be distorted. Whether this distortion is audible depends on the sounds in question, and the listener&#039;s sensitivity.&lt;br /&gt;
&lt;br /&gt;
Implementations deal with the risk of clipping in different ways. Some have a &amp;quot;pre-amp&amp;quot; feature which reduces (or boosts) the original audio&#039;s level by a certain amount before doing whatever is needed for ReplayGain. Some have a &amp;quot;prevent clipping&amp;quot; feature to reduce the amount of ReplayGain adjustment to whatever amount would keep clipping from occurring, based on peak info stored in the file&#039;s metadata (thus reducing the effectiveness of ReplayGain). Some recommend using a compressor/limiter DSP to prevent or reduce clipping, regardless of whether it was caused by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
There are different ReplayGain implementations, each with its own uses and strength. Most use [[metadata]] to indicate the level of the volume change that the player should make. Some modify the audio data itself, and optionally use metadata as well. There are advantages and disadvantages to both methods.&lt;br /&gt;
&lt;br /&gt;
In the metadata method, information on both types of ReplayGain (Track Gain and Album Gain) can be stored. The volume-change information can be very precise. If audio data was also changed, the metadata can contain &amp;quot;undo&amp;quot; info. Not all audio players/decoders know how to read and use ReplayGain information stored in metadata. And there&#039;s no standard for where and how ReplayGain info is stored; each implementation uses different formats and puts the info in different locations.&lt;br /&gt;
&lt;br /&gt;
In the audio data method, the file&#039;s actual audio data is modified so that its natural/default playback volume is at the target level. In this scenario, only one type of ReplayGain (Track Gain or Album Gain) can be applied. If no &amp;quot;undo&amp;quot; info is saved somewhere, it may not be possible to restore the original audio data. Limitations of the audio file format may prevent precise (finely tuned) gain adjustments with this method. For example, MP3 and AAC files can only be losslessly modified in 1.5 dB steps. Depending on the audio file format, the process may also be lossy in the sense that it could irreversibly push a signal above the format&#039;s maximum amplitude (resulting in clipping) or below the minimum (resulting in silence).&lt;br /&gt;
&lt;br /&gt;
=== MP3Gain ===&lt;br /&gt;
[[MP3Gain]] is an implementation of ReplayGain. It can be used to just analyze files &amp;amp; recommend changes or to also modify the gain. If modifying the gain, it always modifies the global gain fields in the MP3 audio data. It can add somewhat precise metadata, including undo info. The gain can be modified to any target dB, or it can be changed by a specified amount. For balance correction, user-specified changes can even be made on just one channel in simple L/R stereo-mode files (not joint stereo).&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]]&lt;br /&gt;
* Method: Audio + Meta (in APE tag), or Audio only&lt;br /&gt;
* APE tag fields (ASCII bytes):&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values for this file. 3 digits, zero-padded if necessary.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_ALBUM_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values across a set of files scanned as an album. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_UNDO +###,+###,N&amp;lt;/code&amp;gt; - the global gain adjustment to restore the original values in the left and right channels, respectively, followed by an indicator of whether to wrap at the extremes (&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; means no, &amp;lt;code&amp;gt;W&amp;lt;/code&amp;gt; means yes). The adjustment values are 3 digits, zero-padded, preceded by a sign (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;).&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Examples: &amp;lt;code&amp;gt;+0.424046&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-10.38500&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Example: &amp;lt;code&amp;gt;0.149923&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Optional.&lt;br /&gt;
* Limitations: Although the metadata, if written, contains precise adjustment &amp;amp; peak values, the audio data modifications are limited to 1.5dB steps and may become irreversible (however, that&#039;s a very rare condition; see the [http://www.hydrogenaudio.org/forums/lofiversion/index.php/t34154.html &amp;quot;mp3gain is NOT lossless&amp;quot; forum thread])&lt;br /&gt;
* http://mp3gain.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== AACGain ===&lt;br /&gt;
[[AACGain]] is a modified version of MP3Gain that works on both MP3 and AAC files.&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]], [[AAC]] (with or without MP4 container)&lt;br /&gt;
* Method: Audio + Meta, or Audio only&lt;br /&gt;
* Limitations: Limited to 1.5dB steps mode, may become irreversible (same caveat as for MP3Gain)&lt;br /&gt;
* http://altosdesign.com/aacgain/&lt;br /&gt;
&lt;br /&gt;
=== [[LAME]] ===&lt;br /&gt;
* Method: Header ([http://gabriel.mp3-tech.org/mp3infotag.html mp3infotag])&lt;br /&gt;
* Notes:&lt;br /&gt;
** Tags added during encoding; not supported by any player yet; Track Gain only&lt;br /&gt;
** Replay Gaining MP3&#039;s are usually done using MP3Gain (see [[ReplayGain#MP3Gain|above]]) or [[ReplayGain#foobar2000 ReplayGain scanner|foobar2000]]&lt;br /&gt;
* http://lame.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== [[Musepack]] ReplayGain ===&lt;br /&gt;
* Method: Header (similar to Meta data method)&lt;br /&gt;
* Notes: ReplayGain values are stored in the header and ReplayGain is part of the Musepack specifications; therefore any Musepack decoder that does not support ReplayGain can be considered broken.&lt;br /&gt;
* http://www.musepack.net/&lt;br /&gt;
&lt;br /&gt;
=== VorbisGain ===&lt;br /&gt;
* Format: (Ogg) [[Vorbis]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://www.sjeng.org/vorbisgain.html&lt;br /&gt;
** new compiles of VorbisGain at [http://www.rarewares.org/ogg.html www.rarewares.org]&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Andavari has provided a very useful script to integrate VorbisGain, which is a CLI tool, into Windows Explorer. Please (Ogg) [[Vorbis#Replay Gain|check this section]].&lt;br /&gt;
&lt;br /&gt;
=== FLAC / METAFLAC ===&lt;br /&gt;
* Format: [[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://flac.sf.net&lt;br /&gt;
&lt;br /&gt;
=== WavPack / WVGAIN ===&lt;br /&gt;
* Format: [[WavPack]]&lt;br /&gt;
* Method: Meta (in [[APEv2]] tag)&lt;br /&gt;
* http://www.wavpack.com&lt;br /&gt;
&lt;br /&gt;
=== Wavegain ===&lt;br /&gt;
* Format: waveform&lt;br /&gt;
* Method: Audio&lt;br /&gt;
* Limitations: Irreversible&lt;br /&gt;
* http://www.rarewares.org/files/others/wavegain.zip&lt;br /&gt;
&lt;br /&gt;
=== [[foobar2000]] ReplayGain scanner ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] (default) or [[APEv2]] tags. A separate function can be invoked to apply the tagged Track or Album Gain to the MP3 global gain fields (as MP3Gain does, but requiring tags first), and to rewrite the tags to account for the peak change and compensate for the difference from 89&amp;amp;nbsp;dB. The 89&amp;amp;nbsp;dB reference level for tags isn&#039;t configurable, but the reference level applied to the global gain fields is (it&#039;s under Preferences &amp;gt; Advanced &amp;gt; Tools &amp;gt; ReplayGain Scanner &amp;gt; Target MP3 alteration volume level).&lt;br /&gt;
** [[Musepack]]: Values written to header.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WavPack]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]: Uses its own iTunes-compatible tagging system (though iTunes does not support ReplayGain).&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** Modules ([[MOD]] etc.): Optionally saved into [[APEv2]] tags.&lt;br /&gt;
* http://foobar2000.org&lt;br /&gt;
&lt;br /&gt;
=== [[MediaMonkey]] ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[WAV]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[MPC]]: Internal gain Structure.&lt;br /&gt;
* In addition to tags, all ReplayGain values are also stored in MediaMonkey&#039;s MDB database&lt;br /&gt;
* Album/Audiophile ReplayGain not supported until v3.0 (Dec 2007); support during burning &amp;amp; ripping added in 3.1 (Jun 2009)&lt;br /&gt;
* Also capable of (irreversibly) changing the volume of MP3 tracks, similar to [[MP3Gain]]&lt;br /&gt;
* http://www.mediamonkey.com/&lt;br /&gt;
&lt;br /&gt;
=== [[Winamp]] ReplayGain scanner===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in Windows Media Audio tags.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]&lt;br /&gt;
** [[TAK]]: Values written to [[APEv2]] tags.&lt;br /&gt;
* Support Album/Track Gain&lt;br /&gt;
&lt;br /&gt;
== Players support ==&lt;br /&gt;
ReplayGain being present in the specs of FLAC, Musepack, and APE formats, any player that support those formats usually support ReplayGain.&lt;br /&gt;
&lt;br /&gt;
The situation with MP3 is rather different, as it was not part of the MP3 specs. The APEv2 tags metadata implementation is somewhat becoming the de-facto standard.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
* [[foobar2000]] supports ReplayGain in all possible aspects.&lt;br /&gt;
* [[Winamp]] supports ReplayGain in album or track mode.&lt;br /&gt;
* [[MediaMonkey]] supports track ReplayGain only&lt;br /&gt;
* [[XMPlay]] recently implemented ReplayGain&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;...and probably others.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
* [[XMMS]]. Reads ReplayGain from [[Free Lossless Audio Codec|FLAC]], [[Musepack]], (Ogg) [[Vorbis]] ..&lt;br /&gt;
:For [[MP3]], use the CVS version of the [http://xmms-mad.sourceforge.net/ xmms-mad] mp3 plugin (it&#039;s not yet released as binary, furthermore not available in distribs&#039; versions for now. Meanwhile binaries are available here: [http://perso.crans.org/~krempp/xmms-mad/ custom binaries])&lt;br /&gt;
* [[amarok]]. By using the amarok-script [http://kde-apps.org/content/show.php?content=26073 ReplayGain]&lt;br /&gt;
:And possibly others, since [http://developer.kde.org/~wheeler/taglib.html TagLib] added support for [[APEv2]] tags in [[MP3]] files, players using this library (like [[amaroK]] and [[JuK]]) might support that kind of ReplayGain tags in the near future.&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet Quod Libet] reads ReplayGain from (Ogg) [[Vorbis]], [[MP3]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:Requires support to be enabled (via the appropriate python bindings and libraries) for the above formats. Does not support ReplayGain values stored in [[APEv2]] tags in [[MP3]]s. ReplayGain values are stored in RVA2 id3v2.4 frames. See the [http://www.sacredchao.net/quodlibet/wiki/Development/ID3Notes Quod Libet RVA2 / ReplayGain notes].&lt;br /&gt;
* [http://www.musicpd.org/ Music Player Daemon] (MPD) reads ReplayGain from (Ogg) [[Vorbis]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:foobar2000-style TXXX frames in [[MP3]]s are also supported in the latest development releases.&lt;br /&gt;
* [http://www.mplayerhq.hu/ MPlayer]. Mplayer support for ReplayGain is codec dependent.&lt;br /&gt;
:Codecs that are known to support ReplayGain: vorbis&lt;br /&gt;
:Because of this, you need to prioritize the codecs that support it, or choose it individually on the command line.  To add it to the command line, add an -ac [codec] option after each file that you want to choose the codec for, or at the beginning to make it apply to all files listed.  To prioritize the codecs by default, list them in a line in mplayer.conf:&lt;br /&gt;
 ac=[codec],[othercodec],vorbis,mad,&lt;br /&gt;
&lt;br /&gt;
=== Portable devices ===&lt;br /&gt;
[http://www.rockbox.org/ Rockbox] supports ReplayGain (in album or track mode) for most formats, including  WMA, MP1/2/3, AAC, ALAC, Musepack, Monkey&#039;s Audio, Wavpack, FLAC and Vorbis.  &amp;lt;br&amp;gt;Note that ReplayGain is only supported when using the respective codec&#039;s native tagging format.  For example:  ReplayGain stored in APEv2 tags is not supported for MP3, rather ID3v2.x tags are expected.&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Fuze with firmware 1.02.26 and 2.02.26&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Clip+&lt;br /&gt;
&lt;br /&gt;
The iPod features &#039;&#039;Soundcheck&#039;&#039;, which seems to produce roughly the same normalization gains as ReplayGain, but doesn&#039;t provide an Album Gain.&lt;br /&gt;
&lt;br /&gt;
=== Hi-Fi ===&lt;br /&gt;
Slim Devices a company owned by Logitech Inc, supports ReplayGain on both of their hi-end audiophile players, known as the [[Slim Devices Transporter|Transporter]] and the [[Slim Devices Squeezebox|Squeezebox]].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;references/&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[ReplayGain specification]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Replay_Gain ReplayGain] at Wikipedia&lt;br /&gt;
* [http://www.replaygain.org/ ReplayGain - A Proposed Standard], the original proposal, now out of date with respect to current practice&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain.html ReplayGain using foobar2000] (how to use ReplayGain in Windows using foobar2000).&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain-in-Linux.html ReplayGain in Linux] (how to use ReplayGain in Linux using foobar2000 and Wine, or using metaflac or vorbisgain).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Metadata]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Replay_Gain&amp;diff=22866</id>
		<title>Replay Gain</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Replay_Gain&amp;diff=22866"/>
		<updated>2011-07-27T17:17:05Z</updated>

		<summary type="html">&lt;p&gt;Notat: name change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[ReplayGain]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Replaygain&amp;diff=22865</id>
		<title>Replaygain</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Replaygain&amp;diff=22865"/>
		<updated>2011-07-27T17:17:02Z</updated>

		<summary type="html">&lt;p&gt;Notat: name change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;ReplayGain&#039;&#039;&#039; is the name of a technique invented to achieve the same perceived playback loudness of audio files. It defines an algorithm to measure the &#039;&#039;&#039;perceived&#039;&#039;&#039; loudness of audio data.&lt;br /&gt;
&lt;br /&gt;
ReplayGain allows the loudness of each song within a collection of songs to be consistent. This is called &#039;Track Gain&#039; (or &#039;Radio Gain&#039; in earlier parlance). It also allows the loudness of a specific sub-collection (an &amp;quot;album&amp;quot;) to be consistent with the rest of the collection, while allowing the dynamics from song to song on the album to remain intact. This is called &#039;Album Gain&#039; (or &#039;Audiophile Gain&#039; in earlier parlance). This is especially important when listening to classical music albums, because quiet tracks need to remain a certain degree quieter than the louder ones.&lt;br /&gt;
&lt;br /&gt;
ReplayGain is different from [[Normalization|peak normalization]]. Peak normalization merely ensures that the peak amplitude reaches a certain level. This does not ensure equal loudness. The ReplayGain technique measures the &#039;&#039;effective power&#039;&#039; of the waveform (i.e. the RMS power after applying an &amp;quot;equal loudness contour&amp;quot;), and then adjusts the amplitude of the waveform accordingly. The result is that Replay Gained waveforms are usually more uniformly amplified then peak-normalized waveforms.&lt;br /&gt;
&lt;br /&gt;
==Target loudness==&lt;br /&gt;
The target loudness of almost all ReplayGain utilities is 89 dB SPL (an early departure from the proposal, endorsed by its author&amp;lt;ref&amp;gt;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=83397&amp;amp;view=findpost&amp;amp;p=721854 Does Replay gain work differtly in Media monkey]&amp;lt;/ref&amp;gt;) &amp;amp;mdash; the ReplayGain proposal and SMPTE recommendation are 6dB lower.&amp;lt;ref&amp;gt;[http://www.mars.org/mailman/public/mad-dev/2004-February/000993.html ReplayGain discussion at mad-dev]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clipping==&lt;br /&gt;
Audio is generally recorded such that the loudest sounds don&#039;t clip, but the use of ReplayGain can cause clipping if the average volume of a song is below the target level. That is, upon playback, the volume of a quiet song is increased, so the parts of the song with above-average loudness, especially in the bass frequencies, will exceed the limits of the format and will be distorted. Whether this distortion is audible depends on the sounds in question, and the listener&#039;s sensitivity.&lt;br /&gt;
&lt;br /&gt;
Implementations deal with the risk of clipping in different ways. Some have a &amp;quot;pre-amp&amp;quot; feature which reduces (or boosts) the original audio&#039;s level by a certain amount before doing whatever is needed for ReplayGain. Some have a &amp;quot;prevent clipping&amp;quot; feature to reduce the amount of ReplayGain adjustment to whatever amount would keep clipping from occurring, based on peak info stored in the file&#039;s metadata (thus reducing the effectiveness of ReplayGain). Some recommend using a compressor/limiter DSP to prevent or reduce clipping, regardless of whether it was caused by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
There are different ReplayGain implementations, each with its own uses and strength. Most use [[metadata]] to indicate the level of the volume change that the player should make. Some modify the audio data itself, and optionally use metadata as well. There are advantages and disadvantages to both methods.&lt;br /&gt;
&lt;br /&gt;
In the metadata method, information on both types of ReplayGain (Track Gain and Album Gain) can be stored. The volume-change information can be very precise. If audio data was also changed, the metadata can contain &amp;quot;undo&amp;quot; info. Not all audio players/decoders know how to read and use ReplayGain information stored in metadata. And there&#039;s no standard for where and how ReplayGain info is stored; each implementation uses different formats and puts the info in different locations.&lt;br /&gt;
&lt;br /&gt;
In the audio data method, the file&#039;s actual audio data is modified so that its natural/default playback volume is at the target level. In this scenario, only one type of ReplayGain (Track Gain or Album Gain) can be applied. If no &amp;quot;undo&amp;quot; info is saved somewhere, it may not be possible to restore the original audio data. Limitations of the audio file format may prevent precise (finely tuned) gain adjustments with this method. For example, MP3 and AAC files can only be losslessly modified in 1.5 dB steps. Depending on the audio file format, the process may also be lossy in the sense that it could irreversibly push a signal above the format&#039;s maximum amplitude (resulting in clipping) or below the minimum (resulting in silence).&lt;br /&gt;
&lt;br /&gt;
=== MP3Gain ===&lt;br /&gt;
[[MP3Gain]] is an implementation of ReplayGain. It can be used to just analyze files &amp;amp; recommend changes or to also modify the gain. If modifying the gain, it always modifies the global gain fields in the MP3 audio data. It can add somewhat precise metadata, including undo info. The gain can be modified to any target dB, or it can be changed by a specified amount. For balance correction, user-specified changes can even be made on just one channel in simple L/R stereo-mode files (not joint stereo).&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]]&lt;br /&gt;
* Method: Audio + Meta (in APE tag), or Audio only&lt;br /&gt;
* APE tag fields (ASCII bytes):&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values for this file. 3 digits, zero-padded if necessary.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_ALBUM_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values across a set of files scanned as an album. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_UNDO +###,+###,N&amp;lt;/code&amp;gt; - the global gain adjustment to restore the original values in the left and right channels, respectively, followed by an indicator of whether to wrap at the extremes (&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; means no, &amp;lt;code&amp;gt;W&amp;lt;/code&amp;gt; means yes). The adjustment values are 3 digits, zero-padded, preceded by a sign (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;).&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Examples: &amp;lt;code&amp;gt;+0.424046&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-10.38500&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Example: &amp;lt;code&amp;gt;0.149923&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Optional.&lt;br /&gt;
* Limitations: Although the metadata, if written, contains precise adjustment &amp;amp; peak values, the audio data modifications are limited to 1.5dB steps and may become irreversible (however, that&#039;s a very rare condition; see the [http://www.hydrogenaudio.org/forums/lofiversion/index.php/t34154.html &amp;quot;mp3gain is NOT lossless&amp;quot; forum thread])&lt;br /&gt;
* http://mp3gain.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== AACGain ===&lt;br /&gt;
[[AACGain]] is a modified version of MP3Gain that works on both MP3 and AAC files.&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]], [[AAC]] (with or without MP4 container)&lt;br /&gt;
* Method: Audio + Meta, or Audio only&lt;br /&gt;
* Limitations: Limited to 1.5dB steps mode, may become irreversible (same caveat as for MP3Gain)&lt;br /&gt;
* http://altosdesign.com/aacgain/&lt;br /&gt;
&lt;br /&gt;
=== [[LAME]] ===&lt;br /&gt;
* Method: Header ([http://gabriel.mp3-tech.org/mp3infotag.html mp3infotag])&lt;br /&gt;
* Notes:&lt;br /&gt;
** Tags added during encoding; not supported by any player yet; Track Gain only&lt;br /&gt;
** Replay Gaining MP3&#039;s are usually done using MP3Gain (see [[ReplayGain#MP3Gain|above]]) or [[ReplayGain#foobar2000 ReplayGain scanner|foobar2000]]&lt;br /&gt;
* http://lame.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== [[Musepack]] ReplayGain ===&lt;br /&gt;
* Method: Header (similar to Meta data method)&lt;br /&gt;
* Notes: ReplayGain values are stored in the header and ReplayGain is part of the Musepack specifications; therefore any Musepack decoder that does not support ReplayGain can be considered broken.&lt;br /&gt;
* http://www.musepack.net/&lt;br /&gt;
&lt;br /&gt;
=== VorbisGain ===&lt;br /&gt;
* Format: (Ogg) [[Vorbis]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://www.sjeng.org/vorbisgain.html&lt;br /&gt;
** new compiles of VorbisGain at [http://www.rarewares.org/ogg.html www.rarewares.org]&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Andavari has provided a very useful script to integrate VorbisGain, which is a CLI tool, into Windows Explorer. Please (Ogg) [[Vorbis#Replay Gain|check this section]].&lt;br /&gt;
&lt;br /&gt;
=== FLAC / METAFLAC ===&lt;br /&gt;
* Format: [[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://flac.sf.net&lt;br /&gt;
&lt;br /&gt;
=== WavPack / WVGAIN ===&lt;br /&gt;
* Format: [[WavPack]]&lt;br /&gt;
* Method: Meta (in [[APEv2]] tag)&lt;br /&gt;
* http://www.wavpack.com&lt;br /&gt;
&lt;br /&gt;
=== Wavegain ===&lt;br /&gt;
* Format: waveform&lt;br /&gt;
* Method: Audio&lt;br /&gt;
* Limitations: Irreversible&lt;br /&gt;
* http://www.rarewares.org/files/others/wavegain.zip&lt;br /&gt;
&lt;br /&gt;
=== [[foobar2000]] ReplayGain scanner ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] (default) or [[APEv2]] tags. A separate function can be invoked to apply the tagged Track or Album Gain to the MP3 global gain fields (as MP3Gain does, but requiring tags first), and to rewrite the tags to account for the peak change and compensate for the difference from 89&amp;amp;nbsp;dB. The 89&amp;amp;nbsp;dB reference level for tags isn&#039;t configurable, but the reference level applied to the global gain fields is (it&#039;s under Preferences &amp;gt; Advanced &amp;gt; Tools &amp;gt; ReplayGain Scanner &amp;gt; Target MP3 alteration volume level).&lt;br /&gt;
** [[Musepack]]: Values written to header.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WavPack]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]: Uses its own iTunes-compatible tagging system (though iTunes does not support ReplayGain).&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** Modules ([[MOD]] etc.): Optionally saved into [[APEv2]] tags.&lt;br /&gt;
* http://foobar2000.org&lt;br /&gt;
&lt;br /&gt;
=== [[MediaMonkey]] ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[WAV]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[MPC]]: Internal gain Structure.&lt;br /&gt;
* In addition to tags, all ReplayGain values are also stored in MediaMonkey&#039;s MDB database&lt;br /&gt;
* Album/Audiophile ReplayGain not supported until v3.0 (Dec 2007); support during burning &amp;amp; ripping added in 3.1 (Jun 2009)&lt;br /&gt;
* Also capable of (irreversibly) changing the volume of MP3 tracks, similar to [[MP3Gain]]&lt;br /&gt;
* http://www.mediamonkey.com/&lt;br /&gt;
&lt;br /&gt;
=== [[Winamp]] ReplayGain scanner===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in Windows Media Audio tags.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]&lt;br /&gt;
** [[TAK]]: Values written to [[APEv2]] tags.&lt;br /&gt;
* Support Album/Track Gain&lt;br /&gt;
&lt;br /&gt;
== Players support ==&lt;br /&gt;
ReplayGain being present in the specs of FLAC, Musepack, and APE formats, any player that support those formats usually support ReplayGain.&lt;br /&gt;
&lt;br /&gt;
The situation with MP3 is rather different, as it was not part of the MP3 specs. The APEv2 tags metadata implementation is somewhat becoming the de-facto standard.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
* [[foobar2000]] supports ReplayGain in all possible aspects.&lt;br /&gt;
* [[Winamp]] supports ReplayGain in album or track mode.&lt;br /&gt;
* [[MediaMonkey]] supports track ReplayGain only&lt;br /&gt;
* [[XMPlay]] recently implemented ReplayGain&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;...and probably others.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
* [[XMMS]]. Reads ReplayGain from [[Free Lossless Audio Codec|FLAC]], [[Musepack]], (Ogg) [[Vorbis]] ..&lt;br /&gt;
:For [[MP3]], use the CVS version of the [http://xmms-mad.sourceforge.net/ xmms-mad] mp3 plugin (it&#039;s not yet released as binary, furthermore not available in distribs&#039; versions for now. Meanwhile binaries are available here: [http://perso.crans.org/~krempp/xmms-mad/ custom binaries])&lt;br /&gt;
* [[amarok]]. By using the amarok-script [http://kde-apps.org/content/show.php?content=26073 ReplayGain]&lt;br /&gt;
:And possibly others, since [http://developer.kde.org/~wheeler/taglib.html TagLib] added support for [[APEv2]] tags in [[MP3]] files, players using this library (like [[amaroK]] and [[JuK]]) might support that kind of ReplayGain tags in the near future.&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet Quod Libet] reads ReplayGain from (Ogg) [[Vorbis]], [[MP3]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:Requires support to be enabled (via the appropriate python bindings and libraries) for the above formats. Does not support ReplayGain values stored in [[APEv2]] tags in [[MP3]]s. ReplayGain values are stored in RVA2 id3v2.4 frames. See the [http://www.sacredchao.net/quodlibet/wiki/Development/ID3Notes Quod Libet RVA2 / ReplayGain notes].&lt;br /&gt;
* [http://www.musicpd.org/ Music Player Daemon] (MPD) reads ReplayGain from (Ogg) [[Vorbis]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:foobar2000-style TXXX frames in [[MP3]]s are also supported in the latest development releases.&lt;br /&gt;
* [http://www.mplayerhq.hu/ MPlayer]. Mplayer support for ReplayGain is codec dependent.&lt;br /&gt;
:Codecs that are known to support ReplayGain: vorbis&lt;br /&gt;
:Because of this, you need to prioritize the codecs that support it, or choose it individually on the command line.  To add it to the command line, add an -ac [codec] option after each file that you want to choose the codec for, or at the beginning to make it apply to all files listed.  To prioritize the codecs by default, list them in a line in mplayer.conf:&lt;br /&gt;
 ac=[codec],[othercodec],vorbis,mad,&lt;br /&gt;
&lt;br /&gt;
=== Portable devices ===&lt;br /&gt;
[http://www.rockbox.org/ Rockbox] supports ReplayGain (in album or track mode) for most formats, including  WMA, MP1/2/3, AAC, ALAC, Musepack, Monkey&#039;s Audio, Wavpack, FLAC and Vorbis.  &amp;lt;br&amp;gt;Note that ReplayGain is only supported when using the respective codec&#039;s native tagging format.  For example:  ReplayGain stored in APEv2 tags is not supported for MP3, rather ID3v2.x tags are expected.&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Fuze with firmware 1.02.26 and 2.02.26&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Clip+&lt;br /&gt;
&lt;br /&gt;
The iPod features &#039;&#039;Soundcheck&#039;&#039;, which seems to produce roughly the same normalization gains as ReplayGain, but doesn&#039;t provide an Album Gain.&lt;br /&gt;
&lt;br /&gt;
=== Hi-Fi ===&lt;br /&gt;
Slim Devices a company owned by Logitech Inc, supports ReplayGain on both of their hi-end audiophile players, known as the [[Slim Devices Transporter|Transporter]] and the [[Slim Devices Squeezebox|Squeezebox]].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;references/&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[ReplayGain specification]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Replay_Gain ReplayGain] at Wikipedia&lt;br /&gt;
* [http://www.replaygain.org/ ReplayGain - A Proposed Standard], the original proposal, now out of date with respect to current practice&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain.html ReplayGain using foobar2000] (how to use ReplayGain in Windows using foobar2000).&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain-in-Linux.html ReplayGain in Linux] (how to use ReplayGain in Linux using foobar2000 and Wine, or using metaflac or vorbisgain).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Metadata]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Replay_Gain&amp;diff=22864</id>
		<title>Replay Gain</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Replay_Gain&amp;diff=22864"/>
		<updated>2011-07-27T17:14:56Z</updated>

		<summary type="html">&lt;p&gt;Notat: Replay Gain -&amp;gt; ReplayGain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;ReplayGain&#039;&#039;&#039; is the name of a technique invented to achieve the same perceived playback loudness of audio files. It defines an algorithm to measure the &#039;&#039;&#039;perceived&#039;&#039;&#039; loudness of audio data.&lt;br /&gt;
&lt;br /&gt;
ReplayGain allows the loudness of each song within a collection of songs to be consistent. This is called &#039;Track Gain&#039; (or &#039;Radio Gain&#039; in earlier parlance). It also allows the loudness of a specific sub-collection (an &amp;quot;album&amp;quot;) to be consistent with the rest of the collection, while allowing the dynamics from song to song on the album to remain intact. This is called &#039;Album Gain&#039; (or &#039;Audiophile Gain&#039; in earlier parlance). This is especially important when listening to classical music albums, because quiet tracks need to remain a certain degree quieter than the louder ones.&lt;br /&gt;
&lt;br /&gt;
ReplayGain is different from [[Normalization|peak normalization]]. Peak normalization merely ensures that the peak amplitude reaches a certain level. This does not ensure equal loudness. The ReplayGain technique measures the &#039;&#039;effective power&#039;&#039; of the waveform (i.e. the RMS power after applying an &amp;quot;equal loudness contour&amp;quot;), and then adjusts the amplitude of the waveform accordingly. The result is that Replay Gained waveforms are usually more uniformly amplified then peak-normalized waveforms.&lt;br /&gt;
&lt;br /&gt;
==Target loudness==&lt;br /&gt;
The target loudness of almost all ReplayGain utilities is 89 dB SPL (an early departure from the proposal, endorsed by its author&amp;lt;ref&amp;gt;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=83397&amp;amp;view=findpost&amp;amp;p=721854 Does Replay gain work differtly in Media monkey]&amp;lt;/ref&amp;gt;) &amp;amp;mdash; the ReplayGain proposal and SMPTE recommendation are 6dB lower.&amp;lt;ref&amp;gt;[http://www.mars.org/mailman/public/mad-dev/2004-February/000993.html ReplayGain discussion at mad-dev]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clipping==&lt;br /&gt;
Audio is generally recorded such that the loudest sounds don&#039;t clip, but the use of ReplayGain can cause clipping if the average volume of a song is below the target level. That is, upon playback, the volume of a quiet song is increased, so the parts of the song with above-average loudness, especially in the bass frequencies, will exceed the limits of the format and will be distorted. Whether this distortion is audible depends on the sounds in question, and the listener&#039;s sensitivity.&lt;br /&gt;
&lt;br /&gt;
Implementations deal with the risk of clipping in different ways. Some have a &amp;quot;pre-amp&amp;quot; feature which reduces (or boosts) the original audio&#039;s level by a certain amount before doing whatever is needed for ReplayGain. Some have a &amp;quot;prevent clipping&amp;quot; feature to reduce the amount of ReplayGain adjustment to whatever amount would keep clipping from occurring, based on peak info stored in the file&#039;s metadata (thus reducing the effectiveness of ReplayGain). Some recommend using a compressor/limiter DSP to prevent or reduce clipping, regardless of whether it was caused by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
There are different ReplayGain implementations, each with its own uses and strength. Most use [[metadata]] to indicate the level of the volume change that the player should make. Some modify the audio data itself, and optionally use metadata as well. There are advantages and disadvantages to both methods.&lt;br /&gt;
&lt;br /&gt;
In the metadata method, information on both types of ReplayGain (Track Gain and Album Gain) can be stored. The volume-change information can be very precise. If audio data was also changed, the metadata can contain &amp;quot;undo&amp;quot; info. Not all audio players/decoders know how to read and use ReplayGain information stored in metadata. And there&#039;s no standard for where and how ReplayGain info is stored; each implementation uses different formats and puts the info in different locations.&lt;br /&gt;
&lt;br /&gt;
In the audio data method, the file&#039;s actual audio data is modified so that its natural/default playback volume is at the target level. In this scenario, only one type of ReplayGain (Track Gain or Album Gain) can be applied. If no &amp;quot;undo&amp;quot; info is saved somewhere, it may not be possible to restore the original audio data. Limitations of the audio file format may prevent precise (finely tuned) gain adjustments with this method. For example, MP3 and AAC files can only be losslessly modified in 1.5 dB steps. Depending on the audio file format, the process may also be lossy in the sense that it could irreversibly push a signal above the format&#039;s maximum amplitude (resulting in clipping) or below the minimum (resulting in silence).&lt;br /&gt;
&lt;br /&gt;
=== MP3Gain ===&lt;br /&gt;
[[MP3Gain]] is an implementation of ReplayGain. It can be used to just analyze files &amp;amp; recommend changes or to also modify the gain. If modifying the gain, it always modifies the global gain fields in the MP3 audio data. It can add somewhat precise metadata, including undo info. The gain can be modified to any target dB, or it can be changed by a specified amount. For balance correction, user-specified changes can even be made on just one channel in simple L/R stereo-mode files (not joint stereo).&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]]&lt;br /&gt;
* Method: Audio + Meta (in APE tag), or Audio only&lt;br /&gt;
* APE tag fields (ASCII bytes):&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values for this file. 3 digits, zero-padded if necessary.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_ALBUM_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values across a set of files scanned as an album. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_UNDO +###,+###,N&amp;lt;/code&amp;gt; - the global gain adjustment to restore the original values in the left and right channels, respectively, followed by an indicator of whether to wrap at the extremes (&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; means no, &amp;lt;code&amp;gt;W&amp;lt;/code&amp;gt; means yes). The adjustment values are 3 digits, zero-padded, preceded by a sign (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;).&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Examples: &amp;lt;code&amp;gt;+0.424046&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-10.38500&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Example: &amp;lt;code&amp;gt;0.149923&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Optional.&lt;br /&gt;
* Limitations: Although the metadata, if written, contains precise adjustment &amp;amp; peak values, the audio data modifications are limited to 1.5dB steps and may become irreversible (however, that&#039;s a very rare condition; see the [http://www.hydrogenaudio.org/forums/lofiversion/index.php/t34154.html &amp;quot;mp3gain is NOT lossless&amp;quot; forum thread])&lt;br /&gt;
* http://mp3gain.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== AACGain ===&lt;br /&gt;
[[AACGain]] is a modified version of MP3Gain that works on both MP3 and AAC files.&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]], [[AAC]] (with or without MP4 container)&lt;br /&gt;
* Method: Audio + Meta, or Audio only&lt;br /&gt;
* Limitations: Limited to 1.5dB steps mode, may become irreversible (same caveat as for MP3Gain)&lt;br /&gt;
* http://altosdesign.com/aacgain/&lt;br /&gt;
&lt;br /&gt;
=== [[LAME]] ===&lt;br /&gt;
* Method: Header ([http://gabriel.mp3-tech.org/mp3infotag.html mp3infotag])&lt;br /&gt;
* Notes:&lt;br /&gt;
** Tags added during encoding; not supported by any player yet; Track Gain only&lt;br /&gt;
** Replay Gaining MP3&#039;s are usually done using MP3Gain (see [[ReplayGain#MP3Gain|above]]) or [[ReplayGain#foobar2000 ReplayGain scanner|foobar2000]]&lt;br /&gt;
* http://lame.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== [[Musepack]] ReplayGain ===&lt;br /&gt;
* Method: Header (similar to Meta data method)&lt;br /&gt;
* Notes: ReplayGain values are stored in the header and ReplayGain is part of the Musepack specifications; therefore any Musepack decoder that does not support ReplayGain can be considered broken.&lt;br /&gt;
* http://www.musepack.net/&lt;br /&gt;
&lt;br /&gt;
=== VorbisGain ===&lt;br /&gt;
* Format: (Ogg) [[Vorbis]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://www.sjeng.org/vorbisgain.html&lt;br /&gt;
** new compiles of VorbisGain at [http://www.rarewares.org/ogg.html www.rarewares.org]&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Andavari has provided a very useful script to integrate VorbisGain, which is a CLI tool, into Windows Explorer. Please (Ogg) [[Vorbis#Replay Gain|check this section]].&lt;br /&gt;
&lt;br /&gt;
=== FLAC / METAFLAC ===&lt;br /&gt;
* Format: [[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://flac.sf.net&lt;br /&gt;
&lt;br /&gt;
=== WavPack / WVGAIN ===&lt;br /&gt;
* Format: [[WavPack]]&lt;br /&gt;
* Method: Meta (in [[APEv2]] tag)&lt;br /&gt;
* http://www.wavpack.com&lt;br /&gt;
&lt;br /&gt;
=== Wavegain ===&lt;br /&gt;
* Format: waveform&lt;br /&gt;
* Method: Audio&lt;br /&gt;
* Limitations: Irreversible&lt;br /&gt;
* http://www.rarewares.org/files/others/wavegain.zip&lt;br /&gt;
&lt;br /&gt;
=== [[foobar2000]] ReplayGain scanner ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] (default) or [[APEv2]] tags. A separate function can be invoked to apply the tagged Track or Album Gain to the MP3 global gain fields (as MP3Gain does, but requiring tags first), and to rewrite the tags to account for the peak change and compensate for the difference from 89&amp;amp;nbsp;dB. The 89&amp;amp;nbsp;dB reference level for tags isn&#039;t configurable, but the reference level applied to the global gain fields is (it&#039;s under Preferences &amp;gt; Advanced &amp;gt; Tools &amp;gt; ReplayGain Scanner &amp;gt; Target MP3 alteration volume level).&lt;br /&gt;
** [[Musepack]]: Values written to header.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WavPack]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]: Uses its own iTunes-compatible tagging system (though iTunes does not support ReplayGain).&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** Modules ([[MOD]] etc.): Optionally saved into [[APEv2]] tags.&lt;br /&gt;
* http://foobar2000.org&lt;br /&gt;
&lt;br /&gt;
=== [[MediaMonkey]] ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[WAV]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[MPC]]: Internal gain Structure.&lt;br /&gt;
* In addition to tags, all ReplayGain values are also stored in MediaMonkey&#039;s MDB database&lt;br /&gt;
* Album/Audiophile ReplayGain not supported until v3.0 (Dec 2007); support during burning &amp;amp; ripping added in 3.1 (Jun 2009)&lt;br /&gt;
* Also capable of (irreversibly) changing the volume of MP3 tracks, similar to [[MP3Gain]]&lt;br /&gt;
* http://www.mediamonkey.com/&lt;br /&gt;
&lt;br /&gt;
=== [[Winamp]] ReplayGain scanner===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in Windows Media Audio tags.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]&lt;br /&gt;
** [[TAK]]: Values written to [[APEv2]] tags.&lt;br /&gt;
* Support Album/Track Gain&lt;br /&gt;
&lt;br /&gt;
== Players support ==&lt;br /&gt;
ReplayGain being present in the specs of FLAC, Musepack, and APE formats, any player that support those formats usually support ReplayGain.&lt;br /&gt;
&lt;br /&gt;
The situation with MP3 is rather different, as it was not part of the MP3 specs. The APEv2 tags metadata implementation is somewhat becoming the de-facto standard.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
* [[foobar2000]] supports ReplayGain in all possible aspects.&lt;br /&gt;
* [[Winamp]] supports ReplayGain in album or track mode.&lt;br /&gt;
* [[MediaMonkey]] supports track ReplayGain only&lt;br /&gt;
* [[XMPlay]] recently implemented ReplayGain&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;...and probably others.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
* [[XMMS]]. Reads ReplayGain from [[Free Lossless Audio Codec|FLAC]], [[Musepack]], (Ogg) [[Vorbis]] ..&lt;br /&gt;
:For [[MP3]], use the CVS version of the [http://xmms-mad.sourceforge.net/ xmms-mad] mp3 plugin (it&#039;s not yet released as binary, furthermore not available in distribs&#039; versions for now. Meanwhile binaries are available here: [http://perso.crans.org/~krempp/xmms-mad/ custom binaries])&lt;br /&gt;
* [[amarok]]. By using the amarok-script [http://kde-apps.org/content/show.php?content=26073 ReplayGain]&lt;br /&gt;
:And possibly others, since [http://developer.kde.org/~wheeler/taglib.html TagLib] added support for [[APEv2]] tags in [[MP3]] files, players using this library (like [[amaroK]] and [[JuK]]) might support that kind of ReplayGain tags in the near future.&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet Quod Libet] reads ReplayGain from (Ogg) [[Vorbis]], [[MP3]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:Requires support to be enabled (via the appropriate python bindings and libraries) for the above formats. Does not support ReplayGain values stored in [[APEv2]] tags in [[MP3]]s. ReplayGain values are stored in RVA2 id3v2.4 frames. See the [http://www.sacredchao.net/quodlibet/wiki/Development/ID3Notes Quod Libet RVA2 / ReplayGain notes].&lt;br /&gt;
* [http://www.musicpd.org/ Music Player Daemon] (MPD) reads ReplayGain from (Ogg) [[Vorbis]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:foobar2000-style TXXX frames in [[MP3]]s are also supported in the latest development releases.&lt;br /&gt;
* [http://www.mplayerhq.hu/ MPlayer]. Mplayer support for ReplayGain is codec dependent.&lt;br /&gt;
:Codecs that are known to support ReplayGain: vorbis&lt;br /&gt;
:Because of this, you need to prioritize the codecs that support it, or choose it individually on the command line.  To add it to the command line, add an -ac [codec] option after each file that you want to choose the codec for, or at the beginning to make it apply to all files listed.  To prioritize the codecs by default, list them in a line in mplayer.conf:&lt;br /&gt;
 ac=[codec],[othercodec],vorbis,mad,&lt;br /&gt;
&lt;br /&gt;
=== Portable devices ===&lt;br /&gt;
[http://www.rockbox.org/ Rockbox] supports ReplayGain (in album or track mode) for most formats, including  WMA, MP1/2/3, AAC, ALAC, Musepack, Monkey&#039;s Audio, Wavpack, FLAC and Vorbis.  &amp;lt;br&amp;gt;Note that ReplayGain is only supported when using the respective codec&#039;s native tagging format.  For example:  ReplayGain stored in APEv2 tags is not supported for MP3, rather ID3v2.x tags are expected.&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Fuze with firmware 1.02.26 and 2.02.26&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Clip+&lt;br /&gt;
&lt;br /&gt;
The iPod features &#039;&#039;Soundcheck&#039;&#039;, which seems to produce roughly the same normalization gains as ReplayGain, but doesn&#039;t provide an Album Gain.&lt;br /&gt;
&lt;br /&gt;
=== Hi-Fi ===&lt;br /&gt;
Slim Devices a company owned by Logitech Inc, supports ReplayGain on both of their hi-end audiophile players, known as the [[Slim Devices Transporter|Transporter]] and the [[Slim Devices Squeezebox|Squeezebox]].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;references/&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[ReplayGain specification]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Replay_Gain ReplayGain] at Wikipedia&lt;br /&gt;
* [http://www.replaygain.org/ ReplayGain - A Proposed Standard], the original proposal, now out of date with respect to current practice&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain.html ReplayGain using foobar2000] (how to use ReplayGain in Windows using foobar2000).&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain-in-Linux.html ReplayGain in Linux] (how to use ReplayGain in Linux using foobar2000 and Wine, or using metaflac or vorbisgain).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Metadata]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Talk:ReplayGain_specification&amp;diff=22862</id>
		<title>Talk:ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Talk:ReplayGain_specification&amp;diff=22862"/>
		<updated>2011-07-23T16:35:37Z</updated>

		<summary type="html">&lt;p&gt;Notat: moved Talk:ReplayGain specification to Talk:ReplayGain 1.0 specification:&amp;amp;#32;Add version number&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:ReplayGain 1.0 specification]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Talk:Original_ReplayGain_specification&amp;diff=22861</id>
		<title>Talk:Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Talk:Original_ReplayGain_specification&amp;diff=22861"/>
		<updated>2011-07-23T16:35:37Z</updated>

		<summary type="html">&lt;p&gt;Notat: moved Talk:ReplayGain specification to Talk:ReplayGain 1.0 specification:&amp;amp;#32;Add version number&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Musepack ==&lt;br /&gt;
&lt;br /&gt;
Hi, there is an inaccuracy about Musepack files. Although they use APEv2 for metadata, replaygain is stored in the file header by specification, see [http://trac.musepack.net/trac/wiki/SV8Specification here]. Actually, this is the first format introducing APEv2 tags and native replaygain support.&lt;br /&gt;
So, every musepack compliant player must read the RG data from the header rather then APEv2.&lt;br /&gt;
[[User:Antonski|Antonski]] 14:19, 4 May 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=ReplayGain_specification&amp;diff=22860</id>
		<title>ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=ReplayGain_specification&amp;diff=22860"/>
		<updated>2011-07-23T16:35:37Z</updated>

		<summary type="html">&lt;p&gt;Notat: moved ReplayGain specification to ReplayGain 1.0 specification:&amp;amp;#32;Add version number&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[ReplayGain 1.0 specification]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22859</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22859"/>
		<updated>2011-07-23T16:35:37Z</updated>

		<summary type="html">&lt;p&gt;Notat: moved ReplayGain specification to ReplayGain 1.0 specification:&amp;amp;#32;Add version number&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=22858</id>
		<title>Revised ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Revised_ReplayGain_specification&amp;diff=22858"/>
		<updated>2011-07-23T16:31:41Z</updated>

		<summary type="html">&lt;p&gt;Notat: Created page with &amp;quot;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all r…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22690</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22690"/>
		<updated>2011-05-10T15:34:43Z</updated>

		<summary type="html">&lt;p&gt;Notat: /* Reference level */ spell out small ordinals&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to two channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22689</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22689"/>
		<updated>2011-05-10T15:33:52Z</updated>

		<summary type="html">&lt;p&gt;Notat: /* Reference level */ grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, ReplayGain is calibrated to 2 channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22688</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22688"/>
		<updated>2011-05-10T15:31:29Z</updated>

		<summary type="html">&lt;p&gt;Notat: /* Statistical processing */ punctuation around note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%,&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt; so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, in ReplayGain calibrates to 2 channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22687</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22687"/>
		<updated>2011-05-10T15:29:06Z</updated>

		<summary type="html">&lt;p&gt;Notat: /* Loudness filter */ legend&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz (Figure 1 [green]). The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt;, so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, in ReplayGain calibrates to 2 channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22654</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22654"/>
		<updated>2011-05-10T13:01:08Z</updated>

		<summary type="html">&lt;p&gt;Notat: /* Acknowledgements */ update link to original proposal&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz. The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt;, so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, in ReplayGain calibrates to 2 channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org/proposal original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Replay_Gain&amp;diff=22506</id>
		<title>Replay Gain</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Replay_Gain&amp;diff=22506"/>
		<updated>2011-04-15T15:04:21Z</updated>

		<summary type="html">&lt;p&gt;Notat: new specification is complete&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Replay Gain&#039;&#039;&#039; is the name of a technique invented to achieve the same perceived playback loudness of audio files. It defines an algorithm to measure the &#039;&#039;&#039;perceived&#039;&#039;&#039; loudness of audio data.&lt;br /&gt;
&lt;br /&gt;
Replay Gain allows the loudness of each song within a collection of songs to be consistent. This is called &#039;Track Gain&#039;(or &#039;Radio Gain&#039; in earlier parlance). It also allows the loudness of a specific sub-collection (an &amp;quot;album&amp;quot;) to be consistent with the rest of the collection, while allowing the dynamics from song to song on the album to remain intact. This is called &#039;Album Gain&#039; (or &#039;Audiophile Gain&#039; in earlier parlance). This is especially important when listening to classical music albums, because quiet tracks need to remain a certain degree quieter than the louder ones.&lt;br /&gt;
&lt;br /&gt;
Replay Gain is different from [[Normalization|peak normalization]]. Peak normalization merely ensures that the peak amplitude reaches a certain level. This does not ensure equal loudness. The Replay Gain technique measures the &#039;&#039;effective power&#039;&#039; of the waveform (i.e. the RMS power after applying an &amp;quot;equal loudness contour&amp;quot;), and then adjusts the amplitude of the waveform accordingly. The result is that Replay Gained waveforms are usually more uniformly amplified then peak-normalized waveforms.&lt;br /&gt;
&lt;br /&gt;
==Target loudness==&lt;br /&gt;
The target loudness of almost all Replay Gain utilities is 89 dB SPL (an early departure from the proposal, endorsed by its author&amp;lt;ref&amp;gt;[http://www.hydrogenaudio.org/forums/index.php?s=&amp;amp;showtopic=83397&amp;amp;view=findpost&amp;amp;p=721854 Does Replay gain work differtly in Media monkey]&amp;lt;/ref&amp;gt;) &amp;amp;mdash; the Replay Gain proposal and SMPTE recommendation are 6dB lower.&amp;lt;ref&amp;gt;[http://www.mars.org/mailman/public/mad-dev/2004-February/000993.html Replay Gain discussion at mad-dev]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Clipping==&lt;br /&gt;
Audio is generally recorded such that the loudest sounds don&#039;t clip, but the use of Replay Gain can cause clipping if the average volume of a song is below the target level. That is, upon playback, the volume of a quiet song is increased, so the parts of the song with above-average loudness, especially in the bass frequencies, will exceed the limits of the format and will be distorted. Whether this distortion is audible depends on the sounds in question, and the listener&#039;s sensitivity.&lt;br /&gt;
&lt;br /&gt;
Implementations deal with the risk of clipping in different ways. Some have a &amp;quot;pre-amp&amp;quot; feature which reduces (or boosts) the original audio&#039;s level by a certain amount before doing whatever is needed for Replay Gain. Some have a &amp;quot;prevent clipping&amp;quot; feature to reduce the amount of Replay Gain adjustment to whatever amount would keep clipping from occurring, based on peak info stored in the file&#039;s metadata (thus reducing the effectiveness of Replay Gain). Some recommend using a compressor/limiter DSP to prevent or reduce clipping, regardless of whether it was caused by Replay Gain.&lt;br /&gt;
&lt;br /&gt;
== Implementations ==&lt;br /&gt;
There are different Replay Gain implementations, each with its own uses and strength. Most use [[metadata]] to indicate the level of the volume change that the player should make. Some modify the audio data itself, and optionally use metadata as well. There are advantages and disadvantages to both methods.&lt;br /&gt;
&lt;br /&gt;
In the metadata method, information on both types of Replay Gain (Track Gain and Album Gain) can be stored. The volume-change information can be very precise. If audio data was also changed, the metadata can contain &amp;quot;undo&amp;quot; info. Not all audio players/decoders know how to read and use Replay Gain information stored in metadata. And there&#039;s no standard for where and how Replay Gain info is stored; each implementation uses different formats and puts the info in different locations.&lt;br /&gt;
&lt;br /&gt;
In the audio data method, the file&#039;s actual audio data is modified so that its natural/default playback volume is at the target level. In this scenario, only one type of Replay Gain (Track Gain or Album Gain) can be applied. If no &amp;quot;undo&amp;quot; info is saved somewhere, it may not be possible to restore the original audio data. Limitations of the audio file format may prevent precise (finely tuned) gain adjustments with this method. For example, MP3 and AAC files can only be losslessly modified in 1.5 dB steps. Depending on the audio file format, the process may also be lossy in the sense that it could irreversibly push a signal above the format&#039;s maximum amplitude (resulting in clipping) or below the minimum (resulting in silence).&lt;br /&gt;
&lt;br /&gt;
=== MP3Gain ===&lt;br /&gt;
[[MP3Gain]] is an implementation of Replay Gain. It can be used to just analyze files &amp;amp; recommend changes or to also modify the gain. If modifying the gain, it always modifies the global gain fields in the MP3 audio data. It can add somewhat precise metadata, including undo info. The gain can be modified to any target dB, or it can be changed by a specified amount. For balance correction, user-specified changes can even be made on just one channel in simple L/R stereo-mode files (not joint stereo).&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]]&lt;br /&gt;
* Method: Audio + Meta (in APE tag), or Audio only&lt;br /&gt;
* APE tag fields (ASCII bytes):&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values for this file. 3 digits, zero-padded if necessary.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_ALBUM_MINMAX ###,###&amp;lt;/code&amp;gt; - minimum &amp;amp; maximum global gain values across a set of files scanned as an album. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;MP3GAIN_UNDO +###,+###,N&amp;lt;/code&amp;gt; - the global gain adjustment to restore the original values in the left and right channels, respectively, followed by an indicator of whether to wrap at the extremes (&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; means no, &amp;lt;code&amp;gt;W&amp;lt;/code&amp;gt; means yes). The adjustment values are 3 digits, zero-padded, preceded by a sign (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;).&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Examples: &amp;lt;code&amp;gt;+0.424046&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-10.38500&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_TRACK_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Example: &amp;lt;code&amp;gt;0.149923&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_GAIN +#.###### dB&amp;lt;/code&amp;gt; - The value is always 9 characters including the sign and decimal point. Optional.&lt;br /&gt;
** &amp;lt;code&amp;gt;REPLAYGAIN_ALBUM_PEAK #.###### dB&amp;lt;/code&amp;gt; - The value is always 8 characters including the decimal point. Optional.&lt;br /&gt;
* Limitations: Although the metadata, if written, contains precise adjustment &amp;amp; peak values, the audio data modifications are limited to 1.5dB steps and may become irreversible (however, that&#039;s a very rare condition; see the [http://www.hydrogenaudio.org/forums/lofiversion/index.php/t34154.html &amp;quot;mp3gain is NOT lossless&amp;quot; forum thread])&lt;br /&gt;
* http://mp3gain.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== AACGain ===&lt;br /&gt;
[[AACGain]] is a modified version of MP3Gain that works on both MP3 and AAC files.&lt;br /&gt;
&lt;br /&gt;
* Format: [[MP3]], [[AAC]] (with or without MP4 container)&lt;br /&gt;
* Method: Audio + Meta, or Audio only&lt;br /&gt;
* Limitations: Limited to 1.5dB steps mode, may become irreversible (same caveat as for MP3Gain)&lt;br /&gt;
* http://altosdesign.com/aacgain/&lt;br /&gt;
&lt;br /&gt;
=== [[LAME]] ===&lt;br /&gt;
* Method: Header ([http://gabriel.mp3-tech.org/mp3infotag.html mp3infotag])&lt;br /&gt;
* Notes:&lt;br /&gt;
** Tags added during encoding; not supported by any player yet; Track Gain only&lt;br /&gt;
** Replay Gaining MP3&#039;s are usually done using MP3Gain (see [[Replay Gain#MP3Gain|above]]) or [[Replay Gain#foobar2000 Replay Gain scanner|foobar2000]]&lt;br /&gt;
* http://lame.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
=== [[Musepack]] Replay Gain ===&lt;br /&gt;
* Method: Header (similar to Meta data method)&lt;br /&gt;
* Notes: Replay Gain values are stored in the header and Replay Gain is part of the Musepack specifications; therefore any Musepack decoder that does not support Replay Gain can be considered broken.&lt;br /&gt;
* http://www.musepack.net/&lt;br /&gt;
&lt;br /&gt;
=== VorbisGain ===&lt;br /&gt;
* Format: (Ogg) [[Vorbis]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://www.sjeng.org/vorbisgain.html&lt;br /&gt;
** new compiles of VorbisGain at [http://www.rarewares.org/ogg.html www.rarewares.org]&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; Andavari has provided a very useful script to integrate VorbisGain, which is a CLI tool, into Windows Explorer. Please (Ogg) [[Vorbis#Replay Gain|check this section]].&lt;br /&gt;
&lt;br /&gt;
=== FLAC / METAFLAC ===&lt;br /&gt;
* Format: [[Free Lossless Audio Codec|FLAC]]&lt;br /&gt;
* Method: Meta (in [[Vorbis comment]])&lt;br /&gt;
* http://flac.sf.net&lt;br /&gt;
&lt;br /&gt;
=== WavPack / WVGAIN ===&lt;br /&gt;
* Format: [[WavPack]]&lt;br /&gt;
* Method: Meta (in [[APEv2]] tag)&lt;br /&gt;
* http://www.wavpack.com&lt;br /&gt;
&lt;br /&gt;
=== Wavegain ===&lt;br /&gt;
* Format: waveform&lt;br /&gt;
* Method: Audio&lt;br /&gt;
* Limitations: Irreversible&lt;br /&gt;
* http://www.rarewares.org/files/others/wavegain.zip&lt;br /&gt;
&lt;br /&gt;
=== [[foobar2000]] Replay Gain scanner ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] (default) or [[APEv2]] tags. A separate function can be invoked to apply the tagged Track or Album Gain to the MP3 global gain fields (as MP3Gain does, but requiring tags first), and to rewrite the tags to account for the peak change and compensate for the difference from 89&amp;amp;nbsp;dB. The 89&amp;amp;nbsp;dB reference level for tags isn&#039;t configurable, but the reference level applied to the global gain fields is (it&#039;s under Preferences &amp;gt; Advanced &amp;gt; Tools &amp;gt; ReplayGain Scanner &amp;gt; Target MP3 alteration volume level).&lt;br /&gt;
** [[Musepack]]: Values written to header.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WavPack]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]: Uses its own iTunes-compatible tagging system (though iTunes does not support Replay Gain).&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** Modules ([[MOD]] etc.): Optionally saved into [[APEv2]] tags.&lt;br /&gt;
* http://foobar2000.org&lt;br /&gt;
&lt;br /&gt;
=== [[MediaMonkey]] ===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[APEv2]] or [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[WAV]]: Values stored in MediaMonkey&#039;s MDB database.&lt;br /&gt;
** [[MPC]]: Internal gain Structure.&lt;br /&gt;
* In addition to tags, all Replay Gain values are also stored in MediaMonkey&#039;s MDB database&lt;br /&gt;
* Album/Audiophile Replay Gain not supported until v3.0 (Dec 2007); support during burning &amp;amp; ripping added in 3.1 (Jun 2009)&lt;br /&gt;
* Also capable of (irreversibly) changing the volume of MP3 tracks, similar to [[MP3Gain]]&lt;br /&gt;
* http://www.mediamonkey.com/&lt;br /&gt;
&lt;br /&gt;
=== [[Winamp]] Replay Gain scanner===&lt;br /&gt;
* Format:&lt;br /&gt;
** [[MP3]]: Values written to [[ID3v2]] tags.&lt;br /&gt;
** (Ogg) [[Vorbis]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[WMA]]: Values stored in Windows Media Audio tags.&lt;br /&gt;
** [[Free Lossless Audio Codec|FLAC]]: Values written to [[Vorbis comment]].&lt;br /&gt;
** [[APE]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[AAC]]: Values written to [[APEv2]] tags.&lt;br /&gt;
** [[MP4]]&lt;br /&gt;
** [[TAK]]: Values written to [[APEv2]] tags.&lt;br /&gt;
* Support Album/Track Gain&lt;br /&gt;
&lt;br /&gt;
== Players support ==&lt;br /&gt;
Replay Gain being present in the specs of FLAC, Musepack, and APE formats, any player that support those formats usually support Replay Gain.&lt;br /&gt;
&lt;br /&gt;
The situation with MP3 is rather different, as it was not part of the MP3 specs. The APEv2 tags metadata implementation is somewhat becoming the de-facto standard.&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
* [[foobar2000]] supports Replay Gain in all possible aspects.&lt;br /&gt;
* [[Winamp]] supports Replay Gain in album or track mode.&lt;br /&gt;
* [[MediaMonkey]] supports track Replay Gain only&lt;br /&gt;
* [[XMPlay]] recently implemented Replay Gain&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;...and probably others.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
* [[XMMS]]. Reads Replay Gain from [[Free Lossless Audio Codec|FLAC]], [[Musepack]], (Ogg) [[Vorbis]] ..&lt;br /&gt;
:For [[MP3]], use the CVS version of the [http://xmms-mad.sourceforge.net/ xmms-mad] mp3 plugin (it&#039;s not yet released as binary, furthermore not available in distribs&#039; versions for now. Meanwhile binaries are available here: [http://perso.crans.org/~krempp/xmms-mad/ custom binaries])&lt;br /&gt;
* [[amarok]]. By using the amarok-script [http://kde-apps.org/content/show.php?content=26073 Replay Gain]&lt;br /&gt;
:And possibly others, since [http://developer.kde.org/~wheeler/taglib.html TagLib] added support for [[APEv2]] tags in [[MP3]] files, players using this library (like [[amaroK]] and [[JuK]]) might support that kind of Replay Gain tags in the near future.&lt;br /&gt;
* [http://www.sacredchao.net/quodlibet Quod Libet] reads Replay Gain from (Ogg) [[Vorbis]], [[MP3]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:Requires support to be enabled (via the appropriate python bindings and libraries) for the above formats. Does not support Replay Gain values stored in [[APEv2]] tags in [[MP3]]s. Replay Gain values are stored in RVA2 id3v2.4 frames. See the [http://www.sacredchao.net/quodlibet/wiki/Development/ID3Notes Quod Libet RVA2 / Replay Gain notes].&lt;br /&gt;
* [http://www.musicpd.org/ Music Player Daemon] (MPD) reads Replay Gain from (Ogg) [[Vorbis]], [[Free Lossless Audio Codec|FLAC]], and [[Musepack]].&lt;br /&gt;
:foobar2000-style TXXX frames in [[MP3]]s are also supported in the latest development releases.&lt;br /&gt;
* [http://www.mplayerhq.hu/ MPlayer]. Mplayer support for Replay Gain is codec dependent.&lt;br /&gt;
:Codecs that are known to support Replay Gain: vorbis&lt;br /&gt;
:Because of this, you need to prioritize the codecs that support it, or choose it individually on the command line.  To add it to the command line, add an -ac [codec] option after each file that you want to choose the codec for, or at the beginning to make it apply to all files listed.  To prioritize the codecs by default, list them in a line in mplayer.conf:&lt;br /&gt;
 ac=[codec],[othercodec],vorbis,mad,&lt;br /&gt;
&lt;br /&gt;
=== Portable devices ===&lt;br /&gt;
[http://www.rockbox.org/ Rockbox] supports Replay Gain (in album or track mode) for most formats, including  WMA, MP1/2/3, AAC, ALAC, Musepack, Monkey&#039;s Audio, Wavpack, FLAC and Vorbis.  &amp;lt;br&amp;gt;Note that Replay Gain is only supported when using the respective codec&#039;s native tagging format.  For example:  Replay Gain stored in APEv2 tags is not supported for MP3, rather ID3v2.x tags are expected.&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Fuze with firmware 1.02.26 and 2.02.26&lt;br /&gt;
&lt;br /&gt;
Sandisk Sansa Clip+&lt;br /&gt;
&lt;br /&gt;
The iPod features &#039;&#039;Soundcheck&#039;&#039;, which seems to produce roughly the same normalization gains as Replay Gain, but doesn&#039;t provide an Album Gain.&lt;br /&gt;
&lt;br /&gt;
=== Hi-Fi ===&lt;br /&gt;
Slim Devices a company owned by Logitech Inc, supports Replay Gain on both of their hi-end audiophile players, known as the [[Slim Devices Transporter|Transporter]] and the [[Slim Devices Squeezebox|Squeezebox]].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;references/&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[ReplayGain specification]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Replay_Gain Replay Gain] at Wikipedia&lt;br /&gt;
* [http://www.replaygain.org/ Replay Gain - A Proposed Standard], the original proposal, now out of date with respect to current practice&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain.html Replay Gain using foobar2000] (how to use Replay Gain in Windows using foobar2000).&lt;br /&gt;
* [http://www.bobulous.org.uk/misc/Replay-Gain-in-Linux.html Replay Gain in Linux] (how to use Replay Gain in Linux using foobar2000 and Wine, or using metaflac or vorbisgain).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Metadata]]&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22470</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22470"/>
		<updated>2011-03-20T17:17:08Z</updated>

		<summary type="html">&lt;p&gt;Notat: add archive.org link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz. The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt;, so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, in ReplayGain calibrates to 2 channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org original ReplayGain proposal] (an [http://replay.waybackmachine.org/20090306202649/http://www.replaygain.org/ archive] is also available) was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22469</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22469"/>
		<updated>2011-03-20T17:01:36Z</updated>

		<summary type="html">&lt;p&gt;Notat: correct RG spelling in caption&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz. The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt;, so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, in ReplayGain calibrates to 2 channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Example ReplayGain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org original ReplayGain proposal] was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22468</id>
		<title>Original ReplayGain specification</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Original_ReplayGain_specification&amp;diff=22468"/>
		<updated>2011-03-20T16:57:02Z</updated>

		<summary type="html">&lt;p&gt;Notat: remove broken reference from quote&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although music is encoded to a digital format with a clearly defined maximum peak amplitude, and although most recordings are normalized to utilize this peak amplitude, not all recordings sound equally loud. This is because once this peak amplitude is reached, perceived loudness can be further increased through signal-processing techniques such as dynamic range compression and equalization.&amp;lt;ref&amp;gt;Source: Wikipedia - [http://en.wikipedia.org/wiki/Loudness_war Loudness war]&amp;lt;/ref&amp;gt; Therefore, the loudness of a given album has more to do with the year of issue or the whim of the producer than the intended emotional effect. Because of this, a random play through a music collection can have one leaping for the volume control every other track.&lt;br /&gt;
&lt;br /&gt;
There is a solution to this annoyance: within each audio file, information can be stored about what volume change would be required to play each track or album at a standard loudness, and players can use this &amp;quot;replay gain&amp;quot; information to automatically nudge the volume up or down as required.&lt;br /&gt;
&lt;br /&gt;
The ReplayGain specification is a standard which defines an appropriate reference level, explains a way of calculating and representing the ideal replay gain for a given track or album, and provides guidance for players to make the required volume adjustment during playback. The standard also specifies a means to prevent clipping when the calculated replay gain exceeds the limits of digital audio, and it describes how the replay gain information is stored within audio files.&lt;br /&gt;
&lt;br /&gt;
==Loudness measurement==&lt;br /&gt;
Loudness is a subjective measure of the intensity of sound. The correlation of perceived loudness to sound pressure level is determined by the peculiarities of the auditory system. ReplayGain attempts to model those peculiarities with the following measurement procedure.&lt;br /&gt;
&lt;br /&gt;
===Loudness filter===&lt;br /&gt;
[[File:RG_Equal_loudness_all.gif‎|frame|Figure 1: Loudness filter target response (blue), high-pass response (green) and composite response (red)]]&lt;br /&gt;
&lt;br /&gt;
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full-scale sine wave at 1 kHz sounds much louder than a full scale sine wave at 100 Hz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation of the equal loudness curves (sometimes referred to as Fletcher&amp;amp;ndash;Munson curves) which describe the sensitivity of the ear as a function of frequency. The desired filter response derived from the equal loudness curves is shown in figure 1 (blue).&lt;br /&gt;
&lt;br /&gt;
At higher frequencies a 10th order IIR filter designed by MATLAB&#039;s &amp;quot;yulewalk&amp;quot; function is an excellent approximation to the target. This is cascaded with a 2nd order Butterworth high pass filter, with a high pass frequency of 150 Hz. The resulting combined response (Figure 1 [red]) is close to the target response, and is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
[[File:RG_IIR-filter.png|frame|Figure 2: IIR filter topology used by &amp;quot;yulewalk&amp;quot; and Butterworth filter components]]&lt;br /&gt;
&lt;br /&gt;
The filter topology used for the components of the loudness filter is shown in figure 2. The filter coefficients for 48 and 44.1&amp;amp;nbsp;kHz sample rates are given for the Butterworth and &amp;quot;yulewalk&amp;quot; components in tables 1 and 2 respectively. When using other sample rates, coefficients must be transformed to maintain the same filter response.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1a: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.97223372919527 || &#039;&#039;b(1)&#039;&#039; || -1.97242384925416&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97261396931306 || &#039;&#039;b(2)&#039;&#039; || 0.98621192462708&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 1b: Butterworth filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 1.96977855582618 || &#039;&#039;b(1)&#039;&#039; || -1.97000351574484&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -0.97022847566350 || &#039;&#039;b(2)&#039;&#039; || 0.98500175787242&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2a: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=48&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.03857599435200&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.84664617118067 || &#039;&#039;b(1)&#039;&#039; || -0.02160367184185&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -7.81501653005538 || &#039;&#039;b(2)&#039;&#039; || -0.00123395316851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 11.34170355132042 || &#039;&#039;b(3)&#039;&#039; || -0.00009291677959&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -13.05504219327545 || &#039;&#039;b(4)&#039;&#039; || -0.01655260341619&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 12.28759895145294 || &#039;&#039;b(5)&#039;&#039; || 0.02161526843274&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -9.48293806319790 || &#039;&#039;b(6)&#039;&#039; || -0.02074045215285&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 5.87257861775999 || &#039;&#039;b(7)&#039;&#039; || 0.00594298065125&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.75465861874613 || &#039;&#039;b(8)&#039;&#039; || 0.00306428023191&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.86984376593551 || &#039;&#039;b(9)&#039;&#039; || 0.00012025322027&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13919314567432 || &#039;&#039;b(10)&#039;&#039; || 0.00288463683916&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|+Table 2b: &amp;quot;Yulewalk&amp;quot; filter coefficients (F&amp;lt;sub&amp;gt;s&amp;lt;/sub&amp;gt;=44.1&amp;amp;nbsp;kHz)&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |&lt;br /&gt;
| &#039;&#039;b(0)&#039;&#039;&lt;br /&gt;
| 0.05418656406430&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(1)&#039;&#039; || 3.47845948550071 || &#039;&#039;b(1)&#039;&#039; || -0.02911007808948&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(2)&#039;&#039; || -6.36317777566148 || &#039;&#039;b(2)&#039;&#039; || -0.00848709379851&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(3)&#039;&#039; || 8.54751527471874 || &#039;&#039;b(3)&#039;&#039; || -0.00851165645469&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(4)&#039;&#039; || -9.47693607801280 || &#039;&#039;b(4)&#039;&#039; || -0.00834990904936&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(5)&#039;&#039; || 8.81498681370155 || &#039;&#039;b(5)&#039;&#039; || 0.02245293253339&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(6)&#039;&#039; || -6.85401540936998 || &#039;&#039;b(6)&#039;&#039; || -0.02596338512915&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(7)&#039;&#039; || 4.39470996079559 || &#039;&#039;b(7)&#039;&#039; || 0.01624864962975&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(8)&#039;&#039; || -2.19611684890774 || &#039;&#039;b(8)&#039;&#039; || -0.00240879051584&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(9)&#039;&#039; || 0.75104302451432 || &#039;&#039;b(9)&#039;&#039; || 0.00674613682247&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;a(10)&#039;&#039; || -0.13149317958808 || &#039;&#039;b(10)&#039;&#039; || -0.00187763777362&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Input samples from the audio file to be analysed must be run in cascade manner through both of these filter components before being analysed further.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===RMS level calculation===&lt;br /&gt;
Next, the energy during each moment of the signal is determined by calculating the Root Mean Square (RMS) of the filtered signal every 50ms.&amp;lt;ref&amp;gt;The block length of 50ms was chosen after studying the effect of values between 25ms and 1s. 25ms was too short to accurately reflect the perceived loudness of some sounds. Beyond 50ms there was little change (after statistical processing). For this reason, 50ms was chosen.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The signal is chopped into 50ms long blocks. Then, for each block:&amp;lt;ref&amp;gt;If these steps are read backward, it should be clear why the process is called Root Mean Square averaging.&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Every sample value is squared (multiplied by itself).&lt;br /&gt;
# The mean average is taken.&lt;br /&gt;
# The square root of the average is calculated.&lt;br /&gt;
&lt;br /&gt;
For stereo signals, in step 3, the mean average of all squared samples from both channels over the 50ms measurement interval is taken.&amp;lt;ref&amp;gt;One could sum channels of a stereo signal to mono before calculating the RMS level, but then any out-of-phase components (having the opposite signal on each channel) would cancel out to zero (i.e. silence). That&#039;s not how humans perceive them, so it&#039;s not a good solution.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of this calculation is then converted to a decibel representation as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L=20 \log_{10} \frac{2{L_{RMS}}}{L_{p-p}}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{RMS}&amp;lt;/math&amp;gt; is the RMS value calculated above&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{p-p}&amp;lt;/math&amp;gt; is the maximum peak-to-peak range of the samples in the audio file&lt;br /&gt;
&lt;br /&gt;
===Statistical processing===&lt;br /&gt;
Where the average energy level of a signal varies with time, the louder moments contribute most to perception of overall loudness. For example, in human speech, over half the time is silence, but the perceived loudness of speech is primarily determined by the levels between silences.&lt;br /&gt;
&lt;br /&gt;
A good method to determine the overall perceived loudness is to sort the RMS values into numerical order, and then pick a value near the top of the list. For highly compressed pop music (e.g. Figure 5(c), where there are many values near the top), the choice makes little difference. For speech and classical music (Figures 5(a) and 5(b) respectively), the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is 95%&amp;lt;ref&amp;gt;Based on experiments performed by David Robinson, &amp;quot;I tried values from 70% to 95%. For highly compressed pop music, the choice makes little difference. For speech and classical music, the choice makes a huge difference. The value which most accurately matches human perception of perceived loudness is around 95%, so this value is used by Replay Level.&amp;quot;&amp;lt;/ref&amp;gt;, so this value is used by ReplayGain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery caption=&amp;quot;Figure 5: Loudness histograms&amp;quot;&amp;gt;&lt;br /&gt;
File:RG_Statistical_speech.gif‎‎|(a) Speech&lt;br /&gt;
File:RG_Statistical_classic.gif‎‎|(b) Classical music&lt;br /&gt;
File:RG_Statistical_pop.gif‎‎|(c) Pop music&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Reference level==&lt;br /&gt;
The audio industry does not have a standard for playback system calibration, but in the movie industry a calibration standard has been defined by the Society of Motion Picture and Television Engineers (SMPTE).&amp;lt;ref&amp;gt;SMPTE RP 200:2002 &amp;amp;ndash; Relative and Absolute Sound Pressure Levels for Motion-Picture Multichannel Sound Systems &amp;amp;ndash; Applicable for Analog Photographic Film Audio, Digital Photographic Film Audio and D-Cinema&amp;lt;/ref&amp;gt; The standard states that a single channel pink noise signal with an RMS level of -20 dB relative to a full-scale sinusoid&amp;lt;ref&amp;gt;&amp;quot;dB relative to a full-scale sinusoid&amp;quot; is preferred over &amp;quot;dBFS&amp;quot; as a unit of measure in this specification because there is some ambiguity whether the reference for dBFS is a full-scale square wave (peak reference) or a sine wave (RMS reference).&amp;lt;/ref&amp;gt; should be reproduced at 83 dB SPL.&amp;lt;ref&amp;gt;Measured using a C-weighted, slow averaging SPL meter.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ReplayGain adapts the SMPTE calibration concept for music playback. Under ReplayGain, audio is played so that its loudness, as measured using the procedures described in [[#Loudness measurement|Loudness measurement]] above, matches the loudness of a pink noise signal with an RMS level of -14 dB relative to a full-scale sinusoid,&amp;lt;ref&amp;gt;The initial ReplayGain proposal used the same -20 dB reference used by SMPTE. The reference was raised to -14 dB early on in ReplayGain development. This reference is used in all current ReplayGain implementations.&amp;lt;/ref&amp;gt; also measured using the procedures described above.&lt;br /&gt;
&lt;br /&gt;
In ReplayGain implementations, the reference level is described in terms of the SMPTE SPL playback level. By the SMPTE definition, the 83 dB SPL reference corresponds to -20FS dB system headroom. The -14 dB headroom used by ReplayGain therefore corresponds to an 89 dB SPL playback level on a SMPTE calibrated system and so is said to be operating with an 89 dB reference level.&lt;br /&gt;
&lt;br /&gt;
SMPTE cinema calibration calls for a single channel of pink noise reproduced through a single loudspeaker. In music applications, the ideal level of the music is actually the loudness when both speakers are in use. So, in ReplayGain calibrates to 2 channels of pink noise.&amp;lt;ref&amp;gt;In reality, a monophonic pink noise wave file is used, and ReplayGain automatically assumes the file is being played through both speakers, as would any monophonic file.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Gain calculation==&lt;br /&gt;
RG achieves loudness compensated playback by applying gain (or attenuation) dependent on the measured loudness of the audio file relative to the established reference level. The gain is calculated as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG=L_{n14}-L&amp;lt;/math&amp;gt;&lt;br /&gt;
Where all quantities are expressed in decibels:&lt;br /&gt;
:&amp;lt;math&amp;gt;RG&amp;lt;/math&amp;gt; is the replay gain adjustment,&lt;br /&gt;
:&amp;lt;math&amp;gt;L_{n14}&amp;lt;/math&amp;gt; is the measured loudness of the -14 dB pink noise reference and&lt;br /&gt;
:&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; is the measured loudness of the audio file.&lt;br /&gt;
&lt;br /&gt;
Replay gain is positive if the loudness of the audio file is lower than the pink noise reference. The gain is negative (representing an attenuation) if the loudness of the audio file is higher than that of the reference. The gain is stored as metadata with the audio file as described below and is used by players to adjust output volume of tracks as they are played as described in [[#Player requirements|Player requirements]] below.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
For ReplayGain to do its work during playback, four values must be stored as metadata&amp;lt;ref&amp;gt;Metadata is &amp;quot;data about data.&amp;quot; For example, the ID3 &#039;&#039;de facto&#039;&#039; standard provides a way to store artist, title, album title, track number, and other metadata in data blocks called &amp;quot;tags&amp;quot; immediately before or after the audio data in an MP3 file. Other metadata storage/tagging standards and conventions exist for other audio file formats.&amp;lt;/ref&amp;gt; with or within the audio file:&lt;br /&gt;
# Peak track amplitude&lt;br /&gt;
# Peak album amplitude&lt;br /&gt;
# Track replay gain&lt;br /&gt;
# Album replay gain&lt;br /&gt;
&lt;br /&gt;
If calculated for an individual track, the loudness measurement (as specified above) yields track replay gain. If calculated on an album basis, with all tracks concatenated to make one long audio file, the loudness measurement yields album replay gain.&lt;br /&gt;
&lt;br /&gt;
===Replay gain===&lt;br /&gt;
Under some listening conditions, it&#039;s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It&#039;s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Album replay gain&#039;&#039; represents the ideal listening gain for an entire album. ReplayGain reads the collection of tracks that comprise a album, and calculates a single replay gain for the whole set. This single can be used for playback of all tracks of the album. Intentionally quiet tracks then stay appropriately quieter than the rest. It still solves the basic problem (annoying, unwanted level differences between discs) because quiet or loud discs are still adjusted overall&amp;amp;mdash;so the pop CD that&#039;s 20 dB louder than the classical CD will be brought into line.&lt;br /&gt;
&lt;br /&gt;
===Peak amplitude===&lt;br /&gt;
Scanning a track or album for the peak amplitude can be a time-consuming process. Therefore, it&#039;s helpful if this single value is stored as metadata. This is used to predict whether the required replay gain adjustment will cause clipping during playback.&lt;br /&gt;
&lt;br /&gt;
The maximum peak amplitude value is stored as a floating point number, where 1.0 represents digital full scale. As with replay gain values, separate peak amplitude values are stored per track and per album.&lt;br /&gt;
&lt;br /&gt;
For uncompressed files simply, scanners store the maximum absolute sample value held in the file on any channel for positive or negative excursion. The single sample value should be converted to a floating-point representation, such that digital full scale is equivalent to a value of 1.0.&lt;br /&gt;
&lt;br /&gt;
Psychoacoustically coded audio, such as MP3, does not exist as a sequence of samples until it is decoded. Psychoacoustic coding of a heavily limited file can lead to sample values larger than digital full scale upon decoding. The coded files must be decoded using a fully compliant decoder that allows peak overflows (i.e. has headroom) and may result in peak amplitude values greater than 1.0.&lt;br /&gt;
&lt;br /&gt;
==Metadata format==&lt;br /&gt;
From the standpoint of metadata storage, each audio file format presents a unique situation. There are three favored schemes defined for storage of ReplayGain metadata: &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039; and &#039;&#039;&#039;APEv2&#039;&#039;&#039;. A survey of file formats is listed below with metadata schemes in order of preference for each:&lt;br /&gt;
* .aac (Advanced Audio Coding raw format) &amp;amp;ndash; No metadata support (use .mp4 instead)&lt;br /&gt;
* .aiff, .aif, .aifc (Apple Interchange File Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID3&amp;quot; IFF chunk)&lt;br /&gt;
* .ape, .apl (Monkey&#039;s Audio) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .bwf (Broadcast Wave Format) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in RIFF chunk)&lt;br /&gt;
* .flac (Free Lossless Audio Codec) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .mp3 (MPEG audio layer 3) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, LAME VBR proposed tag specification&lt;br /&gt;
* .mp4 also .m4a, .m4b, .m4p, m4r (MPEG-4 Part 14) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039; (in &amp;quot;ID32&amp;quot; box)&lt;br /&gt;
* .mpc (Musepack) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .ogg (Ogg Vorbis) &amp;amp;ndash; &#039;&#039;&#039;Vorbis comments&#039;&#039;&#039;&lt;br /&gt;
* .tta (True Audio) &amp;amp;ndash; &#039;&#039;&#039;ID3v2&#039;&#039;&#039;, &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
* .wma (Windows Media audio) - Advanced Systems Format (not supported by ReplayGain)&lt;br /&gt;
* .wav (Windows PCM) &amp;amp;ndash; No metadata support (use .bwf instead)&lt;br /&gt;
* .wv (WavePak) &amp;amp;ndash; &#039;&#039;&#039;APEv2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ID3v2===&lt;br /&gt;
The ID3v2 standard&amp;lt;ref&amp;gt;The ID3v2 format is explained at [http://www.id3.org/ www.id3.org]. The most useful document is the [http://www.id3.org/id3v2.3.0.html ID3v2 v2.3.0 standard]. Although this document has been superseded by v2.4.0, the earlier document is complete (rather than an update), and in indexed HTML form. As such, it represents a better technical introduction to ID3v2.&amp;lt;/ref&amp;gt; defines a &#039;&#039;tag&#039;&#039; which is situated before the data in an MP3 file.&amp;lt;ref&amp;gt;The original ID3 (v1) tags resided at the end of the file, and contained a few fields of information. The ID3v1 tag is not extensible and therefore cannot support ReplayGain metadata.&amp;lt;/ref&amp;gt; ID3 is used primarily with MP3 audio files but means of adapting the system to other file types have been developed.&lt;br /&gt;
&lt;br /&gt;
The ID3v2 tag is divided into &#039;&#039;frames&#039;&#039;. The preferred means of storing ReplayGain metadata is use of &#039;&#039;TXXX&#039;&#039; key/value pair frames. Two other legacy schemes for storing ReplayGain metadata exist: [[ReplayGain_legacy_metadata_formats#ID3v2_RGAD|RGAD]] and [[ReplayGain_legacy_metadata_formats#ID3v2_RVA2|RVA2]]. These formats are documented in the [[ReplayGain legacy metadata formats|appendix]]. Players may choose to look for these formats if metadata in the &#039;&#039;TXXX&#039;&#039; format is not found in the ID3v2 tag. New scanners may write these older formats in addition to the newer (TXXX) ones if they wish to remain backwards compatible with older players.&lt;br /&gt;
&lt;br /&gt;
ReplayGain uses four TXXX frames. The header of a TXXX frame is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Frame ID       $54 58 58 58 (&amp;quot;TXXX&amp;quot;) &lt;br /&gt;
 Size           $xx xx xx xx (size of frame excluding this header)&lt;br /&gt;
 Flags          $40 $00      (discard frame if audio data is altered)&lt;br /&gt;
&lt;br /&gt;
Frame data is coded as follows:&lt;br /&gt;
&lt;br /&gt;
 Text encoding  $00          (ISO-8859-1 encoding)&lt;br /&gt;
 Description    &amp;lt;key string&amp;gt; $00&lt;br /&gt;
 Value          &amp;lt;value string&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The four frames associated with ReplayGain metadata use the following key/value pairs&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Table 3: Metadata keys and value formatting&lt;br /&gt;
|-&lt;br /&gt;
!Metadata&lt;br /&gt;
!Key&lt;br /&gt;
!Value format&lt;br /&gt;
|-&lt;br /&gt;
|Track replay gain&lt;br /&gt;
|REPLAYGAIN_TRACK_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak track amplitude&lt;br /&gt;
|REPLAYGAIN_TRACK_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|-&lt;br /&gt;
|Album replay gain&lt;br /&gt;
|REPLAYGAIN_ALBUM_GAIN&lt;br /&gt;
|[-]a.bb dB&lt;br /&gt;
|-&lt;br /&gt;
|Peak album amplitude&lt;br /&gt;
|REPLAYGAIN_ALBUM_PEAK&lt;br /&gt;
|c.dddddd&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Gains are specified textually in decibels. Negative gains (attenuation) are prefixed with a &#039;-&#039;. Positive gains have no prefix. Integral portion of the gain (a) may be one or two numeric (0-9) digits. If there is no integral portion the field is &#039;0&#039;. The decimal portion of the gain (bb) is two numeric digits. Gains are suffixed with a space followed by &#039;dB&#039;.&lt;br /&gt;
&lt;br /&gt;
Peak levels are specified textually as a positive decimal. Peak level is a dimensionless quantity with 1.000000 representing full scale. No suffix is included on peak values. The integer field (c) is typically 1 or 0. Six numeric digits in the decimal field (dddddd) is adequate to accurately represent peak values for 16-bit audio data.&lt;br /&gt;
&lt;br /&gt;
A robust player should be prepared to parse the following variations in either replay gain or peak level metadata:&lt;br /&gt;
*Positive gains with leading &#039;+&#039;&lt;br /&gt;
*More or fewer significant digits than specified in any field&lt;br /&gt;
*Leading zeros or spaces in integer fields&lt;br /&gt;
*Missing or malformed &#039;dB&#039; suffix (e.g. no space between numeric digits and suffix, alternate capitalization)&lt;br /&gt;
*Alternate capitalization of keys&lt;br /&gt;
&lt;br /&gt;
Other formatting errors indicate more severe problems and should result in player ignoring data as if the frame did not exist.&lt;br /&gt;
&lt;br /&gt;
===Vorbis comments===&lt;br /&gt;
A Vorbis comment&amp;lt;ref&amp;gt;[http://www.xiph.org/vorbis/doc/v-comment.html Vorbis comment metadata format]. ReplayGain metadata is documented on the [http://wiki.xiph.org/VorbisComment#Replay_Gain Xiph Wiki].&amp;lt;/ref&amp;gt; uses an ASCII &amp;lt;tt&amp;gt;key=value&amp;lt;/tt&amp;gt; format. When Vorbis comments are used, the four ReplayGain metadata items are stored as separate comments. The &#039;&#039;keys&#039;&#039; and formatting for &#039;&#039;values&#039;&#039; is the same as specified for ID3v2. Keys and values are required by the Vorbis comment specification to b separated by &#039;=&#039; (equal character).&lt;br /&gt;
&lt;br /&gt;
===APEv2===&lt;br /&gt;
The APEv2 metadata format&amp;lt;ref&amp;gt;[http://wiki.hydrogenaudio.org/index.php?title=APEv2_specification APEv2 Specification at Hydrogen Audio Wiki]&amp;lt;/ref&amp;gt; also organizes data into key/value pairs. Keys are ASCII format. A flags field allows support for several value formats including UTF-8 and binary. Under APEv2, ReplayGain meta data is stored using the same keys and data as ASCII values in the same format as specified for ID3v2.&lt;br /&gt;
&lt;br /&gt;
==Player requirements==&lt;br /&gt;
[[File:RG_Player_control.gif‎|frame|Figure 8: Possible Replay Gain control panel]]&lt;br /&gt;
&lt;br /&gt;
Loudness normalization, pre-amplification and clipping prevention are the operations performed by a ReplayGain player.&lt;br /&gt;
&lt;br /&gt;
===Loudness normalization===&lt;br /&gt;
To properly normalize loudness, the player needs to determine if the user desires Track style level normalization (all tracks same loudness), or Album style level normalization (all albums same loudness, tracks of an album played at the same relative level as on the original release). This option should be selectable in the ReplayGain control panel (Figure 8). The player reads the corresponding gain metadata value from the file and scales the audio data as appropriate. Scaling the audio data simply means multiplying each sample value by a constant value. This constant is given by:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;10^\frac{gain}{20}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in words, replay gain divided by 20 all raised to the power of ten.&amp;lt;ref&amp;gt;After any such operation, it&#039;s a good idea to dither the result. If this calculation and the pre-amp are implemented separately, then dither should only be added to the final result, just before the result is truncated back to 16 bits, or 24, or 8, as limited by the soundcard&amp;amp;mdash;not the file (i.e. after ReplayGain adjustment, an 8-bit file should be sent to a 16-bit soundcard at 16-bits).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the file only contains one of the replay gain adjustments (e.g. Album) but the user has requested the other (Track), then the player should use the one that is available (in this case, Album). If neither (Track or Album) gain metadata is available, then the player needs to choose a suitable default gain. Potential choices include unity gain (0 dB) or an average of gains from other tracks in the album or playlist.&lt;br /&gt;
&lt;br /&gt;
===Pre-amplification===&lt;br /&gt;
Although the calibration level used by ReplayGain suggests that the average level of an audio track should be 14 dB below full scale, some pop music is dynamically compressed to peak at 0 dB and average around 3 dB below full scale. This means that, when the replay gain is applied, the level of such tracks will be reduced by 11 dB! If users are listening to a mixture of highly compressed and more dynamic tracks, ReplayGain will make the listening experience more pleasurable by bringing the level of the compressed tracks down into line with that of the others. However, if users are only listening to highly compressed music, then they may complain that all their files are now too quiet.&amp;lt;ref&amp;gt;This problem can be especially noticeable on portable players with limited output or gain.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To address this problem, a pre-amp feature should be incorporated into the player. A user-supplied pre-amp setting is an adjustment to the calculated replay gain. It should default to perform no adjustment. This means that casual users will experience a moderate reduction in the loudness of their compressed pop music. Less-compressed material can generally be played at the same loudness without clipping. Normalization of more dynamic material may cause clipping or invoke the [[#Clipping prevention|clipping prevention]] mechanism (see below). Power users and audiophiles can reduce the pre-amp gain to enjoy the full dynamic range of all of their music.&lt;br /&gt;
&lt;br /&gt;
If enabled, the player should read the user selected pre-amp gain, and scale the audio signal by the appropriate amount. For example, a +6 dB gain requires a scale of 10&amp;lt;sup&amp;gt;6/20&amp;lt;/sup&amp;gt;, which is approximately 2. The replay gain and pre-amp scale factors can be combined&amp;lt;ref&amp;gt;Scale factors in  Decibel units are added to produce the same effect as multiplying scale factors in linear units.&amp;lt;/ref&amp;gt; for simplicity and ease of processing.&lt;br /&gt;
&lt;br /&gt;
===Clipping prevention===&lt;br /&gt;
ReplayGain&#039;s suggestion of a -14 dB average playback level leaves sufficient headroom for the bulk of modern recordings. Nevertheless, there exists the possibility that after application of replay gain and pre-amp adjustment, a track may exceed full scale during its dynamic peaks. Without intervention, this will result in clipping, a severe form of distortion. Factors introducing the possibility of clipping include:&lt;br /&gt;
&lt;br /&gt;
# Recordings from certain genres and certain periods in the history or commercial recordings require additional headroom. Although these recordings can be accommodated through a downwards adjustment of the pre-amp setting, it may be difficult to determine a safe adjustment and it may be undesirable to lower average level to accommodate the rare track which requires it. &lt;br /&gt;
# ReplayGain will make loud dynamically compressed tracks quieter, and quiet dynamically uncompressed tracks louder. The average levels will then be similar, but the quiet tracks will actually have louder peaks. If the user pushes the pre-amp gain upwards the peaks of the (originally) quieter tracks will be pushed well over full scale.&lt;br /&gt;
# In coded audio (e.g. MP3 files) a file that was hard-limited to digital full scale before encoding will often be pushed over the limit by the psychoacoustic compression. A decoder with headroom can recover the over full scale signal by reducing the gain.&lt;br /&gt;
&lt;br /&gt;
ReplayGain suggests two possible solutions which prevent clipping in these situations. A player should support one or both of these.&lt;br /&gt;
&lt;br /&gt;
====Audio limiting====&lt;br /&gt;
In situation 2 above, the user clearly wants all the music to sound very loud. To give them their wish, any signal which would peak above digital full scale should be hard limited at just below digital full scale. This is also useful at lower pre-amp gains, where it allows the average level of classical music to be raised to that of pop music, without distorting. The exact type of nature limiting or compression an implementation choice for the player.&amp;lt;ref&amp;gt;Something like the Hard Limiter found in Cool Edit Pro (Syntrillium) would be appropriate for pop music at least.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Reduced gain====&lt;br /&gt;
The audiophile user will not want any compression or limiting on the signal. In this case the only option is to automatically and temporarily reduce the pre-amp gain below the user-selected setting for tracks where clipping would otherwise occur. Clipping can be predicted by examining the peak level of the track or album being played.&lt;br /&gt;
&lt;br /&gt;
The player must read the peak amplitude metadata. If peak level metadata is unavailable, the player should assume a peak level of 1.0. If the peak level for both track and album is stored as metadata in the file, it is possible to calculate if, following the replay gain adjustment and pre-amp gain, the signal will clip at some point. If it won&#039;t, then no further action is necessary. &lt;br /&gt;
&lt;br /&gt;
An overall scale factor for loudness normalization taking into account replay gain, pre-amp setting and clipping prevention through gain reduction is given below.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;min( 10^\frac{RG + G_{pre-amp}}{20}, \frac{1}{peak amplitude} )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Hardware implementation===&lt;br /&gt;
The above three steps are appropriate to software players operating on the digital signal in order to scale it. However, it is possible to send the digital signal to the DAC without level correction, and to place an attenuator in the analogue signal path. The attenuator can then be driven by the Replay Gain value. The clipping problem can be addressed by providing adequate headroom in the analog circuitry. Bit transparency and maximum signal to noise ratio is maintained in the digital signal and DAC process.&amp;lt;ref&amp;gt;A system using today&#039;s 24-bit converters is unlikely to appreciate any overall gain in system performance with such an arrangement. A digitally-controlled analog gain element typically introduces significant noise and distortion.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Acknowledgements==&lt;br /&gt;
The [http://replaygain.hydrogenaudio.org original ReplayGain proposal] was developed by David Robinson and was published 10 July 2001. Additional updates were published by David Robinson through 10 October 2001.&lt;br /&gt;
&lt;br /&gt;
The following acknowledgement was included with the original proposal, &amp;quot;The algorithm to calculate an ideal replay gain has grown from my research into human hearing, with many additional ideas drawn from the work of E. Zwicker, and Brian Moore. I am currently completing my PhD at the University of Essex, and have been funded by the EPSRC.&amp;quot; Additionally David Robinson credited Glen Sawyer (Snelg) and Jim Casaburi (Walrus) for software contributions and Bob Katz and Matt Ashland for ideas.&lt;br /&gt;
&lt;br /&gt;
This updated ReplayGain specification reflecting current and recommended practice was prepared by Kevin Gross in 2011.&lt;br /&gt;
&lt;br /&gt;
==Contact==&lt;br /&gt;
For ReplayGain-related questions or contributions, please post in the [http://www.hydrogenaudio.org/forums/index.php?showforum=1 General Audio] section of the Hydrogen Audio forums.&lt;br /&gt;
 &lt;br /&gt;
==Appendix==&lt;br /&gt;
# [[ReplayGain legacy metadata formats]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Notat</name></author>
	</entry>
</feed>