Levels & dynamics

Dynamics (DR)

DR compares peaks with the average levels of loud passages. It gives a sense of the room left for attacks and contrasts within those passages.

Reading the result

A high DR means a larger gap between peak and average. It is not enough to choose the best master. Variation between quiet and loud passages is described differently by LRA.

Understanding the measurementIllustrative synthetic signal. Drawing dimensions do not represent detector thresholds or durations; these are specified in the method below.Amplitude0Time →
Illustrative synthetic signal. Drawing dimensions do not represent detector thresholds or durations; these are specified in the method below.
Go deeperMethod, limits, verification and sources

The DR column is a DR-meter-style crest-factor estimate: the file's sample peak compared with the RMS of its loudest sustained passages. It describes level dynamics, independently of losslessness, provenance and loudness normalisation.

Calculation#

The decoder accumulates the mean square of each frame into blocks of 131,072 frames, roughly three seconds at 44.1 kHz. A trailing partial block is included only when it contains at least one quarter of that size. At the end, blocks are sorted by energy; the loudest 20%, rounded up to at least one block, are averaged. The output is:

DR = 20 × log10(sample peak / RMS of loudest blocks)

This follows the basic idea of comparing peak level with loud-passage RMS. It deliberately uses a fixed frame count, so the block duration varies with sample rate; at 96 kHz it is about 1.37 seconds rather than three.

Float PCM can store magnitudes above full scale. DR uses their actual sample peak without clamping it to 1.0, so multiplying the entire signal by a constant gain does not change its crest factor.

Interpretation#

Higher values mean more crest factor in the selected loud passages. The interface uses a green cue at 12 dB and above and a warning cue below 8 dB. Values between these boundaries are descriptive. A high DR value does not prove that a master is preferable, and a low value does not prove clipping or poor audio quality.

No reading is produced for silence, a zero sample peak or an invalid loud-passage RMS. The ordinary sample peak is used, so this value should not be confused with the true peak result.

Limits#

This is not the official output of a particular DR Meter release and not an EBU loudness-range measurement. Different block sizes, weighting, gating and peak definitions can produce different numbers. Short tracks have few blocks, and a loud isolated event can influence both peak and the loudest-block selection.

For perceived programme loudness use Integrated loudness; for variation in loudness over time use Loudness range.

Tests#

cargo test -p flaccompagnon-core analysis::analyzer

Analytical tests cover the 3.0103 dB crest factor of a sine, including float peaks of 0.9 and 1.8, plus an independently specified six-block fixture whose loudest 20% is two blocks.

A useful manual comparison is a quiet sine and the same sine with a short high-level burst. The burst should increase sample peak much more than the loudest-block RMS, increasing the displayed DR. This demonstrates the defined calculation rather than an external standard.

Integrating the engine in your software?

Browse the Rust API in Rustdoc ↗