Loudness measurement according to EBU R-128 Fons ADRIAENSEN, Casa della Musica, Pzle. San Francesco 1, 43000 Parma (PR), Italy, [email protected] 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. Imagineyouarerecordingatalkwithstu- rithms proposed in recommendation R-128 of the dio guest that will used later ’as live’ in some EuropeanBroadcastingUnion. Theaimofthispro- programwiththesamepresenter. Youknowthe posed standard is to ease the production of audio presenterwilljustclickthestartbuttonandthe 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 it ? The same problem occurs nearly all the for them are explained. In the final sections of the time, for the simple reason that so much con- paper some implementation issues are discussed. 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, What is missing is some standard way to de- previews and teasers of upcoming features, etc. terminethe’loudness’ofaudiocontent, andone All of these originate from different production which can be easily automated. Current meter- sources and none of those is particularly inter- ing systems are of little use for this, as will be ested in the final listener experience, let alone seen in later sections. responsable for it. 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 playbacksystemscoulddothesame. Thiscould continuity studio - more often than not audio evenleadtoamuchneededimprovementinmu- is slaved to the video switcher and there are sicrecordingpractices: ifmusicproducersknow no level adjustments at all. For radio in many thatbroadcastersandplaybacksystemswillad- 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. The reason is that the relation between indi- A number of quite different audio level measur- cated level and effective loudness depends very ingmethodsarebeingusedtoday. Mostofthem muchonthetypeofcontent,andsomeinterpre- do not provide any reliable measure of subjec- tation is required. This makes this type of me- tive loudness. teringalgorithmunsuitableforautomatedloud- 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 Thisisarelativelynewwaytomeasureanddis- 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 RMSvaluesonthesamescale. Sincefornormal just looking like one,2 indicates the average of program material the RMS level will always be theabsolutevalueofthesignal(whichisnot 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 riseto99%ofthefinalvaluein300ms,andover- peak indication only as a check for clipping) the shoot it by 1 to 1.5% before falling back. The reference’0dB’levelismovedtoeither20or14 smallovershootmayseemadetailbutitisn’t— dBbelowdigitalfullscale. Theballisticsarenot 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- respondtoasimplelinearlowpassfilter,andnot icsbutonlybythepropertiesofthemoving-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- tionofloudness, mainlybecauseitusesthetrue 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 2.5 Discussion These indicate the peak sample value, with a shortholdingtimeand/oraslowfallback. They It should be clear that with the possible excep- arefoundinmostconsumerandsemi-proequip- tionoftheK-meter(whichisnotaswidelyused 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 andonlyprovidea’momentary’levelindication. 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. acompletesong,inareliablewayandwith- A PPM, also known as ’peak program meter’ is out requiring human interpretation. drivenbytheabsolutevalueofthesignal(again Apart from such an average loudness value, not RMS), but with a controlled rise time (usu- anotheroneofinterestisthesubjectiveloudness ally 10 ms, sometimes 5) and a slow fallback. range of some program material — how much Thisisthemostpopulartypeofmeterinbroad- differencethereisbetweenthesofterandlouder casting (at least in Europe), and in many pro- parts. This value could for example guide the fessional environments. Specifications are pro- decisiontoapply(ornot)somecompression,de- vided by various organisational or international pendingonthelisteningconditionsofthetarget standards. audience. 1or valves for some of us Surprisingly few application or plugins for 2as do most of them loudness measurement are available and widely surround the weights for L,R and C are unity, 6 4 +1.5dBforthesurroundchannels,andtheLFE 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 replace those. -10 The summed value is converted to dB, and a -12 correction of -0.69 dB is added to allow for the -14 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 L based measurements, while recent it is really the equivalent to a stereo signal with eq releases also offer a mode based on the ITU al- identicalLandR)suchacorrectionwouldseem 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 LoudnessusingtheK-filter, w.r.t. toFullScale. 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 10years. Listeningtestsusinghundredsofcare- 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- eachapplicationdomain(e.g. filmsound, music derhighpassfilter(thesameasintheL (RLB) recording,...). eq standard), and a second order shelf filter. The Thisdocumentalsorecommendstheuseofan latterisaddedtomodelheaddiffractioneffects. ’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-filter3 specify the algorithm in any detail. Formultichannelusethemeansquaredvalues 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 areaddedandthatinter-channelphaserelation- 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. MoredetailisprovidedbytwootherEBUdocu- 3Thiscouldresultinsomeconfusionwiththe’K’from ments, [[EBU, 2010b]] and [[EBU, 2010c]]. Two Bob Katz’ name as used in ’K-meter’. There is no rela- 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- ativethresholdensuresthattheintegratedmea- 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 canbeappliedeitherinrealtimeoronrecorded 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 ondfrom-36to+18dB.Theusershouldatany updated at least once per second. timebeabletoswitchbetweenthesefourscales. 4.4 Loudness range, LRA This choice then applies to all displayed values. 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 loudsounds(e.g. agunshotinamovie),ofshort 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 TheI(integrated)responseisanaverageover 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- ceededbythehighest5percent. Inotherwords, 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 BoththeITUandEBUdocumentscitedinpre- ms. vious sections recommend the use of true peak Given this input, the integrated loudness is levelindicationinadditiontoloudnessmeasure- 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 andfortheloudnessrangecalculationthestored 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 over a 400 ms period mean the measurements The ebulm application (fig.2) is written as a will probably be invalid anyway. If such levels Jack client. The upper bargraph shows either occur they are clipped to +5 dB and an error the M or S response. The two thinner ones flag is set. below display the loudness range and the inte- grated loudness which are also shown in numer- 6 Acknowledgements ical form. To the right are some buttons that The work done by the EBU on loudness mea- control the display range and scale, and below surement and standardization is very much these the controls to stop, start and reset the the result of an initiaitive taken by Florian integrated measurements. Camerer, senior sound engineer at ORF and Two features are missing in this version (but chairman of the PLOUD working group. will be added): the display of the maximum value of the M response, and the true peak in- References dicator. Andres Cabrera. 2007. Audio metering and The ITU document specifies the K-filter as linux. In Proceedings of the Linux Audio two biquad sections and provides coefficients Conference, 2007. Available at http://lac. only for a sample rate of 48 kHz, adding that linuxaudio.org/2007/papers. implementations supporting other rates should use’coefficientsthatprovidethesamefrequency 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,availableat 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 EBU. 2010b. EBU-TECH 3341, Loudness much less at higher rates. Another peculiarity Metering: EBU Mode metering to supple- is that the highpass filter has a double zero at 0 ment loudness normalisation in accordance Hz as expected, but the nominator coefficients with EBU R 128, Supplementary informa- given for 48 kHz are just +1,−2,+1 instead of tion. EBU, available at http://tech.ebu. values that would provide unity passband gain. ch/publications. This has to be taken into account when using a 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,availableathttp://www.itu.int/rec/ R-REC-BS/e.