<<

This is an electronic reprint of the original article. This reprint may differ from the original in pagination and typographic detail.

Author(s): J. Rämö, V. Välimäki, and M. Tikander

Title: Live Sound and Attenuation with a Headset

Year: 2013 Version: Final published version Please cite the original version: J. Rämö, V. Välimäki, and M. Tikander. Live Sound Equalization and Attenuation with a Headset. In Proc. AES 51st Int. Conf., 8 pages, Helsinki, Finland, August 2013. Note: © 2013 Audio Engineering Society (AES)

Reprinted with permission.

Reproduction of this paper, or any portion thereof, is not permitted without direct permission from the Journal of the Audio Engineering Society (www.aes.org).

This publication is included in the electronic version of the article dissertation: Rämö, Jussi. Equalization Techniques for Headphone Listening. Aalto University publication series DOCTORAL DISSERTATIONS, 147/2014.

All material supplied via Aaltodoc is protected by copyright and other intellectual property rights, and duplication or sale of all or part of any of the repository collections is not permitted, except that material may be duplicated by you for your research use or educational purposes in electronic or print form. You must obtain permission for any other use. Electronic or print copies may not be offered, whether for sale or otherwise to anyone who is not an authorised user.

Powered by TCPDF (www.tcpdf.org) Live Sound Equalization and Attenuation with a Headset

Jussi Ram¨ o¨1, Vesa Valim¨ aki¨ 1, and Miikka Tikander2 1Aalto University, Department of Signal Processing and , P.O. Box 13000, FI-00076 AALTO, Espoo, Finland 2Nokia Corporation, Keilalahdentie 2-4, P.O. Box 226, FI-00045 NOKIA GROUP, Espoo, Finland Correspondence should be addressed to Jussi Ram¨ o(¨ [email protected])

ABSTRACT An augmented-reality audio application called LiveEQ is described. It captures the ambient sound around the listener with miniature , equalizes the , and plays it to the listener with . The user hears a mix of the processed headphone sound and the original sound leaking through the headset. The overall sound pressure level at the listener’s ear can be made smaller than when listening without headphones. The equalization enables modifying the sound spectrum in a desirable way to improve speech intelligibility or quality in real time.

1. INTRODUCTION istics. Thus, the processed live sound can be both more pleasant for the user and less dangerous for the hearing. Live pop and rock have often high sound pres- sure levels, which forces the audience to use hearing pro- In contrast to hearing aids, whose aim is to emphasize tection. However, typical earplugs attenuate the sound the frequencies that are not heard naturally, the objective levels unevenly, i.e., the attenuation is highly frequency of LiveEQ is to attenuate unwanted or excessively loud dependent [1]. There are also more advanced passive sounds and emphasize the wanted sounds according to hearing protectors available that can reduce sound levels the user’s preference. evenly [2, 3]. Moreover, electronic earplugs can provide Additionally, when an in-ear headset with Active Noise intelligent gradual sound-level reduction [1]. Control (ACN) [4, 5, 6, 7] is used, one can achieve even The proposed live equalization system (LiveEQ) is a more pronounced attenuation at low frequencies, giving novel application for the mobile phone and an in- LiveEQ more control at those frequencies. ear headset: real-time equalization of the sound heard This paper is organized as follows. Section 2 describes through the earphones. This application provides excit- the LiveEQ system, section 3 presents the Matlab simu- ing new possibilities for ordinary users: For example, lation of LiveEQ, section 4 focuses on real-time imple- music heard in a through a PA system can be mentation, and section 5 concludes the paper. equalized to be more pleasant or more understandable, or speech heard in a noisy environment can be ampli- 2. LIVE EQUALIZATION SYSTEM fied while the background noise is simultaneously atten- uated. This technology is based on controlled frequency- In LiveEQ, ambient sound environment can be equalized dependent amplification of the monaural or preferably in real time. The primary goal of the system is to pro- binaural signal obtained outside the ear- tect the hearing of a user during a loud concert and at the phones. same time enhance the of the music. Thus, the user may enjoy a live concert with better sound qual- The user of this system can enjoy better sound quality ity for longer periods of time within safe noise exposure than others in the same environment, although everyone levels. attends the same soundscape. This application has the additional advantage that the user is effectively exposed Figure 1 shows the block diagram of the LiveEQ sys- to less noise, as the equalized signal is played through tem. Basically, the perceived sound is the combination of earphones, which have good noise suppression character- the sound leaked through the headset and the sound that

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 1 Ram¨ o¨ et al. Live Headset Equalization

Leaked live 10 music left 5 right

Live Ear canal Ear drum 0 music  −5 Magnitude (dB)

−10 Fig. 1: Block diagram of the LiveEQ, where GEQ de- 100 1k 10k picts a graphic equalizer. Frequency (Hz) Fig. 3: of the microphones used in LiveEQ (1/3 octave smoothing).

−10

−20

−30

−40 Magnitude (dB) −50 100 1k 10k Frequency (Hz)

Fig. 4: Frequency response of the WH-701 headphone. Fig. 2: Headset prototype with microphones attached outside each earpiece. The above mentioned characteristics are important, since they ultimately affect the perceived LiveEQ sound. The is reproduced with the headset. The system requires a sound that finally reaches the eardrum is first recorded microphone outside the headphones, which captures the with a microphone (with a Hmic). It sound. The captured signal is processed with a graphic is then sampled via an analog-to-digital (AD) conver- equalizer and played through the earpiece. Noted that a sion, equalized with a digital graphic equalizer (hav- time difference between these two signals can result in a ing the transfer function Hgeq), converted back to the comb filtering effect [8]. continuous domain and reproduced with the headphone (whose transfer function is Hhp), and finally transferred 2.1. Prototype Hardware to the eardrum through the occluded ear canal (having the transfer function H ). In addition, the ambient sound The headset used with the LiveEQ is a prototype built for ec also leaks through and around the headset into the ear this purpose. It consists of Nokia WH-701 in-ear head- canal (through the transfer function H ). Ideally, the phones and two miniature microphones (Star Micronics leak sound that reaches the ear drum is MAA-03A-L60), which are attached to both ear pieces, as shown in Figure 2. Y =(HmicHgeqHhpHec + HleakHec)X, (1) The frequency responses of the microphones are shown in Figure 3. As can be seen, the two microphones have where X is the live sound (input) and Y is the LiveEQ quite a flat response, although the levels differ by about 1 sound (output). Hmic is depicted in Figure 3, Hgeq can dB. Figure 4 shows the frequency response of the Nokia be designed separately, HhpHec is shown in Figure 4, and WH-701 measured at the drum reference point (DRP) of Hleak Hec is illustrated in Figure 5. Bruer&Kjær’s¨ head and torso simulator (HATS) model 3. MATLAB SIMULATION 4128C with type 3.3 ear simulator. The WH-701 has a perceptually good frequency response, thus providing a A LiveEQ simulator was implemented with Matlab [9] good starting point for the LiveEQ processing. and Playrec [10] based on the headset measurements.

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 Page2of8 Ram¨ o¨ et al. Live Headset Equalization

1/2 0 + −10 −20 + Allpass −30 In Out filter Magnitude (dB) −40 −50 - 100 1k 10k Frequency (Hz) + /2 Fig. 5: Isolation curve of the WH-701 headphone (1/3 octave smoothing). Fig. 7: Allpass equalizer filter structure (adopted from [11]).

10 mented in order to enable the equalization of live mu- 0 sic. The number of the equalizing bands can be easily increased or decreased, and the existing bands can be ad- −10

Magnitude (dB) justed in any way. Preset frequency ranges for the three- band equalizer were chosen as follows (see Figure 6): −20 100 1k 10k Frequency (Hz) 1. Midrange – Vocals/Lead, approximately 400–2600 Hz Fig. 6: Magnitude response of the filters, when the gain of the peak filters is set to 10 dB (dashed lines) and • This range has the clearest effect on the overall the gain of the shelving filter is -30 dB (thin solid line). sound. The thick solid line shows the magnitude response of the whole equalizer. 2. Upper midrange – Presence, approximately 2.6–5.2 kHz • Too much boost in this range results in harsh 3.1. Mixer/Equalizer and strident sound. • LiveEQ is equipped with a first-order low shelving filter Most pleasing sound is achieved by a good and with a graphic equalizer [11]. The purpose of the balance between this range and the midrange. shelving filter is to limit the lowest frequencies, which 3. High end – Brilliance/Cymbals, are usually played back extremely loudly in concerts, approximately 5.2–10 kHz since the A-weighting measurement technique allows this. Furthermore, the headset isolates low frequencies • This range contains mainly harmonics. the least (only about 10 dB as seen in Figure 5). Thus, in • Too much boost in this range results in harsh many occasions, the headset is used as a passive ear plug and piercing sound. at low frequencies. On the other hand, the attenuation of the headset is usually too strong at high frequencies. Both the shelving filter and the peak filters are imple- A good starting point with the LiveEQ is to design the mented using the tunable allpass filter structure presented filters so that the system gives a flat attenuation at all fre- by Regalia and Mitra [11], shown in Figure 7. As can be quencies. This is, however, limited to the lowest attenua- seen, the transfer function of the filter is tion provided by the headset, where, in this case, the flat attenuation range is 0–10 dB. 1 K H(z)= [1 + A(z)] + [1 − A(z)], (2) 2 2 Due to the good frequency response of the headset, the low shelf filtering gives already quite adequate results. where K specifies the gain of the filter and A(z) is the In addition, a three-band graphic equalizer was imple- transfer function of the allpass filter.

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 Page3of8 Ram¨ o¨ et al. Live Headset Equalization

3.1.1. Shelving Filter fc (Hz) ω0 BW (Hz) Ω Peak 1 1000 0.1425 800 0.1140 Peak 2 3800 0.5414 1000 0.1425 The structure becomes a low shelving filter when A(z) is Peak 3 8000 1.1398 2000 0.2850 a first-order allpass filter with the transfer function [11] Table 1: Filter parameters, f = 44.1 kHz. z−1 + a s ( )= 1 , A z −1 (3) 1 + a1z where a is a frequency parameter [11, 12]: 1 is the bandwidth of the filter in Hertz, and fs denotes the ⎧ sampling rate, which is 44.1 kHz throughout this paper. ⎪ tan(Ω/2) − 1 ⎪ , when K ≥ 1, ⎨ tan(Ω/2)+1 3.2. Matlab Graphical User Interface a1 = ⎪ (4) ⎪ tan(Ω/2) − K Figure 8 shows a screen shot of the graphical user in- ⎩⎪ , when K < 1. terface of the LiveEQ simulator implemented with Mat- tan(Ω/2)+K lab. The gain of the three equalizer filters is adjusted us- ing sliders labelled ‘Vocals/Lead’, ‘Presence’, and ‘Bril- Ω Furthermore, defines the normalized liance/Cymbals’. The thick black curve illustrates the Ω π so that = corresponds to the Nyquist limit. The cut- passive isolation of the WH-701 headset (i.e., the leaked off frequency of the shelving filter used in this paper is 5 sound), the thin black curve illustrates the frequency re- Ω Hz ( = 0.000713). sponse of the equalizer controlled with the sliders (i.e., 3.1.2. Peak/Notch Filter the sound reproduced with the headphone), and the red curve is the spectrum of the actual perceived LiveEQ When A(z) is a second-order allpass filter having the sound, i.e., the time-domain sum of the leaked sound and transfer function the sound reproduced with the headset. z−2 + b(1 + a)z−1 + a A(z)= , (5) There are three listening options in the simulator: 1 + b(1 + a)z−1 + az−2 • the structure becomes a peak/notch filter [11]. The fre- Open ears – Unprocessed signal. ≥ quency parameter a for a peak (K 1) and notch (K < 1) • Ear plugs – Simulates the situation where the head- filter, respectively, is defined as [11, 12] set is used as ear plugs. ⎧ ⎪ 1 − tan(Ω/2) ⎪ ≥ • LiveEQ – Simulates the LiveEQ, i.e., the sum of the ⎨⎪ , when K 1 1 + tan(Ω/2) leaked and the processed sound. a = ⎪ (6) ⎪ K − tan(Ω/2) ⎩⎪ , when K < 1 Furthermore, a ‘bass boost’ function is implemented to K + tan(Ω/2) simulate the excessive amount of low frequencies in the where Ω denotes the normalized filter bandwidth. The music, which is often the case in pop or rock concerts, parameter b is especially indoors. The boost is implemented us- b = −cos(ω0), (7) ing the Regalia-Mitra shelving filter, described in Section 3.1.1. where ω0 is the normalized center frequency [11]. The center frequencies and bandwidths of the preset fil- 4. REAL-TIME IMPLEMENTATION ters are given in Table 1, where A real-time LiveEQ was implemented using an Analog f = 2πω / f (8) Devices DSP evaluation board (EVAL-ADAU1761Z). c 0 s Implement a real-time demonstrator using a regular is the center frequency in hertz, sound card and Matlab is not possible, since the sound card is primarily designed to playback and sig- BW = 2πΩ/ fs, (9) nals, where the is not critical. For example, a

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 Page4of8 Ram¨ o¨ et al. Live Headset Equalization

Fig. 8: LiveEQ Matlab simulator. The thick black curve illustrates the passive isolation of the WH-701 headset, the thin black curve illustrates the frequency response of the equalizer, and the red curve is the actual perceived LiveEQ.

MOTU UltraLite mk3 audio interface [13] has a constant The group delay increases at the stop band of a shelving delay of approximately 20 ms, which is unacceptable in filter as well as around the peak of a biquad filter. A the LiveEQ application. The real-time implementation notch filter typically decreases the group delay, because requires external sound sources and the actual built head- the phase slope is positive around the center frequency of set prototype. the notch. The DSP board was used due to its low-latency perfor- The preset frequencies for the graphic equalizer are the mance. The measured throughput delay time of the DSP same as in the Matlab simulation. Figure 9 shows the board is between 0.95–1 ms, which is mainly caused by measured frequency response of the equalizer imple- the AD and digital-to-analog (DA) converters [8]. A 1- mented with the DSP board when all three filters are ad- ms delay is acceptable and allows the usage of the DSP justed to have a gain of 10 dB. board as a real-time LiveEQ processor. Figure 10 shows the measured group delay of the DSP As can be expected, the implementation of the equalizer board when all three filters are set to 10 dB. The group filters slightly increases the group delay of the system. delay was measured by playing a sine sweep through the

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 Page5of8 Ram¨ o¨ et al. Live Headset Equalization

15 0 10 −20 5

Gain (dB) −40

0 Magnitude (dB)

−5 −60 100 1k 10k 100 1k 10k Frequency (Hz) Frequency (Hz)

Fig. 9: Frequency response of the graphic equalizer mea- Fig. 11: Comb filtering effect implemented with FIR sured from the DSP board when all three filters are set to comb filter, when the signals have the same energy and 10 dB. the delay is 1 ms.

2 function 1.5 −L H(z)=gd + geqz , (10) 1 where gd is the gain for direct sound (i.e., the leaked Delay (ms) 0.5 sound), geq is the gain for the sound reproduced with the LiveEQ headset, and L is the delay of the reproduced 0 sound in samples. 100 1k 10k Frequency (Hz) Figure 11 shows the worst-case scenario where the direct and delayed sound has the same amount of energy (g = Fig. 10: Group delay of the DSP board when all three d g = 0.5) and L = 45 samples, which equals to a 1-ms filters are set to 10 dB. eq delay. Figure 12(a) shows the amount of the comb filtering ef- DSP board. A MOTU UltraLite mk3 audio interface was fect for different constant attenuations of LiveEQ with a used, since it has a constant delay which could be mea- delay of 1 ms. The desired response in each case is a flat sured and removed from the results. magnitude response. The headphone attenuation is sim- plified to that in Figure 12(b) so that the attenuation is 10 4.1. Comb Filtering Effect dB below 700 Hz, 30 dB between 700 and 7500 Hz, and Adding a delayed copy of a signal to the signal itself 40 dB above 7500 Hz. results in a comb filtering effect [14]. In the case of LiveEQ, the latency of the processed sound should be As can be seen in Figure 12(a), when the target attenu- small, because it is added to the leaked sound, which has ation is 0 dB, the main comb dip is at around 500 Hz, only gone through the headset to the ear drum. where the attenuation of the headset is at its weakest. At frequencies above that, the sound originates mainly The measurement in Figure 10 suggests that the delay of from the headphone due to the good attenuation of the the real-time LiveEQ processing is below 1.5 ms. Fur- headset, and thus the comb filtering effect is almost non- thermore, the idea in LiveEQ is not to reproduce low fre- existent. On the other hand, when the desired attenuation quencies with the headset, since the low frequencies are is 10 dB, the comb filtering effect does not occur at low usually played very loud in live concerts. Thus, the comb frequencies at all, since the headphone does not repro- filtering effect does not occur at low frequencies. More- duce any sound in this range. Furthermore, for a desired over, the attenuation of the headset increases toward high attenuation of 20 dB, the headset cannot attenuate low- frequencies, which effectively decreases the comb filter- frequency sounds as much, and the attenuation is still 10 ing effect (see Figures 5 and 12(b)). dB. However, at frequencies above 700 Hz, a 20-dB at- The comb filtering effect can be illustrated by using an tenuation is achieved. As can be seen, the comb filtering FIR comb filter [14], which in this case has the transfer effect increases at high frequencies compared to the 10

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 Page6of8 Ram¨ o¨ et al. Live Headset Equalization

100 0

80 −20

Attenuation 0 dB SPL (dB) 60 −40 Magnitude (dB) Attenuation 10 dB Original Attenuation 20 dB LiveEQ −60 40 100 1k 10k 100 1k 10k Frequency (Hz) Frequency (Hz) (a) Fig. 13: Frequency response of a 7-second music clip 0 (1/3 octave smoothing), where the dashed line is the orig- inal spectrum and the solid line is the spectrum after the −20 LiveEQ processing. The gains for the equalizer were - 30 dB for the shelving filter, and 18 dB, 10 dB, and 10 −40 dB for the midrange, upper midrange, and high end peak filters, respectively. Headset attenuation (dB) −60 100 1k 10k Frequency (Hz) (b) ers, without reduction in the performance of LiveEQ.

Fig. 12: Theoretical comb filtering effect in LiveEQ with Figure 13 shows an example case where a 7-second bass- a delay of 1 ms, where (a) illustrates the amount of comb heavy music sample (dashed line) is equalized to have a filtering when the liveEQ is adjusted to have different flatter frequency response with the LiveEQ system (solid constant attenuations and (b) presents the simplified at- line). tenuation of the headset. 5. CONCLUSIONS This paper described a novel augmented-reality applica- and 0 dB attenuations, since the energy of the sound orig- tion called LiveEQ, which equalizes the ambient sound inating in the headphone approaches that of the leaked around the listener in a desirable way in real time. The sound. main purpose of use is in loud concerts, where hear- 4.2. Discussion ing protectors are required. Normally when one uses The real-time implementation of LiveEQ may require an ear plugs, the sound is attenuated too much at mid and external headphone amplifier, since the digital amplifiers high frequencies. With LiveEQ, mid and high frequen- on the DSP board induce whistling in the signal, im- cies are allowed to pass through the headset in order to plying that the amplification capability of this particular enhance the music quality while still using hearing pro- DSP board is weak. Any external amplifier used should tection. This way users can reduce their noise exposure have as a low delay as possible; an analog device is pre- and still enjoy the concert with pleasant sound quality. ferred. LiveEQ was implemented using Matlab and Playrec to- Furthermore, the passive attenuation of a headphone be- gether as well as with a DSP evaluation board. The Mat- haves as a lowpass filter. Thus, the leaked sound has lab/Playrec implementation serves as an easy-to-setup to propagate through the passive mechanism (i.e., a me- demonstrator tool, where the live concert environment chanical lowpass filter having the response shown in Fig- is simulated, whereas the DSP board implementation ure 5), and while doing that it is subjected to an addi- serves as an actual real-time prototype of LiveEQ. The tional group delay [15]. According to Rafaely [15], the real-time implementation was realized with the DSP group delay of the mechanical lowpass filter is approxi- board, since it has sufficiently small delay. The simu- mately 0.7–1.7 ms at low frequencies. Thus, the mechan- lations and the real-time prototype indicate that LiveEQ ical group delay allows additional electronic delay in the is realizable and provides good sound quality in concerts system, caused by the digital filters and AD/DA convert- while still protecting the hearing of the user.

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 Page7of8 Ram¨ o¨ et al. Live Headset Equalization

6. REFERENCES active noise control with in-ear headphones. In Pro- ceedings of Meeting on Acoustics, Acoustical Soci- [1] Etymotic Research, Inc. High-fidelity hearing pro- ety of America, January 2013. tection brochure, www.etymotic.com, 2012. [2] M. Killion, E. DeVilbiss, and J. Stewart. An [8] J. Ram¨ o¨ and V. Valim¨ aki.¨ Digital augmented re- earplug with uniform 15-dB attenuation. The Hear- ality headset. Journal of Electrical and Computer ing Journal, 41(5):14–17, May 1988. Engineering, 2012. [3] B. J. Fligor. Verification of flat attenuation charac- [9] MATLAB. version 7.14.0.739 R2012a. The teristics of musicians earplugs. In Proceedings of MathWorks Inc., Natick, Massachusetts, the AES 47th International Conference, Chicago, http://www.mathworks.se. USA, June 2012. [10] R. Humphrey. Playrec, multi-channel Matlab au- [4] S. M. Kuo and D. R. Morgan. Active Noise Con- dio, http://www.playrec.co.uk, 2006-2008. trol Systems: Algorithms and DSP Implementa- [11] P. Regalia and S. Mitra. Tunable digital fre- tions. John Wiley & Sons, Inc., New York, NY, quency response equalization filters. IEEE Trans- 1996. actions on Acoustics, Speech, and Signal Process- [5] T. Schumacher, H. Kruger,¨ M. Jeub, P. Vary, and ing, 35(1):118–120, January 1987. C. Beaugeant. Active noise control in headsets: [12] U. Zolzer¨ and T. Boltze. Parametric digital filter A new approach for broadband feedback ANC. structures. In AES 99th Convention, New York, NY, In Proceedings of the IEEE International Confer- October 1995. ence on Acoustics, Speech and Signal Processing (ICASSP), pages 417–420, Prague, Czech Repub- [13] MOTU, Inc. UltraLite-mk3 Hybrid User Guide, lic, May 2011. 2010. [6] M. Guldenschuh, A. Sontacchi, M. Perkmann, [14] J. O. Smith. Physical . and M. Opitz. Assesment of active noise can- W3K Publishing, 2010. celling headphones. In Proceedings of the IEEE Intenational Conference on Consumer Electronics [15] B. Rafaely. Active noise reducing headset - an (ICCE), pages 299–303, Berlin, Germany, 2012. overview. In Proceedings of the International Congress and Exhibition on Noise Control En- [7] C. Bruhnken, S. Priese, H. Foudhaili, J. Peissig, and gineering, The Hague, The Netherlands, August E. Reithmeier. Design of feedback controller for 2001.

AES 51ST INTERNATIONAL CONFERENCE, Helsinki, Finland, 2013 August 22–24 Page8of8