# Volume Leveling
---
## Introduction
Volume Leveling automatically adjusts the the playback volume in order to maintain a consistent level regardless of the source material.
Many people have Volume Leveling enabled all of the time as a way to minimize the need for manual volume adjustments. Others only use it for parties, radio, or mixed playlists where volume level differences from track to track are more severe.
Roon's volume leveling implementation is based on the [EBU R128](https://tech.ebu.ch/loudness) standards, and we follow the recommendations made by the [Music Loudness Alliance](http://music-loudness.com/).
Before Roon can make adjustments, it must have some information about the loudness of the materials and its peak values. This information is obtained during [[Audio Analysis]].
## Enabling Volume Leveling
Volume Leveling is not enabled by default. You can find settings related to Volume Leveling on the [[Zone Settings]] screen.
<img src='http://roon-kb.s3.amazonaws.com/553b8c41-16b1-4d86-960d-165425020abc.png'/>
Roon supports four Volume Leveling modes:
- **Off** - disable volume leveling for this zone
- **Track** - Performs adjustments on a track-by-track basis. This produces the most consistent volume level during a playback session, but may result in unpleasant jumps in volume during playback of a gapless album.
- **Album** - Performs adjustments on an album-by-album basis. This means that the entirety of an album plays back with the same adjustment, and there are no perceived volume jumps at track boundaries.
- **Auto** - Uses track adjustments when playing adjacent tracks from different albums, and album level adjustments when playing adjacent tracks from the same album.
The "Volume adjustment when loudness is unknown" setting specifies a volume adjustment that should be applied when Roon does not have advance knowledge of the loudness of a track, for example when playing a track that has not been analyzed yet, or an internet radio stream.
This setting prevents large changes in volume when transitioning from content of known loudness to content of unknown loudness. The default of -5dB represents a reasonable compromise--since Volume Leveling makes almost all material quieter.
## How Volume Adjustments are applied
Adjustments performed for the sake of volume leveling are simple gain adjustments--the audio signal is multiplied by a constant gain value. Currently, the adjustment is applied within Roon's [[DSP Engine]], but it's likely that future [[!Roon Ready|Roon_partner_programs]] devices will support volume leveling in hardware.
You can see exactly what is happening using [[Signal Path]]:
<img src='http://roon-kb.s3.amazonaws.com/5d464dd1-d15b-4488-b836-89769660beb6.png'/>
If a positive gain adjustment would cause some part of a track to clip, the gain adjustment is modified to avoid clipping. This reasoning uses the "true peak" value captured during audio analysis. This is fairly rare, since positive gain adjustments are uncommon.
Per R128 recommendations, Roon targets a final loudness of -23 LUFS. This is a fairly quiet level, thus Volume Leveling may prompt you to increase volume elsewhere in the system to compensate.
## Viewing Volume Leveling Information
You can see volume leveling information on the File Info popup. This can be accessed by selecting "View File Info..." for a track in your library.
<img src='http://roon-kb.s3.amazonaws.com/d4b46c14-3211-44fd-a143-bb4a7d64aa71.png'/>
The "dB" numbers represent the volume adjustment that will be necessary to adjust this track or album to the target level of -23LUFS.
The "dbTP" numbers represent the "True Peak" level for the track or album.
The "Dynamic Range" value reflects the R128 "Loudness Range" for this track. For more information, [[!see here|Dynamic_Range]].
## Using Loudness Data in `REPLAYGAIN` tags
[ReplayGain](https://en.wikipedia.org/wiki/ReplayGain) is an older volume leveling system than R128. It is different in a couple of key ways:
- The analysis process uses a different algorithm, so it produces different adjustments
- ReplayGain targets a final volume level that's 5dB louder than R128's target of -23 LUFS
- ReplayGain information is often written into `REPLAYGAIN_*` tags in media files.
Since many files out in the world already contains these tags, Roon supports making use of that information when it's present.
(Note that in may cases, `REPLAYGAIN_*` tags may contain R128 measurements that have been adjusted by 5dB to compensate for the differences in target level. This doesn't present a problem--just something to be aware of!)
Roon supports the following file tags:
```
REPLAYGAIN_ALBUM_GAIN
REPLAYGAIN_ALBUM_PEAK
REPLAYGAIN_TRACK_GAIN
REPLAYGAIN_TRACK_PEAK
REPLAYGAIN_REPLAYGAIN_REFERENCE_LOUDNESS
```
When `REPLAYGAIN_REFERENCE_LOUDNESS` is not provided the `*_GAIN` tags are interpreted relative to an assumed target of -18 dBFS.
To turn on this support, go into Settings -> Library -> Import Settings, then enable one or both of these options:
<img src='http://roon-kb.s3.amazonaws.com/ab366643-5236-4bca-aaac-c6a88e601300.png'/>