A new feature: room objective acustical parameters calculation module Simone CAMPANINI and Angelo FARINA Departement of Industrial Engineering - University of Parma viale G.P.Usberti, 181/A 43100 Parma, Italy, [email protected], [email protected]

Abstract 2 ISO 3382 Acoustical Parameters Audacity is a popular and powerful platform for au- Before describing the , a quick review dio editing. It has many useful features, a flexible of the subject matter may be required.2 plug-in subsystem, and is multiplatform too. The latter characteristic greatly facilitates the develop- 2.1 Reverberaton time ment of portable acoustic applications that will work This is the best known parameter, a sort of fun- regardless of the system employed by the final user. damental of the acoustic science, defined as the This conducted us to start the porting of Angelo Fa- time - in seconds - needed by the sound pressure rina’s Aurora plug-in family for R to Audacity, beginning with the Acoustical Parameters level to decrease by 60 dB; the rate of decay is module. In this article we describe this development measured by the linear least-squares regression work and the results obtained. of the measured decay curve from a level 5 dB below the initial level to 35 dB below. This is 3 Keywords called T30. When the final value is changed to Audacity, Acoustical parameters, Impulse response, 25 dB we obtain T20. It is important to note that, even if the decay rate is measured over 1 Introduction a range of just 30 or 20 dB, the reverberation time is always expressed as the time required During the evolution of the architectural acous- for a 60 dB decay. If the decay is linear, hence, tic science it became clear there was a need for T = T = T . a set of parameters describing the acoustic be- 60 30 20 havior of a room. It is well known that human 2.2 Clarity, Definition and Center Time sound perception is very subjective, but the de- These parameters express a balance between sign of an auditorium, for example, shouldn’t early and late arriving energy, that is useful to be based on a subjective basis. An auditorium, measure the clarity as perceived by human ears. or a theatre, should be a place where people The Ct parameter is used with te = 50 ms, can have a good perception of the concert, the e or te = 80 ms dependently on the destination show or whatever is performed there. To reach of the room, speech or music listening, respec- this very difficult goal a designer needs objective tively. Ct is defined as data to guide the design of room structures — e Z te these data are called objective acoustical param- 2 eters charachteristic of a particular room. Many p (t) dt 0 parameters have been studied, from the 1950s Cte = 10 log Z ∞ [dB]. (1) up to today. It is impossible to ignore the great p2(t) dt work done by Leo Beranek in this field: one of te the results of his research is a set of parameters, where p(t) is the measured impulse response.4 releated to the reverberation time, that describe various aspects of a room from an acoustical draft edition in which there are no differences in param- point of view. eters definitions between this and the previous version. 2The understanding of architectural acoustic mea- The most important of them are collected and surements implies the knowledge of impulse measures defined in the ISO 3382 standard1 [1]. theory and techniques; possible references are [2] and [3]. 3This can be mandatory when environment noise is 1In this article all the references are to the too loud. ISO 3382:1997 standard; there is a ISO 3382-1:2008 re- 4p(t), when not differently specified, is always a pres- vision that is actually at approval stage. We’ve seen a sure impulse response measured with an omnidirectional The Definition index 5 is less used than Clarity; a figure-of-eigth pattern microphones6 it is pos- in the balance it includes not only the late en- sible to get some of these information and cal- ergy, but the total energy of the signal: culate, i.e., Lateral Fraction parameter, defined as: Z 50ms p2(t) dt Z 80ms 2 0 p (t) dt D50 = Z ∞ . (2) L 2 LF = 5ms . (5) p (t) dt Z 80ms 0 p2(t) dt At last the Center Time is the time of the cen- 0 ter of gravity of the squared impulse response; Lateral Fraction expresses the ratio between 7 it can be measured in seconds, and avoids dis- the lateral sound energy (pL(t) ) and the total 8 crete division of the impulse response into early energy that comes to the listener (p(t) ), giving and late periods: a measure of the Apparent Source Width. It can be used also the Lateral Fraction Cosine, that Z ∞ is another approximation of the lateral energy 2 t · p (t) dt fraction: 0 Ts = Z ∞ [ms]. (3) p2(t) dt Z 80ms 0 |pL(t) · p(t)| dt LFC = 5ms , (6) 2.3 Sound strength Z 80ms p2(t) dt In an open space, it’s obvoiusly impossible to 0 naturally ’amplify’ an acoustic signal, but in a it comes from the observation that, in fact, the closed room this can be possibile and a mea- figure-of-eight pattern is a cosine pattern, and sure of how much the environment increases (or the resulting contribution to lateral energy for decreases) the perceived loudness of a sound is an individual reflection varies with the square of given by the Sound Strength parameter. It is the cosine of the angle of incidence of the reflec- defined as the logarithmic ratio of the squared tion relative to the axis of maximum sensitivity and integrated sound pressure of the measured of the microphone. impulse response to that of the response mea- Surround effect can be measured with the Late sured at a distance of 10 m from the same om- Lateral Sound Energy (LG), defined as: nidirectional sound source in a free field:

Z ∞ Z ∞ 2 2 p (t) dt pL(t) dt 0 80ms G = 10 log Z ∞ [dB], (4) LG80,∞ = 10 log Z ∞ [dB], (7) 2 2 p10(t) dt p10(t) dt 0 0

where p10(t) is the instantaneous sound pres- 2 where p10(t) is the same measure seen in 2.3. sure of the impulse responset measured at a dis- This parameter is related to the perceived lis- tance of 10 m in a free field. tener envelopment or spaciousness in the audi- 2.4 Early and late lateral energy torium. measures 2.5 Interaural cross-correlation The acoustical comfort is greatly increased if the Human spatial perception is due to the natu- sound experience can surround the listener: for ral stereo human audio system, particularly to this reason a set of spatial parameters that give the difference between the signals that arrives a measure of the sound source virtual width, 6 or the enveloping effect is defined. These pur- W and Y channels of a microphone, such as a Soundfield R , can do the same. poses need spatial informations: with a - 7This is the signal caught by the figure-of-eight pat- ing system composed by an omnidirectional and tern microphone: obviusly the norm specifies that it has to be pointed in a way that minimize the direct waves microphone. response and maximizes the lateral waves one. 5Adimensional parameter, it can be normalized to ‘1’, 8This is the signal caught by omnidirectional micro- or a percentile. phone. to the two ears. No differences between left and 3 The Aurora’s Acoustical right sounds means no spatial information, and Parameter plug-in then a listener won’t be able to locate a sound Aurora9 is a suite of plug-ins for Adobe source in a scene that will seem completely flat Audition R developed and manteined by profes- to him. With a binaural microphone it is pos- sor Angelo Farina. This software includes: sible to record exactly what arrives at two ears, and a cross-correlation operation between these • an ISO 3382 Acoustical Parameters calcu- two signals will reveal the spatial degree of the lator information: this is the definition of the Inter- • complete toolset for impulse response mea- aural Cross-Correlation function (IACF), that surement with MLS technique can be expressed in the following mathematical form: • complete toolset for impulse response mea- surement with ExponentialSineSweep tech-

Z t2 nique pl(t) · pr(t + τ) dt • various convolution tools, including warped IACF (τ) = t1 . t1/t2 s FIR Z t2 Z t2 2 2 pl (t) dt · pr(t) dt • inverse filters generator, for equalization t1 t1 purposes and creation of cross-talk can- (8) celling filters for binaural reproduction over Studies have shown that Interaural Crosscor- loudspeakers relation Coefficients (IACC) correlate well with the subjective quality spatial impression in a • Speech Transmission Index (STI) calcula- concert hall, like the lateral energy parameters tor set: • ITUP56 Time History Analyzer • Synchronous average and IR select, for sep- IACCt1/t2 = max(|IACFt1/t2 (τ)|) (9) arating linear and notlinear components of for − 1 ms < τ < +1 ms. the impulse response 2.6 Stage parameters • Acoustic Quality Test (AQT) plugin for the During a musical performance not only the lis- analysis of the sound field in small enclo- teners’ but also the musicians’ perception is im- sure, portant. Musicians need to hear themselves and that is a complete toolset for acoustic mea- each other in a way that allows them to per- surements, whose description can be very form well. On-stage acoustics are described by long and cover many aspects of acoustic sci- ’stage parameters’. The ISO 3382 standard in- ence; in this context the focus is pointed dicates two useful indexes, defined by the fol- on the first module, the Acoustical Parame- lowing equations: ters calculator.10 Simplifying, given an im- pulse response, which have to be loaded in Z 100ms the Adobe Audition R enivironment, it calcu- 2 p (t) dt lates the ISO 3382 acoustical parameters. ST = 20ms [dB] (10) Early Z 0ms The input inpulse response can be mono or p2(t) dt stereo; in the first case the parameters calcu- 0 lated are: Z 1000ms p2(t) dt • Signal Level [dB] ST = 100ms [dB]. (11) Late Z 0ms • Noise Level [dB] p2(t) dt 0 • Strenght (G) [dB]

The STEarly is related to the musicians’ en- • Clarity 50 ms (C50) [dB] semble conditions, that is how they hear them- • Definition 50 ms (D50) [-] selves, the STLate, instead, can give indications about the response of the hall as heard by the 9Website: http://www.aurora-plugins.com. musicians. 10Presented in [4] • Clarity 80 ms (C80) [dB] does, it loads the impulse response from the Adobe Audition R environment, filters the signal • Centre Time (T ) [ms] s with the appropriate octave band filter13, calcu- • Early Decay Time (EDT) [s] lates the Schr¨oder integral and then calculates all the parameters. This procedure is repeated • Reverberation Time User (T ) [s] user for each octave band. • Reverberation Time (T20) [s] Results are displayed in a window (fig. 1) where, besides all parameters values, is also plotted the • Reverberation Time (T ) [s] 30 energetic impulse response14 and the decay. • Stage parameters [dB] (optionally), in the second case, the user has to specify first what type of microphones pair has been used for the measurements, specifying one of the fol- lowing choices: • 2 omnidirectional microphones • W-Y channels of a Soundfield microphone • Pressure-Velocity (PU) probe • Intensimetric (PP) probe • Binaural microphone, then, new parameters subset will be calcu- Figure 1: Results window. In black the lated depending on the previous selection. In echogram, in blue the Schr¨oderintegral (decay). example, if the signal was recorded using a R Soundfield microphone, it makes sense to It is possible to export the value table in a calculate the Lateral Fraction (LF), the Lateral file, or to the clipboard. Fraction Cosine (LFC) and the Late Lateral Sound Level (LG), because we have spatial 4 The Audacity port informations in the stored two channels impulse When one thinks about a Mac or a tool response.11 Similarly, a binaural microphones for acoustic measurements, it appears there are pair is the probe that the standard specifies some intrinsic obstacles to the development of for Interaural Cross-correlation Coefficients portable applications. The two operating sys- (IACC) measure, so if this is the case, the tems appear similar, but are really different in calculation will give back the IACC value, the many aspects. So writing a multiplatform ap- IACC peak width and its delay, with possible plication that supports Aurora plug-in would choice of IACC early, late, or full.12 have been a long and complex task. A good All the results are given in the ten octave solution could be the modification of an exist- bands, a linear average and an A-weighted ing application, but it cannot be commercial, average of the previous. due to its closed source nature. Looking at the open-source world we found many solutions to 3.1 Software implementation our project, and between them we have chosen The software written by Angelo Farina is based Audacity because on the Schr¨oderintegral theory: using this the- ory is possible to calculate the reverberation • it is a multiplatform application time by simply recording an impulse response, • it is good quality audio editor, with ex- then the decay can be obtained from a backward panding possibilities integration. This is exactly what the software • it is open-source. 11These informations come also from PU and PP probes. 13These filters, like 1/3 octave band, are defined in the 12For each of these labels correspond differents inte- IEC 61260:1995 standard. gration extremes in the equation 8 and, consequently in 14Also called echogram, it is the RMS of the pressure the 9. impulse response. Once found the target application, what compare the results from our module to those would been the best implementation of the obtained using the most important commercial port? The plug-in way was discarded, because toolsets available: the poor graphic features of the LADSPA plugins standard; there exist other plugin • Dirac version 3.015 from Br¨uel & Kjær definitions in the open-source world, but they • WinMLS 2004 version 1.0716 from Morset aren’t supported by Audacity yet and it seems Sound Development. that the community welcome was a bit cold. It came immediatly clear that the quickest and The test consisted simply in the calculation more powerful way is to embed the Aurora of the acoustical paramters for a set of im- code in the Audacity source. pulse responses recorded with a binaural head This operation requested the code conversion in the small concert hall of La Casa della Mu- from C to C++, so some new objects were cre- sica, Parma. ated: EffectAcParameters that manages all the The results obtained have been reported in the calculations, and others responsible of drawing tables 1, 2, 3, 4 and 5: they are limited to the windows, plots, etc. Another big step was the central bands, because Dirac 3.0 don’t give re- conversion from Microsoft Windows R windows sults over 4 kHz for ISO 3382 parameters. Dirac library to wxWidgets, that is the choice for Au- is also clearly intended to be used for measure- dacity; to do that, all the widgets related code ment sessions, that can be saved, then for elab- was rewritten from scratch, with the closest oration on these sessions in which all measure- similarity between original Aurora plug-in and ment setup and parameters, like, i.e., the mi- the new module as target. The result is visible crophones configuration, etc. are stored. If a in figure 2. sound file cannot belong to a session, the ap- plication offers only limted options on it. So it wasn’t possible to calculate IACC. As it can be seen, the values produced by Acous- tic Parameters module, Dirac and WinMLS are very close, in some cases identical.

Acoust. B&K WinMLS Param. Dirac 3.0 2004 EDT [s] 4.71 4.72 4.70 T20 [s] 5.57 5.54 5.55 T30 [s] 5.66 5.55 5.64 C80 [dB] - 3.74 -3.63 -4.2 D50 [-] 0.20 0.21 0.19 STE [dB] 3.14 3.25 - STL [dB] 8.03 8.37 - IACCE [-] 0.89 - 0.87 Table 1: Parameters confrontation for the Figure 2: Audacity port of Aurora Acoustic Pa- 250 Hz band. rameter module (GTK). The other tables are shown on the next page. The compilation of the code was tested on Linux environment with GTK based window 6 Conclusions manager (on wich fig. 2 is referred), Mac OSX This port of the Aurora’s ISO 3382 parameters R and Microsoft Windows , always with success. calculator is the beginning of the porting of the 5 Acoustical Parameters module entire suite. Main targets were fully reached, comparison so now a reliable, multiplatform ISO 3382 The Acoustical Parameters module was written 15This is not the latest one, but it seem that the im- for scientific use, but it also has to be a reli- provements from 3.0 to 4.1 - the last release - don’t affect the calculation algorithms. There is only an issue: it can able tool for anyone that does acoustic mea- manage solely 16 bit unsigned integer samples, so we had surements. It is then necessary to validate it to downsample our test file that is a 32 bit float type. not only by some heavy “field” use , but also to 16This is the last version released of the software. Acoust. B&K WinMLS Acoust. B&K WinMLS Param. Dirac 3.0 2004 Param. Dirac 3.0 2004 EDT [s] 4.82 4.76 4.74 EDT [s] 2.18 2.18 2.08 T20 [s] 5.02 5.01 5.01 T20 [s] 2.22 2.23 2.23 T30 [s] 4.98 4.96 4.97 T30 [s] 2.25 2.26 2.27 C80 [dB] - 4.40 -4.24 -4.8 C80 [dB] 2.93 2.93 2.6 D50 [-] 0.20 0.20 0.19 D50 [-] 0.60 0.60 0.59 STE [dB] 3.26 4.05 - STE [dB] -2.60 -2.57 - STL [dB] 8.70 9.63 - STL [dB] -1.96 -1.91 - IACCE [-] 0.34 - 0.31 IACCE [-] 0.61 - 0.61 Table 2: Parameters confrontation for the Table 5: Parameters confrontation for the 500 Hz band. 4000 Hz band. Acoust. B&K WinMLS Param. Dirac 3.0 2004 Impulse Response and Distortion with a th EDT [s] 4.44 4.41 4.38 Swept-Sine Technique. In 108 AES Con- T20 [s] 4.10 4.10 4.11 vention, Paris, February 2000. T [s] 4.20 4.19 4.22 30 [3] A. Farina. Room Impulse Responses as Tem- C [dB] - 2.55 -2.65 -2.8 80 poral and Spatial Filters. In WESPAC IX D50 [-] 0.30 0.30 0.29 STE [dB] 0.58 0.75 - 2006, Seoul, June 2006. STL [dB] 5.95 6.32 - [4] A. Farina and F. Righini. Software imple- IACC [-] 0.38 - 0.40 E mentation of an MLS analyzer, with tools Table 3: Parameters confrontation for the for convolution, auralization and inverse fil- th 1000 Hz band. tering. In 103 AES Convention, New York, September 1997. Acoust. B&K WinMLS Param. Dirac 3.0 2004 EDT [s] 3.05 3.03 2.97 T20 [s] 3.18 3.17 3.17 T30 [s] 3.25 3.25 3.26 C80 [dB] - 0.29 -0.15 -0.4 D50 [-] 0.40 0.41 0.39 STE [dB] 1.21 1.13 - STL [dB] 3.12 3.01 - IACCE [-] 0.48 - 0.48 Table 4: Parameters confrontation for the 2000 Hz band. compliant acoustical parameters calculator it’s available under GPL license.

The next modules that has to be converted are the impulse responses measurement tools, including the exponential-sine-sweep generator and the convolver, then Audacity will become a quite complete acoustical measure tool.

References [1] ISO 3382:1997. Acoustics – Measurement of the reverberation time of rooms with refer- ence to other acoustical parameters. Inter- national Organization for Standardization, Geneva, August 2001. [2] A. Farina. Simultaneous Measurement of