Loudness measurement according to EBU R-128
Fons ADRIAENSEN,
Casa della Musica,
Pzle. San Francesco 1,
43000 Parma (PR),
Italy,
fons@linuxaudio.org
Abstract Even if a recording is made by an audio tech-
This paper introduces a new Linux application im- nician knowing his business there will be prob-
plementing the loudmess and level measuring algo- lems. Imagine you are recording a talk with stu-
rithms proposed in recommendation R-128 of the dio guest that will used later ’as live’ in some
European Broadcasting Union. The aim of this pro- program with the same presenter. You know the
posed standard is to ease the production of audio presenter will just click the start button and the
content having a defined subjective loudness and interview will be played out without any level
loudness range. The algorithms specified by R-128
adjustments. At what level should you record
and related standard documents and the rationale
for them are explained. In the final sections of the it ? The same problem occurs nearly all the
paper some implementation issues are discussed. time, for the simple reason that so much con-
tent is first produced ’out of context’ and later
Keywords used blindly and without any consideration of
Loudness, metering, mastering, EBU the context.
Broadcasters are aware of the problem but
1 Introduction
don’t have the means to do much about it.
Most radio listeners and TV viewers will proba- Most large organisations have technical guide-
bly agree that having to reach for the remote lines which may or may not be followed for in-
control to adjust the audio volume every so house production, and with varying degrees of
many seconds is a nuisance. Yet it happens all succes. Smaller ones usually just don’t care.
the time, and there are many reasons for this. And all of them are to some degree involved in
One of them is the nature of contemporary the ’loudness war’, and forced to increase levels
broadcast content, a large part of which con- rather than control them.
sists of sequences of ’bumpers’, commercials,
previews and teasers of upcoming features, etc. What is missing is some standard way to de-
All of these originate from different production termine the ’loudness’ of audio content, and one
sources and none of those is particularly inter- which can be easily automated. Current meter-
ested in the final listener experience, let alone ing systems are of little use for this, as will be
responsable for it. seen in later sections.
In the ’old days’ there would be a trained Given such a standard, it would be possible
audio technician taking care of continuity and to define target loudness levels for any particu-
levels. Such a person would preview upcoming lar type of content or program. Audio techni-
content, be familiar with the avaliable metering cians would know what to do when recording,
and monitoring equipment, and above all, use and automated systems would be able to ’mea-
his/her ears. In the worst case anything out of sure’ the loudness of audio files and store the
order would be adjusted promptly. result in a database (or add it to the file as
Today the situation is very different. You metadata) for use during play-out. Consumer
won’t find an audio technician in a typical TV playback systems could do the same. This could
continuity studio - more often than not audio even lead to a much needed improvement in mu-
is slaved to the video switcher and there are sic recording practices: if music producers know
no level adjustments at all. For radio in many that broadcasters and playback systems will ad-
cases the presenter takes care of everything (or just the level of their records anyway, there is
tries to), and much play-out is just automated no more reason to push it up using the absurd
without any human monitoring it. amounts of agressive compression we see today.
2 An overview of current level A pseudo peak meter can provide some idea
metering practice of loudness, but only to an experienced user.
A number of quite different audio level measur- The reason is that the relation between indi-
ing methods are being used today. Most of them cated level and effective loudness depends very
do not provide any reliable measure of subjec- much on the type of content, and some interpre-
tive loudness. tation is required. This makes this type of me-
tering algorithm unsuitable for automated loud-
2.1 VU meters ness measurement.
The VU meter was designed in the days when
2.4 Bob Katz’ K-meter
audio equipment used tubes1 and therefore
could use only simple electronics, at most an This is a relatively new way to measure and dis-
amplifier stage to drive the passive meter. But play audio levels, proposed by mastering expert
it was quite strictly specified. Bob Katz. It displays both the digital peak and
A real VU meter, as opposed to something RMS values on the same scale. Since for normal
just looking like one,2 indicates the average of program material the RMS level will always be
the absolute value of the signal (which is not the lower than the peak value, and the intended use
RMS level). For a fixed level signal, it should is based on controlling the RMS level (with the
rise to 99% of the final value in 300 ms, and over- peak indication only as a check for clipping) the
shoot it by 1 to 1.5% before falling back. The reference ’0 dB’ level is moved to either 20 or 14
small overshoot may seem a detail but it isn’t — dB below digital full scale. The ballistics are not
it has quite a marked effect on the actual ballis- specified in detail by Katz, but they should cor-
tics. These are determined not by any electron- respond to a simple linear lowpass filter, and not
ics but only by the properties of the moving-coil use different rise and fall times as for a PPM.
meter which is a classic mass + spring + damp- Typical implementations use a response speed
ing system equivalent to a second order lowpass similar to a VU meter.
filter. The K-meter provides quite a good indica-
A real VU meter does provide some indica- tion of loudness, mainly because it uses the true
tion of loudness, but not a very accurate one in RMS value, and because its response is not too
practice. Apart from that its dynamic range is fast. One way to improve this would be to add
quite limited. some filtering, and this is indeed what is done
in the system discussed in the next sections.
2.2 Digital peak meters
These indicate the peak sample value, with a 2.5 Discussion
short holding time and/or a slow fallback. They It should be clear that with the possible excep-
are found in most consumer and semi-pro equip- tion of the K-meter (which is not as widely used
ment and in almost all audio software. They as it should be), current audio level metering
can be useful to indicate signal presence and systems provide a rather poor indication of ac-
check digital recording levels for clipping, but tual subjective loudness.
they provide no useful loudness indication at Another issue is that all these level measure-
all. And in fact even as peak meters most of ment systems were designed for interactive use,
them fail, as the real peaks are almost always and only provide a ’momentary’ level indication.
between the samples. What is really needed is a way to automatically
determine the average loudness of a recording,
2.3 Pseudo peak meters e.g. a complete song, in a reliable way and with-
A PPM, also known as ’peak program meter’ is out requiring human interpretation.
driven by the absolute value of the signal (again Apart from such an average loudness value,
not RMS), but with a controlled rise time (usu- another one of interest is the subjective loudness
ally 10 ms, sometimes 5) and a slow fallback. range of some program material — how much
This is the most popular type of meter in broad- difference there is between the softer and louder
casting (at least in Europe), and in many pro- parts. This value could for example guide the
fessional environments. Specifications are pro- decision to apply (or not) some compression, de-
vided by various organisational or international pending on the listening conditions of the target
standards. audience.
1
or valves for some of us Surprisingly few application or plugins for
2
as do most of them loudness measurement are available and widely
6 surround the weights for L,R and C are unity,
4 +1.5 dB for the surround channels, and the LFE
2
channel is not used. For stereo only L and R
0
are used. In all cases there is just a single dis-
-2
play for all channels combined — the idea is
-4
that a loudness meter would be used along with
-6
conventional per-channel level meters and not
-8
-10
replace those.
-12
The summed value is converted to dB, and a
-14
correction of -0.69 dB is added to allow for the
100 1000 10000
non-unity gain of the K-filter at 1 kHz. This fa-
cilitates calibration and testing using standard
Figure 1: The K-filter response 1 kHz signals. For a 0 dBFS, 1 kHz sine wave
in either of L,R or C the result will be -3 dB.
For the same signal in both L and R it will be
used. The application presented at the LAC in 0 dB.
2007 [[Cabrera, 2007]] seems not to be actively The ITU document does not specify if +3dB
developed anymore. should be added when measuring a mono sig-
In the commercial world a notable exception nal. Considering that a such a signal will in
is Dolby’s LM100. Early versions only sup- many cases be reproduced by two speakers (i.e.
ported Leq based measurements, while recent it is really the equivalent to a stereo signal with
releases also offer a mode based on the ITU al- identical L and R) such a correction would seem
gorithm discussed in the next section. to be necessary.
According to [[ITU, 2006a]] the output of a
3 The ITU-R BS.1770 loudness loudness measurement performed according to
algorithm this algorithm should be designated ’LKFS’ —
The EBU R-128 recommendation (discussed in Loudness using the K-filter, w.r.t. to Full Scale.
the following section) is based on the loud- A second ITU document, [[ITU, 2006b]], pro-
ness measurement algorithm defined in [[ITU, vides some recommendations related to how
2006a]]. This specification is the result of re- loudness measurements should be displayed on
search conducted in several places over the past a real device. In practice the LKFS scale is
10 years. Listening tests using hundreds of care- replaced by one that defines a ’zero’ reference
fully chosen program fragments have shown a level at some point below full scale. To indi-
very good correlation between subjective loud- cate that this is not a real level measurement
ness and the output of this algorithm. Details the scale is marked in ’LU’ (Loudness Units)
and more references can be found in the ITU instead of dB, with 1 LU being the same ratio
document. as 1 dB. A linear range of at least -21 to +9
The ITU recommendation specifies the use a LU is recommended, but the reference level it-
weighting filter followed by a mean square av- self is not specified. This probably reflects the
eraging detector. The filter response is shown view that a different reference could be used in
in fig.1 and is the combination of a second or- each application domain (e.g. film sound, music
der highpass filter (the same as in the Leq (RLB) recording,. . . ).
standard), and a second order shelf filter. The This document also recommends the use of an
latter is added to model head diffraction effects. ’integrated’ mode to measure the average loud-
The combination of the two filters is called the ness of a program fragment, but again does not
K-filter 3 specify the algorithm in any detail.
For multichannel use the mean squared values
for each channel are multiplied by a weighting 4 The EBU R-128 recommendation
factor and added. This means that the powers Recommendation R-128 [[EBU, 2010a]] builds
are added and that inter-channel phase relation- on ITU-R BS.1770 and defines some further
ships have no effect on the result. For ITU 5.1 parameters required for a practical standard.
3
This could result in some confusion with the ’K’ from
More detail is provided by two other EBU docu-
Bob Katz’ name as used in ’K-meter’. There is no rela- ments, [[EBU, 2010b]] and [[EBU, 2010c]]. Two
tion between the two. more are in preparation but not yet available at
the time of writing. a second step all points more than 8 dB below
the first computed value are removed and the
4.1 Reference level and display ranges average power is recomputed. This second, rel-
R-128 defines the reference level as -23 dB rel- ative threshold ensures that the integrated mea-
ative to full scale, i.e. a continuous 1 kHz sine surement is not dominated by long periods of
wave in both L and R and 23 dB below clipping relative silence as could occur in some types of
corresponds to standard loudness. program.
It also requires meters conforming to this The result is the integrated loudness value,
standard to be able to display levels either rela- displayed as either LU or LUFS according to
tive to this reference and designated LU, or to the scale selected by the user. This algorithm
full scale and designated LUFS. Two display can be applied either in real time or on recorded
ranges should be provided: one from -18 to +9 audio. When a loudness meter is operating on
dB relative to the reference level, and the sec- real-time signals the indicated value should be
ond from -36 to +18 dB. The user should at any updated at least once per second.
time be able to switch between these four scales.
This choice then applies to all displayed values. 4.4 Loudness range, LRA
The purpose of the loudness range measure-
4.2 Dynamic response: M,S,I ments is to determine the perceived dynamic
Three types of response should be provided by range of a program fragment. This value can be
a loudness meter conforming to R-128: used for example to determine if some compres-
The M (momentary) response is the mean sion would be necessary. The algorithm is de-
squared level averaged over a rectangular win- signed to exclude the contribution of very short
dow of 400 ms. An R-128 compliant meter loud sounds (e.g. a gunshot in a movie), of short
should also be able to store and show the max- periods of relative silence (e.g. movie fragments
imum of this measurement until reset by the with only low level ambient noises), and of a
user. fade-in or fade-out.
The S (short term) response is the mean The input to the LRA algorithm consists of
squared level averaged over a rectangular win- the full history, within the same interval as for
dow of 3 seconds. R-128 requires this to be up- the integrated loudness, of the levels used for
dated at least ten times per second. No such the S measurement. The windows used should
value is specified for the M response, but it overlap by at least 2 seconds.
seems reasonable to assume that at least the First an absolute threshold of -70 dB is ap-
same update rate would be required. plied and the average value of the remaining
The I (integrated) response is an average over windows is computed — this is similar to the
an extended period defined by the user using first step for the integrated loudness (but using
Start, Stop and Reset commands. It is detailed different input). A second threshold is then ap-
in the following section. plied at 20 dB below the average value found in
the first step. The lower limit of the loudness
4.3 Integrated loudness
range is then found as the level that is exceeded
The integrated loudness measurement is in- by 90 percent of the remaining measurement
tended to provide an indication of the average windows, and the upper limit is the level ex-
loudness over an extended period, e.g. a com- ceeded by the highest 5 percent. In other words,
plete song. the loudness range is the difference between the
It is based on the full history, within an in- 10% and 95% percentiles of the distribution re-
terval specified by the user, of the levels used maining after the second threshold.
for the M response. The input to the integra-
tion algorithm should consist of measurements 4.5 True peak level
in 400 ms windows that overlap by at least 200 Both the ITU and EBU documents cited in pre-
ms. vious sections recommend the use of true peak
Given this input, the integrated loudness is level indication in addition to loudness measure-
computed in two steps. First the average power ment.
of all windows having a level of at least -70 dB Most peak meters just display the absolute
is computed. This absolute threshold is used to value of the largest sample. There are two
remove periods of silence wich may occur e.g. potential sources of error with this simple ap-
at the start and end of a program segment. In proach. First, almost all peaks occur between
Figure 2: The EBU mode meter
the samples. To reduce the error from failing to the integration period for the I and LRA mea-
see these peaks, [[ITU, 2006a]] recommends to surements. A simple implementation of the al-
upsample the signal by a factor of at least four. gorithms would require unlimited storage size,
Second, the peak level may be different if later and for the loudness range calculation the stored
stages in the processing include DC-blocking — data would need to be sorted as well. The so-
in fact it could be either higher or lower. For lution is to use histogram data structures in-
this reason it is recommended to measure peak stead — these require a fixed storage size, keep
levels both with and without DC blocking, and the data sorted implicitly, and make it easy to
display the highest value. find the percentiles for the loudness range cal-
The EBU documents do not require a contin- culation. The current implementation uses two
uous display of peak levels. Instead they rec- histograms, each having 751 bins and covering
ommend the use of a true peak indicator with a the range from -70 to +5 dB with a step of 0.1
threshold of 1 dB below the digital peak level. dB. Points below -70 dB can be discarded, as
the absolute threshold in both algorithms will
5 Implementation remove them. Levels higher that +5 dB RMS
The ebulm application (fig.2) is written as a over a 400 ms period mean the measurements
Jack client. The upper bargraph shows either will probably be invalid anyway. If such levels
the M or S response. The two thinner ones occur they are clipped to +5 dB and an error
below display the loudness range and the inte- flag is set.
grated loudness which are also shown in numer- 6 Acknowledgements
ical form. To the right are some buttons that
control the display range and scale, and below The work done by the EBU on loudness mea-
these the controls to stop, start and reset the surement and standardization is very much
integrated measurements. the result of an initiaitive taken by Florian
Two features are missing in this version (but Camerer, senior sound engineer at ORF and
will be added): the display of the maximum chairman of the PLOUD working group.
value of the M response, and the true peak in- References
dicator.
The ITU document specifies the K-filter as Andres Cabrera. 2007. Audio metering and
two biquad sections and provides coefficients linux. In Proceedings of the Linux Audio Con-
only for a sample rate of 48 kHz, adding that ference, 2007. Available at http://http://
implementations supporting other rates should lac.linuxaudio.org/2007/papers.
use ’coefficients that provide the same frequency EBU. 2010a. EBU Recommendation R-128,
response’. It is in general not possible to create Loudness normalisation and permitted maxi-
exactly the same FR using a biquad at different mum level of audio signals. EBU, available at
rates, but the code used in ebulm comes close: http://tech.ebu.ch/publications.
errors are less than 0.01 dB at 44.1 kHz and
much less at higher rates. Another peculiarity EBU. 2010b. EBU-TECH 3341, Loudness
is that the highpass filter has a double zero at 0 Metering: EBU Mode metering to supple-
Hz as expected, but the nominator coefficients ment loudness normalisation in accordance
given for 48 kHz are just +1, −2, +1 instead of with EBU R 128, Supplementary informa-
values that would provide unity passband gain. tion. EBU, available at http://tech.ebu.
This has to be taken into account when using a ch/publications.
different sample rate. EBU. 2010c. EBU-TECH 3342, Loudness
There is no specified limit on the lenght of Range: A descriptor to supplement loud-
ness normalisation in accordance with EBU
R 128. EBU, available at http://tech.ebu.
ch/publications.
ITU. 2006a. ITU-R BS1770-1, Algorithms to
measure audio programme loudness and true-
peak audio level. ITU, available at http://
www.itu.int/rec/R-REC-BS/e.
ITU. 2006b. ITU-R BS1771, Requirements
for loudness and true-peak indicating meters.
ITU, available at http://www.itu.int/rec/
R-REC-BS/e.