Skip to main content

DR14 T.meter

DR14 T.meter is a free and open-source command-line tool for computing the dynamic range of your music, following the procedure used by the offline meter released by the Pleasurize Music Foundation (archived site).

This tool is useful for measuring how loud your music is, for seeing that a good-quality album always has good dynamics too, and for understanding the effects of the so-called loudness war.

DR14 T.meter is released under the terms of the GNU GPLv3 license. It is intended for Linux users who cannot use the Windows application released by the Pleasurize Music Foundation or the foobar2000 plugin.

I have tested this application extensively, and it has always returned results identical to those of the official offline meter.

How to use

📖 A short guide to every feature, including the local DR database and its queries, is in how_to_use.md.

Requirements: Python 3 with NumPy, and ffmpeg (or avconv) for decoding. MP3 files are decoded with lame and Ogg Vorbis files with oggdec (from vorbis-tools). Matplotlib, SciPy and Mutagen are only needed for the plotting, --compress and --tag options.

You can run the tool directly from the cloned repository as ./dr14_tmeter, or install it with pipx, which also installs NumPy and the man page:

git clone https://github.com/simon-r/dr14_t.meter.git
cd dr14_t.meter
pipx install .

Use pipx install '.[plot,compress,tag]' to also install the optional dependencies, or pip install . inside a virtual environment instead of pipx.

On Debian and Ubuntu you can build and install a .deb package instead:

sudo apt build-dep .
dpkg-buildpackage -us -uc -b
sudo apt install ../dr14tmeter_*_all.deb

Avoid sudo python setup.py install --prefix=usr: on Debian and Ubuntu it puts the package in a directory that Python does not search, and dr14_tmeter then fails with ImportError: No module named dr14tmeter.dr14_tmeter.

# Measure all the audio files in an album directory
dr14_tmeter /path/to/album

# Measure a whole music collection, one result per directory
dr14_tmeter -r /path/to/music

# Measure a single file and print its DR, peak and RMS values
dr14_tmeter -f /path/to/track.flac

When measuring a directory, the results are written to a text table named after the DR value (for example dr14-DR12.txt) in that directory. Useful options:

  • -t a also writes the results as HTML, BBCode and MediaWiki tables,
  • -o DIR writes the result files to DIR instead,
  • -p prints the full table to the terminal, and -n skips writing files.

See how_to_use.md for all the other features, or run dr14_tmeter --help for the full list of options.

How the DR value is computed

📐 The full mathematical description of the algorithm, with every quantity defined, is in dr14_algorithm.md.

In short, each channel of the track is split into blocks of about 3 seconds, and the RMS level and the peak level of every block are measured. Then, for each channel $c$ out of the $C$ channels of the track:

  • $\bar{R}_c$ is the quadratic mean of the RMS levels of the loudest 20% of the blocks,
  • $\hat{P}_c$ is the second-highest block peak.

The DR value is the ratio between the two in decibels, averaged over the channels and rounded to an integer:

$$ \mathrm{DR} = \mathrm{round}\left( \frac{1}{C} \sum_{c=1}^{C} 20 \log_{10} \frac{\hat{P}_c}{\bar{R}_c} \right) $$

More information

Visit https://github.com/simon-r/dr14_t.meter.

Metadata

Release files for DR14-T.meter 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DR14-T.meter 2.2.0
File Size Uploaded Provenance Actions
dr14_t_meter-2.2.0.tar.gz 80.8 kB Without provenance Details for dr14_t_meter-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for DR14-T.meter 2.2.0
File Interpreter ABI Platform Actions
dr14_t_meter-2.2.0-py3-none-any.whl Python 3 none any Details for dr14_t_meter-2.2.0-py3-none-any.whl

Total release size: 175.8 kB

Release files / dr14_t_meter-2.2.0.tar.gz

Download URL dr14_t_meter-2.2.0.tar.gz
Size 80.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d10a21ffe9ee33953e343b080f2a74801749f8b7c82fb84d97ca8931636479a6
BLAKE2b-256 checksum
How to use checksums
6d8e343ed257f2a6253a5b5b1797bd89b1e56ea0138bd106b36e9dd22f5e6434
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / dr14_t_meter-2.2.0-py3-none-any.whl

Download URL dr14_t_meter-2.2.0-py3-none-any.whl
Size 95.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
525ee239d3144e926ed4075689a9b724b2dfef65934cde41052b8c0e3f2f0e31
BLAKE2b-256 checksum
How to use checksums
301d924b7d4f35085f92b3ffee6c66d5195333843e9d7107826b93da744bea9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for DR14-T.meter 2.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page