Frequency-Dependent Software Reverberation Design and Implementation of a Seven Octave-Band Reverberator by Kurtis Halingten B . S c , The University of British Columbia, 1996 B . S c , The University of British Columbia, 2000 A THESIS S U B M I T T E D IN P A R T I A L F U L F I L M E N T O F THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in The Faculty of Graduate Studies (Department of Mechanical Engineering) We accept this thesis as conforming to the required standard T H E TJJ^EltsTTY O F B R I T I S H C O L U M B I A Dec 2003 © Kurtis Halingten, 2003 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department of Mechanical Engineering The University Of British Columbia Vancouver, Canada Date 2 / 'lOO? Abstract ii ABSTRACT Software reverberators are used to superimpose reverberation on audio signals, and are used extensively in the multimedia and broadcasting industries. Several commercially-available reverberators claim to support frequency-dependent reverberation, but none have been found to implement octave-band frequency-dependent reverberation. The objective of the research reported here was to develop a reverberator capable of accurately adding reverberation to digital audio signals, with desired reverberation times from 0 to 2 seconds specified for individual octave frequency bands from 125 H z to 8000 Hz. The physics governing diffuse reverberation have been reviewed. A n indepth investigation of the methods to measure reverberation was performed. Measurement of frequency-dependent reverberation times reported in this thesis used an iterative noise-reduction algorithm combined with a novel, unique, rationalized reverberation time measurement algorithm. The properties of the common D S P filters used for superimposing reverberation have been reviewed. Several published reverberator designs have been simulated, but were found to be unsuitable to meet the research objectives. This fact, combined with the limited reverberation functionality of current audio processing software development kits, prompted the development of new reverberators. Several new software reverberators are presented. Two of these are based on a computationally efficient multirate design. A l l of the prototypes satisfied the research objective of accurate superposition of octave-band reverberation. The best design was implemented in a Microsoft Windows D L L . Contents iii CONTENTS Abstract 11 Contents iii List of Tables vi List of Figures y 1 Introduction 2 1 1.1 Motivation 1 1.2 Scope of Project 2 1.3 Organization 2 Background 4 2.1 Reverberation 4 2.2 Diffuse Reverberation 4 2.2.1 Air Absorption 6 2.2.2 Speech Intelligibility 7 2.2.3 Optimum Reverberation Times 7 2.3 3 iii Summary 7 Measurement of Reverberation 3.1 Empirical Methods 8 •• 8 3.1.1 Steady-State Excitation 8 3.1.2 Impulsive Excitation 8 3.1.3 MLS systems 8 3.1.4 TDS systems • 9 3.2 Inconsistencies and Limitations of Empirical Measurement Systems 9 3.3 Impulse Response 10 3.4 Energy Decay Curve 10 3.5 E D C Noise Reduction 11 3.6 Energy Decay Relief 13 Contents 3.7 Comparison of the E D R and the E D C 16 3.8 Reverb-Print 17 3.9 Reverberation and Speech Intelligibility . 3.10 Summary 4 Artificial Reverberation 18 21 . 22 4.1 Historical Reverberation Methods 22 4.2 Common Digital Elements 22 4.2.1 Delay Line 23 4.2.2 Tapped Delay Line 23 4.2.3 Comb Filters 23 4.2.4 Allpass Filter 28 4.3 4.4 4.5 5 iv Reverberators based on Comb and Allpass Filters 30 4.3.1 Schroeder Reverberator 31 4.3.2 Schroeder-Logan Reverberator 33 4.3.3 Moorer Reverberators 33 4.3.4 Gardner Reverberator 36 4.3.5 Marsch-Porschmann Reverberator 37 Feedback Delay Networks 37 4.4.1 38 Jot Reverberator Multirate Algorithms 38 4.5.1 39 Multirate Digital Reverberation Systems 4.6 Convolution with an Impulse Response 40 4.7 Summary 40 Design of a n I m p r o v e d R e v e r b e r a t o r 42 5.1 Objective 42 5.2 Requirements 42 5.3 Designs 43 5.3.1 Butterworth Octave Band Reverberator 46 5.3.2 Multirate Octave Band Reverberator 50 5.3.3 Multirate Elliptic Bandpass Reverberator 53 5.4 5.5 Comparison and Analysis 57 5.4.1 Non-interpolated Multirate Butterworth Octave Band Reverberator 60 5.4.2 Optimized Butterworth Octave-Band Filterbank 61 Summary 63 Contents v 6 Implementation 64 6.1 Application Programming Interface : 64 6.2 Development Platform 64 6.3 Implementation Details 65 6.4 Test Procedures 6.5 Results ; - 65 65 7 Conclusion and Future Work 69 Bibliography 71 A Miscellaneous 75 A. l Octave Bands and One Third Octave Bands 75 B Noise Reduction and Reverberation Time Algorithms B. l 76 Noise Reduction Algorithm 76 B.2 Reverberation Time Algorithm 77 B.3 Noise Reduction and Reverberation Time Algorithms Applied to the E D C 80 B. 4 Noise Reduction and Reverberation Time Algorithms Applied to the E D R 82 C Filter Specifications C. l 88 Lowpass Decimation Filter Specifications 88 C.2 Multirate Butterworth Bandpass Filter Specifications 89 C. 3 Elliptic Bandpass Filter Specifications 91 C.3.1 Multirate Elliptic Bandpass Filter Specifications 91 C. 3.2 Elliptic Bandpass Filter Specifications 93 D Review of Current Audio Processing SDKs for Microsoft Windows D. l 95 Microsoft 95 D. l . l DirectX Audio 95 D.l.2 DirectSound 95 D.l.3 DirectMusic 96 D.2 Creative Technologies 96 D.2.1 Environmental Audio, Extension (EAX) 96 D.2.2 DirSnd 96 D.3 OpenAL ' ' 97 D.4 James Boer's Game Audio Programming (GAP) 97 D.5 Summary 97 List of Tables vi LIST O F T A B L E S 2.1 Absorption coefficients of common materials 5 2.2 Typical indoor air absorption exponents 6 2.3 Optimal cumulative reverberation times for various types of rooms 7 3.1 Blackman-Harris window coefficients 15 3.2 RT reverberation times extracted from an EDR 16 3.3 Measured reverberation times of G E O G 200 19 4.1 Filter parameters for the Schroeder reverberator 31 4.2 RT reverberation times for the Schroeder reverberator 32 4.3 Filter parameters for the Schroeder-Logan reverberator 33 4.4 RT reverberation times for the Schroeder-Logan reverberator 33 4.5 Comb filter parameters for Moorer's six-comb reverberator 35 4.6 RT reverberation times for the Moorer reverberator 36 4.7 Applicable reverberation time ranges for Gardner's reverberators 37 4.8 Comparison of popular reverberator designs 41 5.1 Test case reverberation times 46 5.2 RT reverberation times for the BOB reverberator (test case) 46 5.3 RT reverberation times for the MrBOB reverberator (test case) 50 5.4 RT reverberation times for the MrEB reverberator (test case) 53 5.5 Comparison of the measured and test case reverberation times 57 5.6 Performance review of the three reverberator designs 57 6.1 RT reverberation times for the reverberator (test case) 66 A. l Octave frequency bands 75 B. l RT reverberation times of G E O G 200 82 C. l Lowpass Butterworth decimation filter coefficients 88 C.2 Multirate Butterworth bandpass filter coefficients 89 List of Tables vii C.3 Multirate elliptic bandpass filter coefficients 91 C.4 Elliptic bandpass filter coefficients for the 2 kHz octave-band 93 C.5 Elliptic bandpass filter coefficients for the 4 kHz octave-band 93 C. 6 Elliptic bandpass filter coefficients for the 8 kHz octave-band 94 D. l 97 Summary of audio processing SDKs reviewed List of Figures viii LIST O F F I G U R E S 2.1 Reverberation response model 5 3.1 A typical measured impulse response 10 3.2 Amplitude-frequency response of Butterworth octave-band filters . 11 3.3 3D E D C plot of a third-octave band filtered impulse response 12 3.4 Echogram of 1 k H z octave-band filtered impulse response 13 3.5 3D E D R plot of a typical measured impulse without noise reduction 17 3.6 3D E D R plot of a typical measured impulse response 18 3.7 2D E D R plot of a typical measured impulse response 19 3.8 R T plot for G E O G 200 20 3.9 Reverb-print of an impulse response 20 4.1 Delay-line flow diagram 23 4.2 Multitap line flow diagram 23 4.3 Feed-forward comb filter flow diagram 24 4.4 Responses for a feed-forward comb filter 24 4.5 Feedback comb filter flow diagram 25 4.6 Feedback comb filter impulse response 25 4.7 Responses for a feedback comb filter 26 4.8 Responses for a frequency-dependent comb filter 27 4.9 Allpass filter flow diagram 28 4.10 Allpass filter impulse response 29 4.11 Responses for an allpass filter 29 4.12 Nested allpass filter flow diagram 30 4.13 Responses for a nested allpass filter 31 4.14 R T plot for the Schroeder Reverberator 31 4.15 Reverb-print of the impulse response of the Schroeder reverberator 32 4.16 R T plot for the Schroeder-Logan Reverberator 33 4.17 Reverb-print of the impulse response of the Schroeder-Logan reverberator 34 4.18 R T plot for the Moorer Reverberator 35 List of Figures ix 4.19 Reverb-print of the impulse response of the Moorer reverberator 36 4.20 General structure of a Gardner reverberator 37 4.21 Order 3 feedback delay network . 38 4.22 General structure of a Jot reverberator 39 5.1 Single rate reverberator design ' 44 5.2 Multirate reverberator design 45 5:3 Impulse response of the BOB reverberator (test case) 47 5.4 3D EDR plot of an impulse response of the BOB reverberator (test case) 47 5.5 3D EDR plot of an impulse response of the BOB reverberator (test case) 47 5.6 Response of the BOB reverberator to white noise 48 5.7 Reverb-print of the impulse response of the BOB reverberator (test case) 48 5.8 RT plot of the B O B reverberator impulse response (test case) 49 5.9 Transfer function of the BOB reverberator (test case) 49 5.10 Impulse response of the MrBOB reverberator (test case) 5.11 3D EDR plot of an impulse response of the MrBOB reverberator (test case) 50 . 51 5.12 2D EDR plot of an impulse response of the MrBOB reverberator (test case) 51 5.13 RT plot of the MrBOB reverberator impulse response (test case) 51 5.14 Response of the MrBOB reverberator to white noise . 52 5.15 Reverb-print of the impulse response of the MrBOB reverberator (test case) 52 5.16 Transfer function of the MrBOB reverberator (test case) 52 5.17 Impulse response of the MrEB reverberator (test case) 54 5.18 3D EDR plot of an impulse response of the MrEB reverberator (test case) 54 5.19 2D EDR plot of an impulse response of the MrEB reverberator (test case) 54 5.20 Response of the MrEB reverberator to white noise 55 5.21 Reverb-print of the impulse response of the MrEB reverberator (test case) 55 5.22 RT plot of the MrEB reverberator impulse response (test case) 56 5.23 Transfer function of the MrEB reverberator (test case) 56 5.24 Impulse response of the Butterworth octave-band filterbank 58 5.25 Impulse response of the multirate Butterworth octave-band filterbank 58 5.26 Impulse response of the multirate elliptic octave-band filterbank 58 5.27 Transfer function of the Butterworth octave-band filterbank 59 .5.28 Transfer function of the multirate Butterworth octave-band filterbank 59 5.29 Transfer function of the multirate elliptic octave-band filterbank 59 5.30 Interpolated and non-interpolated reverberation 60 5.31 Multirate reverberator section with staged decimation 61 5.32 Multirate reverberator section with single stage decimation 61 List of Figures x 5.33 Amplitude-frequency response of the optimized Butterworth octave-band filters 62 5.34 Impulse response of the optimized Butterworth octave-band filterbank 62 6.1 Impulse response of the reverberator (test case) 66 6.2 3D EDR plot of an impulse response of the reverberator 67 6.3 2D EDR plot of an impulse response of the reverberator 67 6.4 RT plot for the impulse response of the reverberator (test case) 67 6.5 Response of the reverberator to white noise 68 6.6 Reverb-print of the impulse response (test case) 68 B.l Illustration of the Reverberation Time Algorithm 78 B.2 EDCs of the 1 kHz octave-band filtered impulse response of G E O G 200 80 B.3 EDCs of the 1 kHz octave-band filtered impulse response of G E O G 200 (large scale) . . . 80 B.4 Coefficient of regression and regression interval used to determine reverberation time . . . 81 B.5 3D EDR plot of a measured impulse response of G E O G 200 without noise reduction . . . 83 B.6 2D EDR plot of a measured impulse response of G E O G 200 without noise reduction . . . 83 B.7 3D EDR plot of a measured impulse response of G E O G 200 with noise reduction 84 B.8 2D EDR plot of a measured impulse response of G E O G 200. with noise reduction 84 B.9 Plot of coefficient of regression against frequency for an EDR of G E O G 200 85 B.10 Plot of coefficient of regression against frequency for an EDR of G E O G 200 85 B . l l Plot of the interval of reverberation regression against frequency for an EDR of G E O G 200 86 B.12 Plot of the interval of reverberation regression against frequency for an EDR of G E O G 200 86 B.13 RT plot of a measured impulse response of G E O G 200 without noise reduction 87 B. 14 RT plot of a measured impulse response of G E O G 200 with noise reduction 87 C. l Amplitude-frequency response of the lowpass Butterworth decimation filter 88 C.2 Amplitude frequency response of the multirate Butterworth bandpass filter 89 C.3 Magnitude-frequency response of the multirate Butterworth bandpass filter 90 C.4 Phase response of the multirate Butterworth bandpass filter 90 C.5 Amplitude-frequency response of the multirate elliptic bandpass filter 91 C.6 Magnitude-frequency response of the multirate elliptic bandpass filter 92 C.7 Phase response of the multirate elliptic bandpass filter 92 Chapter 1. 1 Introduction CHAPTER 1 INTRODUCTION 1.1 MOTIVATION Reverberation is considered the single most important factor in room acoustics. It directly affects speech intelligibility, or our ability to accurately interpret speech. Often, especially i n highly reverberant environments, we might hear someone speaking, but are unable to identify the words. This can be potentially dangerous in industrial workrooms. Poor speech intelligibility also creates problems in classrooms - e.g. misunderstanding and stress, resulting in poor academic performance. Software is available to predict and simulate reverberation using a variety of methods, including ray-tracing, the method of images, and empirical models. One application, in particular, focuses on predicting speech intelligibilty in classrooms. ClassTalk [23] was developed by D r . Murray Hodgson at U B C to predict speech levels and reverberation, based on extensive measurements of many classrooms at U B C . Classtalk works i n octave-bands from 125 to 8000 Hz. In order to include an interactive, aural, speech intellibility test, given the frequency-dependent acoustical characteristics of a simulated classroom, a software reverberator was required to superimpose reverberation on pre-recorded speech segments. Several software reverberators are commercially available and claim to support frequency-dependent reverberation. However, the algorithm that is used is rarely published, or in cases, is available only after entering into a non-disclosure agreement. Often, the desired reverberation can only be set i n a limited number of frequency bands - typically low, medium, and high. Freeware or open-source reverberators are also available, but all instances found have been based on 20 plus year-old designs. The purpose of the research reported in this thesis was to develop a frequency-dependent software reverberator capable of accurately adding reverberation to audio signals with desired reverberation times from 0 to 2 seconds in independent octave frequency bands from 125 Hz to 8000 Hz. Since ClassTalk is a Microsoft Windows application, the software reverberator was required to be Microsoft Windows compatible, and operate on standard audio wave files. The aural speech intelligibilty test in ClassTalk would mix several audio signals in different proportions to simulate the signal-to-noise characteristics of the audio environment found in a typical classroom. These audio signals include human speech and noise sources. The predicted frequency-varying reverberation would then be superimposed on the final audio signal, stored as an intermediate wavefile. B y design, the reverberator was limited to processing a single 16-bit mono wave file sampled at the standard audio rate of 44.1 kHz. Chapter 1.2 SCOPE OF 1. Introduction 2 PROJECT The work performed for this thesis included a review of existing software reverberators to answer the question - is there at least one reverberator capable of octave-band frequency-dependent reverberation? The answer is - yes and no. Not one suitable Microsoft Windows implementation was found, but the reverberators designed by Jot and Zolzer might be suitable. Ultimately, it was decided to design and develop a new reverberator. Software development includes testing - usually. In order to verify the output of a reverberator, a means to digitally measure reverberation was required. The various methods to measure reverberation time were reviewed and several methods were implemented. Unexpectedly, the various methods to compute reverberation times did not always yield similar results. However, two complementary methods to quantify reverberation, the Energy Decay Relief (EDR) and the Reverb-Print, both of which are based on the spectrogram, proved to be very useful. The final and most difficult test for a reverberator to pass is also very subjective - how well does it sound? The digital signal processing methods available to simulate reverberation were reviewed. Simple comb and allpass filters are commonly used, but were found to generate acceptable reverberation only after extensive parameter adjustments and only for a small range of reverberation times. More advanced methods are available, but these were too involved to simulate and test for this thesis. Several new designs were created and tested for the research presented in this thesis. The first was a straight-forward octave-band reverberator based on the A N S I Butterworth octave-band filters used to measure reverberation. The second design used a multirate approach to reduce the computational overhead of octave-band bandpass filtering, and executes several times faster. The third and final design replaces the Butterworth filters with elliptic bandpass filters having much narrower transition bands. The Microsoft Windows implementation involved choosing an appropriate technology from the wide array of multimedia A P I available from Microsoft. In order to support the largest number of versions of Microsoft Windows, and the maximum number of soundcards, the Windows M u l t i M e d i a ( M M ) A P I was used. The software reverberator was coded in straight C , and was encapsulated in a dynamic link library ( D L L ) . Testing of the D L L included comparison with impulse responses generated in Matlab by the prototypes. The D L L was also tested extensively for stability and resource leaks. 1.3 ORGANIZATION The physical factors affecting reverberation in a room, in the context of Sabine diffuse sound field theory, were reviewed. Octave-band frequency-dependent control was a reasonable goal, as most measurements are made in octave bands. The salient facts are presented in Chapter 2. Testing the performance and correctness of any system is not an option. Implementing a method to accurately measure reverberation time as a function of frequency proved to be more challenging than at Chapter 1. Introduction 3 first expected. Chapter 3 reviews the standard digital techniques to measure reverberation. Chapter 4 reviews the most common D S P filters used to simulate reverberation. Comb and allpass filters have been used extensively since Schroeder developed the first digital reverberator in the early 1960s. Since then, more advanced digital systems have been built using nested allpass filters, feedback delay networks and multirate filterbank systems. Having an accurate method to measure reverberation times, and having reviewed the common D S P building blocks available, Chapter 5 presents the design and simulation of several versions of an octaveband reverberator. Chapter 6 is concerned with the details of the Microsoft Windows implementation. The algorithm was coded in C with an efficient double-buffer design to minimize memory operations. The implementation was encapsulated i n a dynamic link library; performance is adequate, although not real-time. The seventh and final chapter concludes the report and contains many suggestions for future work. Chapter 2. Background 4 CHAPTER 2 BACKGROUND Sound sources in rooms create sound fields experienced by room users at receiver positions. Two aspects of sound fields of greatest pratical interest - energetic, that is the steady-state conditions, and temporal, such as sound decay and reverberation. The latter aspect is the focus of the present research. Note that, since they generally involve sound pressure levels well below 100 d B , room sound fields behave linearly; in acoustics, non-linear effects are only significant at very high sound pressure levels [24]. 2.1 REVERBERATION The reverberation process in a room begins with sound waves that expand radially outward from a sound source at the speed of sound (approximately 344 m/s in air). In the case of a point source, the sound energy decreases with the square of the distance travelled. The acoustic pressure wave repeatedly strikes and reflects from the many surfaces, in the process losing further energy due to surface and air absorption. After a short period of time, the energy is dispersed somewhat uniformly through the room as it decays into the background noise. A receiver situated in the room would first hear the direct sound, followed shortly by relatively strong reflections known as early reflections. After a fraction of a second, typically taken to be about 80 ms, the density of reflections becomes large and randomly oriented, and the average intensity drops off exponentially with time. These indistinguishable late reflections are known as late or diffuse reverberation, and are illustrated in Figure 2.1. Since reverberation is essentially due to the propagation of sound waves in an enclosed space, it is affected by the properties of the medium in which it travels, but more so by the boundaries of the enclosing environment. Diffuse sound field theories are available and provide a simple model of diffuse reverberation. 2.2 DIFFUSE REVERBERATION In many cases, a real room can be approximated as an empty rectangular parallelepiped. The total surface area, S, can be viewed as a finite sum of smaller homogeneous sub-areas Si. Each sub-surface has an associated sound-frequency response - more specifically, a frequency-dependent absorption coefficient, denoted Qj. Chapter 2. Background 5 it direct sound early diffuse reflections I 1 reverberation > o t Figure 2.1: The reverberation response model. The direct sound occurs at a time of t , followed shortly by the early reflections. Diffuse reverberation occurs after a time of t\. 0 The walls, ceilings, and floors of a real room are fabricated from a variety of materials. The absorption coefficients, or the fraction of sound absorbed in standard octave frequency bands (see Table A . l ) , have been determined experimentally under diffuse sound field conditions for many materials. Examples of octave-band absorption coefficients for common contruction materials are listed in Table 2.1. Octave -Band Material 125 250 500 1000 2000 4000 D r y w a l l - on 100 mm c a v i t y 0.30 0.20 0.15 0.07 0.07 0.07 B r i c k o r blockwork 0.02 0.02 0.03 0.04 0.04 0.05 Concrete 0.01 0.01 0.02 0.02 0.03 0.04 Linoleum t i l e s 0.02 0.03 0.03 0.03 0.03 0.03 G l a s s window pane 0.25 0.15 0.08 0.06 0.04 0.03 Thin carpet 0.05 0.10 0.15 0.25 0.40 0.50 0.90 0.75 0.60 0.70 0.80 0.90 Suspended a c o u s t i c a l ceiling Table 2.1: Absorption coefficients of common materials for the 125 Hz to 4000 Hz octave bands. Under the conditions for which late reverberation can be described by diffuse-field theories, the sound absorption by all the surfaces in the room can be approximated by a single numerical value. The average absorption coefficient, denoted a. , of all of the room surfaces when subjected to a diffuse sound field, is d given by Z)j The quantity A = a d di Si a (2-1) S is called the equivalent room aborption and is a measure of the area in square meters of a perfectly sound-absorptive material that would absorb the same amount of sound energy as the actual room surfaces. According to diffuse-field theories, the exponential sound decay in a room is given by #!(*)= #1(0) exp where p (0) r ca S d AV (2.2) is the steady-state sound pressure in Pascals at time t = 0, c is the speed of sound in air 6 Chapter 2. Background in m/s, V is the volume of the room in m , S is the total surface area in m , and a 3 2 d is the average absorption coefficient. The speed of sound i n air is given by c = 20.05V273.3 + T m/s for a temperature T i n ° C . In every practical case, the temperature dependence can be ignored and c taken to be 344 m/s. The time for the sound pressure to decay by a factor of-lCT , or 60 d B in terms of the sound pressure 6 time and denoted TQO. It can be derived from Equation 2.2, level, is formally defined as the reverberation and is given by T = 0 . 1 6 ^ - =0.16^ 60 (2.3) In this simplified form, the reverberation time is clearly proportional to V/S, while also proportional to l/<5d- 2.2.1 AIR ABSORPTION In larger rooms, the distance travelled by the sound waves between reflections is greater, and the absorption by air cannot be overlooked. The exponential decay of sound intensity, I(x), x meters from the source is given by I{x) = ^Ioe- (2.4) mx where lo is the intensity at the source, and m is the attenuation constant, commonly called the airabsorption exponent. The air-absorption exponent depends on frequency, humidity, pressure, and temperature, and is more pronounced at higher frequencies, as can be seen from the typical indoor-air exponent values listed i n Table 2.2. Octave -Band RH ["/,] 500 1000 2000 4000 30 0.0012 0.0010 0.0030 0.0024 0.0095 50 0 0005 0 0004 80 0 0003 0.0008 0.0020 0.0051 0.0061 Table 2.2: Typical indoor air absorption exponents at 20°C at several relative humidities. In the Sabine theory of diffuse reverberation, air absorption can be modeled as an increase in the equivalent absorption of a room. To account for air absorption, the denominator in Equation 2.3 contains an extra term 4mV that represents the equivalent absorption, in square meters, corresponding to air absorption. Therefore, the reverberation time TQQ accounting for air absorption becomes T 6 0 - 0.16 _ aS d V Q A + 4rnV (2.5) The reader should note that, since material absorption coefficients and air-absorption exponents are normally measured in octave-bands, reverberation times calculated by Equation 2.3 and Equation 2.5 are octave-band estimates. Chapter 2.2.2 2. 7 Background S P E E C H INTELLIGIBILITY Speech intelligibility (SI), which quantifies the quality of verbal communication, depends on two factors. The first is the signal-to-noise level difference between a speech source, such as an instructor speaking in a classroom, and all the noise sources: ventilation system, projector fans, and of course, the students themselves. The second is reverberation. Reverberation can be viewed as a process that spreads the sound energy in time. Under certain conditions, reverberation can enhance speech intelligibility by increasing sugnal levels. Excessive reverberation will tend to smear the spoken words, making it difficult to recognize the syllables making up the words, resulting in poor speech intelligibility. 2.2.3 OPTIMUM REVERBERATION TIMES Since reverberation affects speech intelligibility and the enjoyment of musical performances, certain rooms are more acoustically suited to certain activities. Table 2.3 lists several types of rooms and their optimal reverberation times. Room T Classrooms 0.4 Movie t h e a t r e s 0.7 Recording studios 0.3 Conference rooms 1 Theatres 1 Concert h a l l s 1.8 60 [s] - 0.5 Table 2.3: Optimal cumulative reverberation times for various types of rooms. Acousticians can adjust the reverberation times by altering the equivalent room absorption by replacing or re-surfacing the existing walls and ceilings with suitable materials, or by adding sound-absorbing or sound-enhancing fixtures such as partitions. However, it is more cost effective to simulate the acoustical characteristics affecting reverberation and speech intelligibility at the design stage, with software such as ClassTalk, 2.3 than to remodel at a later date. SUMMARY Diffuse field-theories provide a simple but useful statistical model of reverberation. The absorption of sound energy in a room, either by its material surfaces or by the air it contains, is a frequency-dependent phenomenon, and is normally quantified in octave frequency bands. As a consequence, reverberation time is frequency-dependent and has been traditionally measured in the same octave frequency bands. The common methods to measure reverberation time are presented in the next chapter. Chapter 3. Measurement of Reverberation 8 CHAPTER 3 MEASUREMENT OF REVERBERATION 3.1 EMPIRICAL METHODS Wallace Clement Sabine i n 1895 [32] first measured reverberation time i n cathedrals by using a church organ to build up the sound pressure level to a steady-state value. Then, using only a keen set of ears and a stopwatch, he measured the time required for the diffuse reverberation to become inaudible. -Fortunately, better methods are available today. 3.1.1 STEADY-STATE EXCITATION Early measurement of reverberation was commonly performed by powering a speaker with bandpassfiltered noise until the sound pressure level reached a steady state. Then the power was abruptly shut off and the pressure level recorded as it decayed. For each frequency band, the process was repeated several times at various locations around the room, and averaged to determine a final reverberation time. The steady-state excitation method is time-consuming, and lost favour to a more efficient method discovered by Schroeder, in which impulses are used. 3.1.2 IMPULSIVE EXCITATION A revolutionary advance in the measurement of room reverberation was made by Schroeder in 1965 [53]. He showed that measurement using a single impulsive sound, such as that generated by a handclap, balloon pop, or a starter's pistol, could yield results which are identical to the bandpass filtered noise method described above. Although a breakthrough i n acoustics in its day, this method is also not perfect [21] due to difficulties in generating repeatable omni-directional impulses with broad frequency content. A blank pistol can be modified to produce omni-directional impulses with large dynamic range because of the high levels generated, but non-linear effects are unavoidable if the recording microphone is situated too close to the gun [27]. 3.1.3 M L S SYSTEMS M L S systems [60] are robust to distortion and are accurate only for time-invariant systems, as is the case for a room under steady-state conditions. A maximum-length-sequence ( M L S ) has similar properties Chapter 3. Measurement of Reverberation 9 to random noise, but remains deterministic. A M L S is a pseudo-random sequence of binary numbers generated by an n-bit shift register, and has a period of I = 2 — 1 samples. Since room acoustic impulse n responses tend to be several seconds in length, the order of the M L S , n, is often 16 or more. In a room reverberation measurement system the sequence is mapped to a bipolar signal of amplitude ±Vo volts and used to drive an ordinary loudspeaker. The output signal has a spectrum similar to that of white noise. A microphone picks up the resulting audio signal; the cross-correlation of the system output and the original sequence yields the impulse response of the room, with good dynamic range and immunity to noise. 3.1.4 TDS SYSTEMS Time Delay Spectrometry (TDS), developed by Heyser and Crown, use a linearly increasing swept sine wave as the stimulus. The impulse response is obtained by wondowed integration of the product of the stimulus and the measured response. Some T D S systems use F F T s to decode the linear sweeps, first introduced by Berkhout, whereas Kirkegaard and Puria suggest the use of a two second logarithmic sweep from high to low frequencies. Similar to M L S system, T D S systems require the length of the stimulus to be much longer than the length of the response of the system, and assume linearity and time-invariance of the room response. 3.2 INCONSISTENCIES AND LIMITATIONS OF EMPIRICAL M E A S U R E M E N T SYSTEMS Early portable reverberation time measurement systems often reported reverberation times inconsistent with other such devices. For example, Livingstone, Base and Hawtin [34] developed a portable field instrument that used impulsive excitation to measure reverberation. They compared octave-band measurements obtained with their system with measurements from a similar device manufactured by Briiel & Kjaer, and reported agreement within 10 % in laboratory tests. However, in a comparison with results reported by two other researchers for meaurements of the same room, there was a spread of about 0.5 s in the 1 kHz band, and a maximum difference of nearly 1 s in the 4 k H z band, across the three sets of reported values. Other systems claimed unbelievable accuracy. A digital reverberation meter [2], using the interrupted noise method with pink noise, claimed to measure reverberation with an accuracy of ± 0 . 0 1 s. It is unclear how such results could be published in a major journal without supporting evidence. Regardless of the measurement system employed, the signal-to-noise (SNR) is often inadequate to be able to get a full 60 d B drop in sound pressure level. The reverberation time is often extrapolated by measures denned for smaller decreases in the sound pressure level [27], namely the E D T , T o, and T30. 2 The E D T , or early decay time, is defined as the time taken for the sound pressure level to decrease by 10 Chapter 3. Measurement of Reverberation 10 dB. The T20 is estimated from the best-fit linear regression line to the slope of the decay curve for values from -5 d B and -25 d B below the maximum initial value. For the T30, the lower limit is dropped to -35 dB. 3.3 IMPULSE RESPONSE The impulsive excitation, M L S , and T D S methods are designed to obtain a room impulse response. The impulse response is the response of a discrete-time system to a unit impulse, u(t), which has a value of 1 at time t = 0 and a value of 0 for all other times. According to system theory, the impulse response defines all the properties of a linear time-invariant (LTI) system. Applying an impulse to a digital system is trivial, and is an excellent method to obtain the impulse response for D S P systems such software reverberators. 3.4 ENERGY DECAY CURVE Schroeder [53] showed in 1965 that a simple integral of the impulse response of a room, denoted by h(t), yields a decay curve that is identical to the average over infinitely many decay curves obtained by excitation of an enclosure with bandpass filtered white noise. Expressed mathematically, oo / h\r)dr (3.1) where (s (t)) denotes the ensemble average of the squared impulse response. The right-hand side of the 2 relation is known as the energy decay curve or E D C . A typical measured impulse response is shown in Figure 3.1. O.81—r 0.25 Time [s] Figure 3.1: A typical measured impulse response ( G E O G 200). Extensive experimental verification of Equation 3.1 has been performed by Chu [10] and Bodlund [6]. A n elegant proof of this relation is given by Kuttruff [33]. Chapter 11 3. Measurement of Reverberation To obtain reverberation times as a function of frequency, the impulse response is first bandpass filtered, using either octave or third-octave Butterworth bandpass, filters as specified by the A N S I S l . l 1986 ( A S A 65-1986) standard. The amplitude-frequency responses of the 125 Hz to 8 kHz octave-band filters are shown in Figure 3.2. Using Butterworth third-octave bandpass filters, followed by the calculation of the E D C for each band, the reverberation time in third-octave bands can be displayed as a three-dimensional plot, as in Figure 3.3. Normalized Frequency Figure 3.2: Amplitude-frequency response of the 125 Hz to 8000 Hz Butterworth octave-band filters. Although the impulse response is a theoretical description of a L T I system, measurements of a room impulse response are always finite i n length and of limited accuracy. Electrical noise is present in amplifiers, discretization errors are unavoidable in analog-to-digital conversion systems, and acoustical background noise, the largest source of noise, is always present. The total noise i n a measured room impulse response is best visualized with an echogram. An echogram is the square of the impulse response plotted in units of d B . A n echogram, from an impulse response measured in the Geography 200 classroom with a M L S system, is shown i n Figure 3.4. The total (constant) noise is visible as the horizontal region occuring after a time of about 0.5 s. 3.5 E D C NOISE REDUCTION Several techniques are commonly used to minimize the influence of noise in the calculation of the E D C . The most common is reverse-time integration. Reverse-time integration of the impulse response uses the following relation: \ roc Jt h (T)dT= rt 2 fOO h {T)d{-T)= h (T)dT~ 2 Joo pt 2 JO Jo h (T)dT 2 Other techniques include: 1. Sliding time window; 2. Truncation of the measured impulse response with high levels of noise; (3.2) 12 Chapter 3. Measurement of Reverberation 1.693 8000 1/3 Octave Band Time [s] Figure 3.3: A three dimensional surface generated from the E D C curves computed for a typical impulse response filtered in third-octave bands. Minor contour lines occur every 10 dB. The major contour line indicates -60 dB. 3. Direct substraction of average noise energy; 4. Iterative method of substraction of average noise energy. The sliding time window technique [27] can be used if the level of the background noise is unknown, in which case, the upper limit of integration is replaced by t+To to give the following integral, / / + T ° h (r) dr, 2 where the ideal value of To is 0.2 of the reverberation time. The ISO standard outlines an algorithm for this procedure, but it requires the noise floor to be at least 10 dB below the lower value of the evaluation range. For example, the evaluation of T20 requires the noise floor must be at least 35 dB below the maximum level of the integrated squared impulse response. It may not be possible to satisfy this requirement in every case, especially in the lower frequencies. Truncation of the impulse response, by setting a new (lower) upper limit of integration, essentially cuts out the contribution of extraneous noise in evaluation of the Schroeder equation. Faiget, Legros, and Ruiz [17] present a systematic way to determine the revised upper limit, by the point of crossing of two regression lines computed from the decay and the last part of the impulse response where noise is present. Vanderkooy [60] uses a simple method to compensate for noise in an impulse response. The average noise energy is estimated over a small interval of the late part of an impulse response. This value is sub- Chapter 3. Measurement of Reverberation 13 Time [s] Figure 3.4: Echogram of 1 k H z octave-band filtered impulse response of G E O G 200 (maximum normalized to 0). The constant (exponential) decay is visible as the initial linear portion that eventually decays into the constant noise floor after a time of about 0.5 s. stracted while calculating the reverse-time integral. However, his method requires operator intervention to dynamically adjust the several parameters of the compensation. A n interative noise substraction method developed by Cerveau [9], repeatedly applies the procedure used by Vandefkooy until the average noise energy has reduced to a specfied minimum. A n iterative noise-reduction algorithm, based on the method used by Cerveau [9], will be used in the calculation of the E D C in this thesis. The algorithm is detailed in Appendix B . Numerical computation of the E D C requires some care in the choice of the method of evaluation. Bodlund [6] investigated the results obtained by the extended Simpson's rule and the extended trapezoidal rule for the numerical evaluation of the E D C , and concluded that there was no appreciable difference. For the results calculated in this research, the trapezoidal rule is used to evaluate the two-integral reverse-time form of the E D C in the right hand side of Equation 3.2. 3.6 ENERGY DECAY RELIEF Recall that the E D C is defined as oo / h (r)dT 2 (3.3) where h(r) is the impulse response of the room. It represents the energy remaining in the impulse response after time t. The E D C for a given frequency band is obtained by octave or third-octave bandpass filtering of h{r) before evaluation of the integral. This analysis procedure to obtain frequency-dependent reverberation times is limited by several factors: 1. The frequency resolution is limited by the bandwidth of the filter. For proportional frequency bands the resolution decreases by a constant factor as the frequency increases; Chapter 3. 14 Measurement of Reverberation 2. The accuracy is limited by the bandpass filter design characterisitics - namely, the amplitudefrequency, phase, and group-delay properties; 3. The measurement is corrupted by noise which biases calculated reverberation times towards higher values. Jot, Cerveau, and Warusfel [30] have developed a time-frequency analysis procedure that is the natural extension to Schroeder's E D C . The Energy Decay Relief ( E D R ) is defined by a time-frequency representation obtained from an impulse response by means of a time-frequency distribution function p(t,f). For a signal h(t), the Energy Decay Relief, denoted E D R ^ ( i , / ) is (3.4) Many time-frequency distribution functions exist, each with different properties [11]. Additional constraints are needed to determine a suitable time-frequency distribution function p(t,f): 1. Integration of EDR (t, h f) for fixed frequency should yield the EDC (t): E D R ( t , / ) df = h h EDC (t); fc 2. Integration of E D R / , ( i , / ) for fixed time should yield the squared Fourier transform of h(t) integrated over all time: EVR (t, h f) dt = \H(f)\ ; 2 3. Preservation of causality - that is, if h(t) is causal, p(t, f) = 0 for t < 0 : f °° p(t, f) dt = 0 \H(f)\ ; 2 4. Preservation of temporal shifts - that is, shifting h(t) causes an identical shift of ph\ 5. The time-frequency distribution function p(t,f) is anticausal, or that Ph{t,f) only depends on values of h(t) for t > T for an impulse response h(t) truncated at time r ; The Page distribution [11], or more accurately the Levin-Page distribution applied to time-reversed signals, was determined to satisfy the five requirements listed above. Fortunately, Jot showed that calculation of p is unnecessary, and that the short-time Fourier transform ( S T F T or spectrogram) was a practical approximation for the Levin distribution satisfying the above constraints, albeit with smoothed and decimated results in both time and frequency domains. The S T F T was developed to describe time-varying signals found in the areas of radar, sonar, data communication, and speech processing [43, 45, 46]. More recent applications include short-time spectral attenuation techniques to restore degraded audio recording [8]. In simplest terms, the S T F T is the discrete Fourier transform of a signal as viewed through a sliding time-domain window. The characteristic shape of a window, primarily the length and taper of the sides, determines the time-frequency resolution. Narrowband spectrograms use longer windows to achieve higher frequency resolution with a corresponding decrease in time resolution. Windows with tapered sides Chapter 15 3. Measurement of Reverberation have lower side-lobes in their amplitude-frequency response, resulting i n less spectral leakage between frequencies. The S T F T is an efficient method for computing the E D R of long impulse responses, and is accurate when applied to low-noise impulse responses as obtained with artificial reverberators, when used with an appropriate window. The S T F T uses the Fast Fourier Transform ( F F T ) and can be efficiently computed using the radix-2 algorithm when the length of the window is a power of 2. To minimize spectral leakage between energy decay curves, a time-domain analysis window providing substantial side-lobe attenuation is needed: Jot found the Blackman-Harris window [22] of order 4 with a side-lobe rejection of 92 d B was suitable. The Blackman-Harris window is defined by w(n) = a - a cos(27r/7V n) + a cos(27r/A 2n) - a r 0 x 2 3 COS(2TT/N 3n) (3.5) for n = 0 , . . . , iV — 1. The coefficients, for orders 3 and 4 with the specified side-lobe rejecions (SLR), are listed in Table 3.1. Order 3 3 4 4 SLR [dB] -67 -61 -92 -74 Clo 0 42323 0 44959 0 49755 0 49364 0 35875 0 48829 0 40217 ai 0,2 0 07922 0 05677 0 14128 0 09392 - - 0 01168 0 00183 a.3 0 49703 Table 3.1: Blackman-Harris window coefficients, for the indicated order and side-lobe rejection. Thus, to compute an E D R for an impulse response, a S T F T is applied using the Blackman-Harris window of size 1024 with a temporal overlap of 75%. This yields a frequency resolution of 43 Hz and a time step of 58 ms, when applied to a signal sampled at 44.1 kHz. Computing the decay curve for each frequency yields a three-dimensional plot, as shown i n Figure 3.5. For clearer graphical presentation, the resolutions i n the frequency and time domains have been reduced by a factor of 4 and 8, respectively, in this and every subsequent E D R plot. Application of the iterative noise reduction procedure outlined in Appendix B improves the S N R , and this improvement is visible i n Figure 3.6 as a lowered noise floor, and improved linear definition in the decay along any particular frequency. The slope of the decay curves along the initial linear portions, is also steeper for every frequency. A s noted earlier, noise tends to bias computed reverberation times to higher values, and this effect is counteracted with noise reduction. The E D R can also be viewed as a two-dimensional plot, as shown i n Figure 3.7. The "well-behaved" contours i n the upper right corner indicate a stable exponential decay with a good S N R . The noise floor is visible as the vertically-oriented, repeatedly-folded contour lines. The reverberation time can be accurately determined from the slope of a straight-line approximation to the initial linear portion of each decay curve. A rationalized reverberation time algorithm (RTA) Chapter 16 3. Measurement of Reverberation developed by the author, detailed in Appendix B.2, is used to determine the best straight-line approximation over the the largest possible drop in magnitude of a decay curve. The R T A can be applied to any decay curve; either bandpass filtered E D C s , or any frequency component of the E D R . The R T A is applied to every decay curve of an E D R that has an initial value greater than -40 d B (default minimum). A n accurate plot of the reverberation time as a function of frequency, referred to as a RT plot for the remainder of this document, can be obtained, as shown in Figure 3.8. Octave-band reverberation times can be extracted, from a R T plot, by averaging the reverberation times of the frequency components of an E D R falling within an octave-band. Since the E D R , as implemented for this research, has a frequency resolution of 43 Hz, it is guaranteed that at least one frequency component will fall within the octave-band frequency limits of one of the seven octave bands of interest listed in Table A . l . For the R T plot in Figure 3.8, the octave-band reverberation times are listed in Table 3.2. For the remainder of this document, octave-band reverberation times extracted from a R T plot will be referred to as R T (octave-band) reverberation times. Octave Teo Band 125 250 500 0.471 0.603 0.781 1000 0.806 2000 4000 8000 0.771 0.747 0.595 Table 3.2: R T octave-band reverberation times extracted from an E D R for an impulse response measured in G E O G 200. 3.7 C O M P A R I S O N OF T H E E D R AND T H E E D C A popular M L S acoustical measurement system is the M L S S A system [49]. The software component of the system can also compute the E D T , and several other reverberation times, i n octave-frequency bands. These are the R T o and the R T , and an adjustable R T 2 3 0 u s e r , defined by default as the reverberation time calculated from the linear approximation to the E D C by points 10 and 25 d B lower than the starting E D C value. The impulse response of the U B C Geography 200 classroom will be used i n a comparison of the reverberation times obtained by the M L S S A system and the E D R as specified in section 3.6. The values for the reverberation times reported by the M L S S A system are listed i n Table 3.3. The R T plot for the same impulse response of the Geography 200 classroom is shown in Figure 3.8. W i t h the exception of the 250 Hz and 500 Hz octave bands, there is good agreement between the measured values obtained with the M L S S A system - in particular the average of the R T 2 u and R T 3 0 values, and the values calculated with the E D R . However, since the noise-reduction method or algorithm used by the M L S S A system is undocumented, the discrepancy cannot be further investigated. Chapter 3. 17 Measurement of Reverberation 1.672 Frequency [Hz] Time [s] Figure 3.5: EDR plot of a typical measured impulse without noise reduction. Minor contour lines occur every 10 dB. The major contour line indicates -60 dB. 3.8 REVERB-PRINT A useful pictorial representation of the decay of an impulse response, the reverb-print [54], can be obtained from the spectrogram. As discussed earlier in Section 3.6, the spectrogram is an n-point discrete Fourier transform with a n-point window, with the amount of temporal overlap normally set at 50% or 75%. The spectrogram procedure generates an n/2 by m matrix, B, of complex values. A reverb-print is obtained using the following formula W = 101og ~2 10 (3.6) where the function sq(x) = x is applied to every element of \B |. The logarithmic scaling linearizes the 2 exponential decay in the time domain and, when plotted as a two-dimenstional image with a suitable color map, allows for easy visual identification of ringing modes and flutter echos. Ringing modes are visible as very narrow horizontal streaks, and flutter echos are seen as wide horizontal streaks with periods of low signal magnitude occurring repeatedly in the time domain. A measured room impulse response would not be expected to exhibit either ringing modes or flutter echos, and would usually have a smooth exponential decay of energy at all frequencies. The reverb-print for the Geography 200 classroom obtained from an impulse response with the MLSSA system is shown Chapter 3. Measurement of Reverberation 1.672 18 Frequency [Hz] Time (s] Figure 3.6: E D R plot of a typical measured impulse response for G E O G 200. Minor contour lines occur every 10 d B . The major contour line indicates -60 d B . in Figure 3.9. There is no indication of flutter echos. The two horizontal bands, centered about 250 Hz and 2500 Hz, may be the result of standing waves at the location in the room where the measurement was taken. It is unlikely that another measurement made elsewhere in the room would show the same effect. A "good-sounding" artificial reverberator would have a reverb-print that is very similar to that obtained for a real room, with similar reverberation times. 3.9 R E V E R B E R A T I O N AND SPEECH INTELLIGIBILITY As mentioned in Section 2.2.2, reverberation affects speech intelligibility. Other measures of the acoustical characteristics of a room calculated from the squared and integrated impulse response and used for speech intelligibility measurements are clarity and definition. The early-to-late index, denoted Ct , measures the ratio of early-to-late arriving sound energy. The e early sound energy includes the direct sound and early reflections, whereas the late sound energy is contained in diffuse reverberation. It is defined, for a room impulse response h(t), as Ioh (r)dr 2 C u = 10 log I D dB (3.7) Chapter 3. Measurement of Reverberation 0 2756.3 5512.5 8268.8 11025 13781.3 16537.5 19 19293.8 Frequency [Hz} Figure 3.7: Two-dimensional E D R plot of a typical measured impulse response for G E O G 200. Minor contour lines occur every 10 d B . The major contour line indicates -60 d B . Octave Measurement 125 250 Band 500 1000 2000 4000 8000 Average EDT 0 678 0 522 0 637 0 .783 0 760 0 661 0 598 0 693 RT 0 501 0 519 0 637 0 .803 0 818 0 762 0 618 0 716 665 2 0 RT30 0 495 0 499 0 591 0 .730 0 770 0 741 0 607 0 RTuser 0 600 0 554 0 621 0 .824 0 822 0 773 0 640 0 711 0 498 0 509 0 614 0 .767 0 794 0 752 0 613 0 0 471 0 603 0 781 0 .806 0 771 0 747 0 595 (RT 2 0 + RT (EDR) RT 3 0 )/2 691 Table 3.3: Measured reverberation times of the G E O G 200 classroom with the M L S S A system and the E D R algorithm. where t is the time delimiting the early and late sound energies. The early-time limit is normally 50 ms e for speech, or 80 ms for music [27], and the value of Cso is usually referred to as clarity. High values of clarity indicate large amounts of early energy, synonymous with clear speech. Low values are calculated for unclear reverberant sound. The second measure is the early-to-total sound energy ratio or definition, and is used as a measure of the distinctness of speech and music. Definition is denoted as D , te D. t and is given by (3.8) J~h>(T)dT For D50, it is exactly related to C50 by the following relation: , C50 = 10 l o g 10 1 D,50 -D<50 dB (3.9) Chapter 3. Measurement of Reverberation Figure 3.9: Reverb-print of an impulse response measured for Geography 200. 20 Chapter 3.10 3. Measurement of Reverberation 21 SUMMARY Under appropriate conditions, room reverberberation can be considered a L T I system, for which an impulse response defines all the properties of such a system. Several techniques are available to measure the impulse response of a room. Each method has it strengths and weaknesses. However, measured room impulse responses are often corrupted by noise that tends to over-estimate the reverberation time calculated with the E D C . Several noise reduction techniques are available, but standard procedures for every case remain undefined. The recent ISO 3382 standard lacks procedures for short reverberation times (0.1 - 0.2 s) [47], and in the case of non-linear (double-sloped) decay curves does not return a value. A n interative noise-reduction algorithm has been implemented for the research presented later in this thesis. In addition, an unique reverberation time algorithm has been designed by the author to obtain a reverberation time from the best straight-line approximation over the largest drop possible in a decay curve. The R T A is applicable to E D C s and E D R s . Measuring the reverberation time in octave or third-octave bands provides a measure of the frequencydependence of the reverberation, but with decreased spectral resolution at higher frequencies. The E D R is a simple generalization of the band-limited E D C , that provides a constant resolution i n the frequency domain and accurate reverberation times, when used in conjuction with a noise-reduction method. The R T plot is a graph of the reverberation times extracted from an E D R by application of the R T A . A R T plot shows the spectral dependence of reverberation time with a high frequency resolution, and for the results reported in this research, the resolution is 43 Hz. The reverb-print, is a convenient graphical method useful in identifying ringing modes (coloration) and periodicities in the amplitude-frequency response (flutter echos) of an impulse response. The E D R , R T plot, and the reverb-print are useful measures of the frequency response of an impulse response, and will prove invaluable in the testing of artificial reverberators and octave-band software reverberators in the next three chapters. Chapter 4. Artificial Reverberation 22 CHAPTER 4 ARTIFICIAL R E V E R B E R A T I O N 4.1 HISTORICAL REVERBERATION M E T H O D S Before the use of digital electronics became widespread, reverberation was added to audio signals using echo chambers, plates, spring reverberators, and analog tape or disks. Echo chambers are small rooms containing a sound reproduction system that drives one or more speakers, and a microphone. The audio signal was played, and reverberation was imparted indirectly by the acoustical properties of the room. The total amount and spectral dependency of the reverberation was adjusted by the placement of the speaker(s) and the microphone, and also by varying the effective absorption of the room. Electromechanical systems were also built to simulate reverberation. A large metal plate, of about 4 feet by 8 feet in size, was suspended under tension. Electromagnetic transducers were used to convert the input audio signal into oscillations in the plate, and a single pickup transducer recorded the output signal. The time of oscillation was controlled by the adjustment of tension using mechanical dampeners. This device was reputed to produce realistic reverberation, but was difficult to adjust, frequently requiring four or more hours of tuning for a given reverberation effect. Spring reverberators, as used in early guitar amplifiers, were miniturized versions of the plate reverberator. A n electromagnetic transducer forced oscillations at one end of a spring under tension. A receiver was used on the the other end to pickup the modified signal. Although easy to use, parasitic oscillations were a problem. Analog electronics were also used. A single write head would record an audio signal onto a disk or tape. Multiple read heads with adjustable attentuation were used in parallel to generate the output. The delays between echoed and original signals were determined by the relative distance between the heads, and by the tape speed. Eventually, digital electronics has replaced these methods. 4.2 C O M M O N DIGITAL ELEMENTS The basic elements used in artificial reverberators include delay and multitap lines to simulate early reflections, and comb and allpass filters to simulate the reflections of sound between parallel sets of walls. Chapter 4. Artificial Reverberation 23 The digital signal procesing usefulness of these elements, in the context of artificial reverberation, will be reviewed in this section. 4.2.1 DELAY LINE The delay line is used to generate a single echo after a delay time of T . The flow diagram is shown in Figure 4.1. The impulse response of the delay line is h(t) = 8(t — r ) , and is a single spike of size 1 occuring at a time r . The amplitude-frequency response is allpass, since \H(ui)\ = \e \ = 1, for all lwT frequencies u>. H x(n) z ->y(n) H Figure 4.1: Delay-line flow diagram. 4.2.2 TAPPED DELAY LINE The tapped delay line is a generalization of the delay line, and consists of several "taps", each separated by a unique delay of time Tj. The tapped delay line is often used to simulate the early reflections of a room impulse repsonse. The flow diagram of a tapped delay line is presented in Figure 4.2. x(n) z -mi z -m , -m3 Z 2 > y(n) Figure 4.2: Multitap line flow diagram. Time delays in terms of samples, nii, can be approximated by w T ; / , where f s s is the sampling frequency. Attenuation is obtained by scaling the tap output with a gain, denoted by gi. The F I R filter can be viewed as a dense multitap line, where most of the delays between the taps are of length 1. The F I R filter has the form M y(n) = Yl i ( ~ ) a x n i and the gains are the a^. 4.2.3 COMB FILTERS Comb filters are used to simulate the decaying reflections between parallel walls in a room. As a sound wave bounces repeatedly between two walls, its amplitude decreases by the same fraction each time Chapter 4. Artificial 24 Reverberation it reflects from a wall. This can be approximated in the time domain by a series of equally spaced, exponentially decaying pulses. There are three versions of the comb filter: the feed-forward, feedback, and frequency-dependent feedback comb filters. Feed-Forward C o m b Filter The flow diagram of the feed-forward comb filter is given in Figure 4.3. The corresponding difference equation is y(n) = go x(n) + g x(n - m) (4.2) m where m is the length of the delay in samples, and go and g m can simulate the superposition of a direct signal, are gains. The feed-forward comb filter g x(n), plus a single, attenuated and delayed "echo", 0 g x(n — m). Attenuation by air can be approximated by the choice of the gain g . m m can be approximated by the acoustical propagation over a distance of sound and f s The delay in time oicm/f meters, where c is the speed s is the sampling rate. x(n) t> z -t* y(n) m Figure 4.3: Feed-forward comb filter flow diagram. Impulse Response Frequency Response Phase Response 1 • 0) TJ f 0.5 E < 0 0 100 200 300 400 Sample 500 0 0.5 1 0 0.5 Normalized Frequency 1 Figure 4.4: Responses for a feed-forward comb filter with gains go = 1.0 and g samples. Normalized Frequency m = 0.7, and a delay of 20 The transfer function for the feed-forward comb filter is given by H(z)=g +g z- (4.3) m 0 For the simple case, m go = g = 1, the magnitude frequency response is |1 -f- e~ \, which simplifies to tum m 2 |cos w f |. The impulse, frequency, and phase responses for a feed-forward filter, with gains go = 1.0 and g m 0.7, and a delay of 20 samples, are shown in Figure 4.4. = Chapter 4. Artificial 25 Reverberation The single two-point impulse response is unrealistic and, for this reason, the feed-forward comb filter is rarely used in reverberation algorithms. Feedback Comb Filter The feedback comb filter is the most common form of comb filter used i n reverberators. The flow diagram of the feedback comb filter is show in Figure 4.5. o y(n) Figure 4.5: Feedback comb filter flow diagram. r The difference, or filter, equation is given by (4.4) y(n) — x(n — m) + gy(n — m) where m is the length of the feedback delay i n samples, and g is the feedback gain. From the filter equation, the impulse response can be found by inspection, h(n) = u(n — m)+g u(n — 2 m) + g u(n - 3 m) + (4.5) 2 and is illustrated i n Figure 4.6. h(n) 0 m 2m 3m 4m Figure 4.6: Feedback comb filter impulse response. The system function, H(z), can be derived from the difference equation by inspection as y—m (4.6) H(z) = The amplitude of the frequency response can be found by evaluating complex plane. This is done with the substitution z = e . lu |i?(2)| on the unit circle in the For the feedback comb filter we find y/1 - 2g cos urn, + g* Chapter 4. Artificial Reverberation 26 The amplitude-frequency response is a maximum when the denominator reaches a minimum value. This occurs when um is an even integral multiple of 7r, resulting in a value of 1 + g for the frequency response. The minimum value for the frequency response can be shown to be 1 — g. Clearly, the magnitude of the frequency response cycles periodically between the maximum and minimum values. The ratio of the response maxima-minima is " 1 + («) 9 which becomes unbounded as g approaches 1. For the typical value of g = 0.7, this ratio is 5.7 or 15 d B . The periodic behaviour in the magnitude-frequency response can be seen in Figure 4.7. The loop gain, g, also determines the decay time of the impulse response. Since the input signal is scaled by a factor of g, each time it circulates once around the m-sample feedback loop, with a corresponding time period of r = m/f s seconds; the time required for the output to be attenuated by a factor of 60 dB is 60 -20 log 10 -3r log g g (4.9) 10 For example, if g = 0.7, then TQQ « 20 r - a reverberation time of 1 s would require a loop delay of 50 ms. For a desired reverberation time, it is possible to either set g and determine m , or fix m and calculate g. There are tradesoffs - a small value for m results in widely spaced peaks in the frequency response, whereas a large value of m reduces the echo density in the time domain. The delay in samples required for a reverberation time of Teo for a given gain, can be found by solving Equation 4.9 using the relation m = t f , and is • s 60 fs l o g 10 (4.10) \g\ Similarly, the gain, given a delay as a number of samples, for a reverberation time of Teo can be shown to be g = lf j-3m/(/ r o) s ( 6 4 U ) The impulse, frequency, and phase responses for a feedback comb filter with a gain of 0.7 and a delay of 20 samples, are shown in Figure 4.7. Impulse Response = Frequency Response Phase Response 0.5 E < -40 200 300 Sample 0.5 0.5 Normalized Frequency Normalized Frequency Figure 4.7: Responses for a feedback comb filter with a gain g = 0.7 and a delay of 20 samples. 1 Chapter 4. Artificial 27 Reverberation Frequency-Dependent Feedback Comb Filter The high-frequency attenuation by air can be approximated i n a feedback comb filter by inserting a first-order lowpass filter with a transfer function of the form 1 l-az- (4.12) 1 into the feedback loop. The transfer function of the frequency-dependent comb filter then becomes z H{z) = -m (4.13) l-gH (z)z- m lp z~ -az-™- m 1 (4.14) 1 — a z~ — g z~ l m For stability, the denominator must be greater than 0. This is ensured when 9 < 1 l - o (4.15) or equivalently, a < 1 — g. The parameter a can be negative, in which case low frequencies are attenuated more than high frequencies. The impulse, frequency, and phase responses for a frequency-dependent feedback comb filter, with a gain of 0.7 and a delay of 20 samples and lowpass filter gain of 0.2, are shown i n Figure 4.8. Impulse Response Frequency Response 8 Phase Response 20 E < -40 100 200 300 Sample 400 500 0.5 Normalized Frequency 1 Normalized Frequency Figure 4.8: Responses for a frequency-dependent comb filter with a feedback gain g = 0.7, a lowpass filter gain a = 0.2, and a delay of 20 samples. Parallel Comb Filters The echo density required for realistic diffuse reverberation is substantial. Schroeder suggested at least 1000 echos per second may be required [52]. One technique to increase the echo density is to place several comb filters in parallel. The transfer function of the parallel comb struture [31] is given by N H{z) = Y -m- (4.16) Chapter 4. Artificial 28 Reverberation where N is the number of comb niters. If all the gains g are set for the same reverberation time, all the t resonant modes will decay at the same rate. If the delay lengths of the comb filters are incommensurate (relatively prime), the echos from two comb niters, i and k, will not overlap until m ; • samples in the time response. 4.2.4 ALLPASS FILTER The allpass filter is a versatile signal processing element. It is found i n digital notch filters and multirate Hilbert transform systems, and is used for group-delay equalization without affecting magnitude response [48]. The allpass filter, as a reverberator, was described by Schroeder [55] as "perfectly colorless", since the frequency response is unity for all frequencies. The flow diagram of the allpass filter is show in Figure 4.9. -9 y(n) Figure 4.9: Allpass filter flow diagram. The difference equation for the allpass filter is given by y(n) = — gx(n) + x(n - m) + gy(n — m) (4-17) where m is the length of the delay i n samples, and g is the feedback gain. The impulse reponse is h(n) = -gu(n) + (1 - g ) [u(n - m) + gu(n - 2 m) + g u(n - 3 m) H 2 2 ] (4.18) and is illustrated i n Figure 4.10. If g = y/2/2 i n both an allpass filter and a feedback comb filter, the impulse responses are identicial for n > 2. The transfer function for the allpass filter is H{z) = v ' — a A- z~ m — l-gz~ (4.19) m v To show that the magnitude of the frequency response is unity for all frequencies, set z = e lu ' and find the absolute value of the transfer function. H(e ") = l . =e- t t m " 9 . (4.20) Chapter 4. Artificial 29 Reverberation h(n) 1-9 2 gd-g ) 2 g d-g ) 2 m 2m 2 g 3m 3 ( 1 .g ) 2 4m Figure 4.10: Allpass filter impulse response. Since |e i m u \ = 1, it is easy to show 1-ge* 1 l-ge- (4.21) Thus \H(e ')\ — 1, and the allpass filter has unity gain at all frequencies. lu The impulse, frequency, and phase responses for an allpass filter, with a gain of 0.7 and a delay of 20 samples, are shown i n Figure 4.11. Impulse Response Frequency Response Phase Response 0.2 a 3 0.1 o -0.1 -0.2 0 100 200 300 400 500 0 Sample 0.5 0.5 Normalized Frequency Normalized Frequency 1 Figure 4.11: Responses for an allpass filter with a feed back gain g = 0.7 and a delay of 20 samples. Cascade Allpass Filters A cascade, or series, circuit of all-pass filters remains allpass, but exhibits an aperiodic echo response and a slow buildup of the echo density. A minimum of five cascaded allpass filters are required to adequately cover the audio frequency range, but additional allpass filters lead to unnatural nonexponential reverberation with a slow build-up time [55]. The transfer function of several filters in series is the product of the individual transfer functions. The transfer function of a cascade of allpass filters, with respective gains gi and delays mj, is given by n i=l _. m a l Observe that the number of terms i n both the numerator and denominator increases as 2™. Chapter 4. Artificial Reverberation 30 Nested Allpass Filter In practice the requirement of high echo is difficult to satisfy with parallel comb or series allpass filter networks. The nested allpass filter [18] is a simple generalization of the allpass filter that has the unique property of an echo density that increases in the time domain. If F(z) is the general transfer function of a system, of the form F(z) = Fn(z) (4.23) F {z) d the transfer function of a nested system is g ( ' v * ) = i y F (z)-gF (z) d ' • n (4-24) v ; Notice that if F(z) is a delay (z~ ), H(z) reduces to the transfer function of an allpass filter. m B y application of Equation 4.24, the overall transfer function is found to be = - 9 2 + 9 l -l+ Z- i m 9l 9 2 z - ^ - 9 z - ™ * l + l 2Z~ m2 - S 9 9 2 ^ z - i ^ + ( m ' + m 2 ) ' V The flow diagram for a nested allpass filter is shown in Figure 4.12. The additional delay of z~ m2 samples is introduced immediately after the inner allpass filter, to create the outer allpass function, with an outer-loop gain of i9 The impulse, frequency, and phase responses for a nested allpass filter, with an inner allpass gain of 0.7, an inner delay of 20 samples, an outer allpass filter gain of 0.7, and outer delay of 10 samples, are shown in Figure 4.13. x(n) Allpass m Z 2 >0- -> y(n) Figure 4.12: Nested allpass filter flow diagram. Although the transfer function of the nested allpass filter is available, a closed formula for the reverberation time of TQO as is available for comb and allpass filters i n Equation 4.9 may not exist. A n approximate formula could be obtained by regression of reverberation times measured over a large number of trials. 4.3 REVERBERATORS BASED ON C O M B AND ALLPASS FILTERS Several popular reverberator designs are composed of only comb and allpass filters. This list includes the Schroeder, Schroeder-Logan, Moorer, Gardner, and Marsch-Porschmann reverberators. Chapter 4. Artificial Impulse Response 31 Reverberation Frequency Response Phase Response 1 0.2 CD 0.5 0.1 CD 1 'c 0 • -0.5 0 ro -0.1 • -0.2 -1 100 200 300 400 500 0.5 Sample 1 Normalized Frequency 0.5 Normalized Frequency Figure 4.13: Responses for a nested allpass filter with an inner gain gi = 0.7 and delay of 20 samples. The outer feedback gain </2 = 0.7 and the outer delay is 10 samples. 4.3.1 SCHROEDER REVERBERATOR One of Schroeder's first reverberators consisted of 4 parallel comb filters summed and fed into 2 allpass filters. The filter parameters are listed in Table 4.1. For a desired reverberation time of T , the gain 6 0 of each comb filter is found with Equation 4.11, noting that the delay i n terms of samples is given by m =T f. s Filter d e l a y [ms] Comb 1 31 Comb 2 . 37 Comb 3 41 Comb 4 45 Allpass 1 5 Allpass 2 1.7 Table 4.1: Comb and allpass filter parameters for the Schroeder reverberator. The desired reverberation time was set to 0.5 s, and the R T plot for the impulse response is shown in Figure 4.14. The corresponding R T reverberation times are listed i n Table 4.2. A s expected, the measured reverberation time is very close to the desired time of 0.5 s, and is independent of frequency. 0.8 0.6 0.4 0.2 10 10 10 Frequency [Hz] Figure 4.14: R T plot for the Schroeder Reverberator with the reverberation time set to 0.5 s. Chapter Octave Band RT 32 4. Artificial Reverberation 125 250 500 1000 2000 4000 8000 0.502 0.495 0.502 0.499 0.504 0.498 0.502 Table 4.2: R T reverberation times for the Schroeder reverberator with a reverberation time of 0.5 s. The reverb-print is shown in Figure 4.15. Flutter echos are visible as vertical banding that is more pronounced at later times. W i t h longer reverberation times, the flutter echos are increasingly dominant in the later portion of the impulse response. The frequency response is relatively uniform at any time t, consistent with the frequency-independent reverberation times shown in the R T plot. The delay of about 30 ms in the start of the reverb-print is a result of the signal propagation delay through the first comb filter, which has the shortest delay time. ^ '—f? 1 1 1 _ 1.5 - 0.5 ^ 0 — 0.1 — 0.2 i 0.3 0.4 1— 0.5 0.6 . i i i 0.7 0.8 0.9 Time [s] Figure 4.15: Reverb-print of the impulse response of the Schroeder reverberator. Chapter 4.3.2 4. Artificial 33 Reverberation SCHROEDER-LOGAN REVERBERATOR The Schroeder-Logan reverberator [55] consists of five allpass filters in series, and therefore is itself allpass. Since each allpass filter has a gain of 0.7 in magnitude, the largest allpass filter delay will determine the reverberation time according to Equation 4.9. For the published filter parameters listed in Table 4.3, the reverberation time is fixed at about 2 seconds. F i l t e r delay [ms] gain Allpass 1 100 0.7 Allpass 2 68 -0.7 Allpass 3 60 0.7 Allpass 4 19.7 0.7 Allpass 5 5.85 0.7 Table 4.3: Allpass filter parameters for the Schroeder-Logan reverberator. 1 1 1—1 EJf! 0) r— 2 W W - 0 i •to 10 2 10 3 4 Frequency [Hz] Figure 4.16: R T plot for the Schroeder-Logan Reverberator. The reverberation time of 2 seconds is visible in the R T plot shown in Figure 4.16. The corresponding R T times are listed in Table 4.4. Octave RT Band 125 250 500 1000 2000 4000 8000 2.033 2.036 2.050 2.035 2.036 1.953 1.941 Table 4.4: R T reverberation times for the Schroeder-Logan reverberator. The reverb-print is shown in Figure 4.17. As in the reverb-print of the Schroeder reverberator, the frequency response is uniform at any time t. Unlike the Schroeder reverberator, flutter echos are not visible. The periodic pattern that occurs in the first 200 ms of the reverb-print decreases with shorter reverberation times, and cannot be heard in the listening tests performed. 4.3.3 MOORER REVERBERATORS Reverberators based on a cascade of allpass filters are not without problems [41]. These problems are: Chapter 4. Artificial 34 Reverberation Time [s] Figure 4.17: Reverb-print of the impulse response of the Schroeder-Logan reverberator. 1. as the number of allpass filters increases, so does the time required to build up to the maximum response, resulting in a lag in reverberation followed by an unrealistic non-exponential decay; 2. sensitivity to the gain and delay times; overlapping modes will be heard as "coloration"; 3. ringing effect i n the tail of the decay resulting in an objectionable metallic sound. The first two problems have partial solutions: (1) limit the number of cascaded allpass filters to five or less; and (2) ensure delays in terms of samples are relatively prime. The third effect is tolerable only with short reverberation times. A parallel combination of comb filters, followed by a series combination of all-pass niters, perform only a little better: 1. very short impulsive sounds became distinctive flutter echos; 2. the metallic sound increases with longer reverberation times. Moorer sought to design a "reasonably good sounding" reverberator. To simulate diffuse reverber- ation, he proposed a parallel array of six frequency-dependent comb filters that fed into one standard allpass filter. The comb filter gains are listed in Table 4.5. The final allpass filter has a delay of 6 ms and a gain of 0.7. Moorer gives an approximate formula for the reverberation time as a function of a Chapter 4. Artificial Reverberation 35 single parameter g to an error of 10%. This configuration was an improvement, but Moorer admits it is sensitive to the parameters chosen. Comb F i l t e r delay 25 k H z 50 k H z 44.1 kHz (ms) 9i 9i 9i 1 50 0.24 0.46 0.41 2 56 0.26 0.48 0.43 3 61 0.28 0.50 0.45 4 68 0.29 0.52 0.46 5 72 0.30 0.53 0.47 6 78 0.32 0.55 0.49 Table 4.5: Comb filter parameters for Moorer's six-comb reverberator. The fifth column lists the gains for the six comb filters interpolated for the standard audio sampling rate of 44.1 kHz from the published values at 25 kHz and 50 kHz. The interpolated values were used in the simulations reported here. To simulate early reflecions, Moorer used a multitap section before the comb filter array. The delays and gains were chosen to match idealized geometric simulations of several rooms. He developed two multitap sections, one of 7 taps in length, and the other had 19 taps in total. The reverberator consisting of a 19-tap F I R section feeding into the parallel comb array, with the interpolated gains, was simulated here. The R T plot for the impulse response is shown in Figure 4.18, and the R T reverberation times are listed in Table 4.6. The spectral effect of the frequency-dependent comb filters is visible as shorter reverberation times at higher frequencies. When applied to audio files, the output does in fact sound "good". The design is simple, and for applications where accurate frequency-dependent control of reverberation time is not required, it would be a reasonable choice for a reverberator. 10 Frequency [Hz] Figure 4.18: R T plot for the Moorer Reverberator with the 19 tap F I R section with the reverberation time set to 0.5 s. The reverb-print is shown in Figure 4.19. A single flutter echo, re-occuring every 150 ms, is visible. However, the flutter echo has a duration of less than 50 ms, and does not appear to appreciably disturb the impulse response. The frequency-dependent reverberation is clearly visible after a time of 0.6 s. The Chapter Octave Band RT 4. Artificial 36 Reverberation 125 250 500 1000 2000 0.591 0.803 0.748 0.672 0.636 4000 0.551 8000 0.455 Table 4.6: RT reverberation times for the Moorer reverberator with the 19-tap FIR section with the reverberation time set to 0.5 s. delay of about 110 ms in the start of the reverb-print is most likely the result of the signal propagation delay through the multitap filter and the comb filter with the shortest delay time. Time [s] Figure 4.19: Reverb-print of the impulse response of the Moorer reverberator with the 19-tap FIR section with the reverberation time set to 0.5 s. 4.3.4 GARDNER REVERBERATOR Gardner [18, 20] presents three variations of his reverberator, suitable for small, medium, and large reverberation times. A general schematic of the Gardner reverberator is presented in Figure 4.20. The allpass filters are either simple allpass, nested allpass, or a combination of the two types. The low-pass filter is used to model the frequency dependent absorption of sound by air, by relating the air absorption approximations made by Moorer [41] to the mean echo distance. The attenuating gain, g, in the global feedback loop, controls the final reverberation time. The applicable reverberation time ranges for the three reverberators are listed in Table 4.7. However, Gardner does not provide a closed formula for the reverberation time as a function of the Chapter 4. Artificial Reverberation 37 gain g, but hints that a formula can be obtained by regression of measured reverberation times obtained in repeated trials. A n d furthermore, the allpass filter parameters in each of the three versions were obtained by extensive trial and error. Reported to sound good, a modified version has been implemented in hardware [4] using a commercial DSP-based board and P C based software. The Gardner reverberator was not simulated in this research. Reverberator T/6o range small 0.38 - 0.57 medium 0.58 - 1.29 large 1.30 - infinite Table 4.7: Applicable reverberation time ranges for Gardner's reverberators. Feedback Loop 9 Figure 4.20: General structure of a Gardner reverberator. A P indicates either an allpass filter or a nested allpass filter. The global feedback loop contains an adjustable gain g to control the reverberation time. The lowpass filter, L P , simulates frequency-dependent attenuation due to air absorption. 4.3.5 The M A R S C H - P O R S C H M A N N R E V E R B E R A T O R Marsch-Porschmann reverberator [36] is an extension of the Gardner reverberator. A single high- order F I R filter is placed in the global feedback loop for frequency-dependent control of the reverberation time. Since the F I R filter has an order of 1024, direct convolution is computationally expensive. Fast convolution ( F F T ) is a solution, but would increase input/output latency. The hybrid fast-convolution method developed by Garder [20] is a better method for minimal input/output convolution latency. It is a fairly detailed design, and has not been simulated in this research. 4.4 FEEDBACK D E L A Y NETWORKS Feedback delay networks were first introduced by Stautner and Puckette [56], as a generalization of a feedback comb filter. The single m-sample delay line of the feedback comb filter is replaced by a feedback Chapter 4. Artificial 38 Reverberation matrix. Feedback delay networks are of the form shown in Figure 4.21. A n indepth analysis of feedback delay networks is well beyond the scope of this work. The reader is directed to the references for more details [20, 29, 30, 31, 50]. a i1 3 12 3 13 3 21 a 22 3 23 31 a 32 a 33 3 t' 1 -mi •p Z Z z 1 ' c. -m? c -"3 . —1 -t> y(n) x(n). d Figure 4.21: General structure of a feedback delay network of order 3. 4.4.1 JOT REVERBERATOR Jot designed a reverberator, based on unitary feedback systems, with two important features: 1. Arbitrary time and frequency echo density with an absence of coloration in the late decay; 2. Desired reverberation is frequency dependent and bound by a frequency response envelope. The overall stucture of Jot's reverberator is illustrated in Figure 4.22. The first-order IIR absorptive filters, hi(z), are introduced to obtain frequency-dependent reverberation by moving the poles of the reverberator to lie on a curve specified by the reverberation time, T(ui). A first-order F I R tonal correction filter, t(z), is used to compensate for the effect of the absorptive filters, and restore a flat frequency response envelope. The reader is directed to the references for more details [20, 28, 30, 31]. 4.5 MULTIRATE ALGORITHMS A common task is to filter a signal with a narrow bandpass filter where the width of the passband and transition band are a small fraction of the sampling rate. For example, the 125 H z octave band has a bandwidth of 89 Hz, or 0.002 of a 44.1 kHz sampling rate. A F I R filter would require a large order to meet the requirements and would be computationally expensive to apply. A n IIR filter will often suffer quantization effects and non-linear phase. The low-order IIR Butterworth filters defined by the A N S I standard [1] and used by virtually all reverberation time meters have wide transition bands, most likely for compatibility with outdated analog designs. Chapter 4. Artificial Reverberation 39 •>y(n) d Figure 4.22: General structure of a Jot reverberator of order 3. The Jot reverberator is an extension of the feedback delay network, where absorbant filters hi (z) are introduced to effect a frequency dependent reverberation time. Coloration in the late reverberant decay is compensated by the tone corrector filter t(z). The Shannon sampling theorem states that the sampling rate must be at least twice that of the highest frequency of interest, for exact recovery of an analog signal from its sample values [44]. Sampling a signal at rates much higher than the Nyquist rate essentially creates redundant sample values. Multirate signal processing involves the use of multiple sampling rates to remove redundant information before transmission, storage, and processing of a digital signal. Multirate digital signal processing forms the basis of analysis-synthesis filter banks where a signal-is decomposed into several subbands to take advantage of the non-uniform distribution of energy. Applications include the subband coding of speech [14, 46] and images [15] for transmission at reduced bit rates, computationally efficient methods for spectrum estimation and transmultiplexer design [3]. Resampling a digital signal to a different rate is done by decimation to reduce the sampling rate, interpolation to increase it or, for fractional rates, a combination of the two. Low pass filters are used to prevent aliasing, by reducing the bandwidth of the signal before the decimation filter. Multistage decimation and interpolation are used if the interpolation or decimation factor is much larger than unity, and is factorable into a product of integers. The gains i n computational efficiency obtained with this approach can be very significant [13]. The design of optimal multirate bandpass filters is by no means trivial. The reader is directed to the references for more details [3, 14, 39, 40, 57, 58, 59]. 4.5.1 M U L T I R A T E DIGITAL REVERBERATION SYSTEMS More recent work in artificial reverberation includes the accurate synthesis and simulation of room impulse responses using a multirate system. German researchers Schoenle, Fliege, and Zoler [51] have devised a time-frequency representation of room impulse response data obtained by wavelet decompostion using a Chapter 4. Artificial Reverberation 40 tree-structured multirate analysis bank. Cascaded comb filters are applied i n the frequency subbands to simulate reverberation. The broadband output signal is obtained by the summation of the outputs of a synthesis filter bank with perfect reconstruction properties. The authors claim very long room impulses can be modeled accurately and simulated i n real-time. 4.6 CONVOLUTION WITH AN IMPULSE RESPONSE A synthetic or sampled room impulse response is convolved with a sound signal to simulate the effect of the room on the audio signal. Typical room responses can be several seconds long, and at the audio standard sampling rate of 44.1 k H z a 2 second response requires a 88200 point F I R filter. Direct convolution of a filter of this length is impractical, and a block F F T transform method would suffer noticable input-ouput delay. Gardner developed an efficient convolution method that is a hybrid of both methods [19]. Moorer [41] noted a synthetic impulse response with octave-band reverberation times was easy to create: sum the output of an octave-band filterbank applied to white noise after application of an exponential amplitude envelope in each subband. 4.7 SUMMARY The characteristics of several digital filters commonly used in artificial reverberators have been reviewed. Delay lines are effective at simulating early reflections. The feedback comb filter is used to generate an exponentially decaying train of pulses, approximating a sound wave reflecting between two parallel walls of a room. The frequency-dependent feedback comb filter is useful i n approximating the absorption due to air. The allpass filter can be considered the allpass version of the feedback comb filter, and has the additional feature of series connectivity. Simple closed formulae are available to set the parameters of comb and allpass filters for a desired reverberation time. Reverberators based on comb and/or allpass filters, such as the Schroeder, Schroeder-Logan, and Moorer designs, have several intrinsic problems. Flutter echos, and ringing noise are impossible to remove, but can be minimized by tuning the gains and/or delays for each new reverberation time. The Gardner and Marsch-Porschmann reverberators use a combination of allpass and nested allpass filters, and are less susceptible to flutter echos and coloration. Jot's reverberator is based_on a unitary feedback delay network. Frequency-dependent reverberation is obtained by the introduction of absorptive niters, and a flat frequency response is restored with a tonal correction filter. It is an advanced design and is claimed to produce excellent results, but with noticeable computational cost [36]. Convolution of an audio signal with a room impulse response, or with a synthetic impulse response created by the Schoenle-Fliege-Zoler reverberator or by the method suggested by Moorer, is another Chapter 4. Artificial technique to create artificial reverberation. Reverberation 41 Direct convolution is computationally expensive and the hybrid convolution method created by Gardner is the best choice for near real-time performance. A summary of the existing reverberators reviewed for this research is presented i n Table 4.8. Unfortunately, no reverberator simulated here was found acceptable to meet the research objectives, prompting the design of entirely new reverberators in the next chapter. Octave Band Reverberator Reverberation Simulated Schroeder No Yes S chroeder-Logan No Yes Moorer No Yes Gardner No No Marsch-Porschmann In p r i n c i p l e No Jot In p r i n c i p l e No Yes No Schoenle-Fliege-Zoler Table 4.8: Comparison of popular existing reverberator designs. Chapter 5. Design of an Improved Reverberator 42 CHAPTER 5 D E S I G N OF AN IMPROVED R E V E R B E R A T O R Having identified an accurate method to measure reverberation time as a function of frequency, and having reviewed the characteristics of the filters commonly used in digital reverberators, new reverberators can now be designed, prototyped, and tested. 5.1 OBJECTIVE The purpose of this work was to develop a frequency-dependent software reverberator capable of accurately adding reverberation to audio signals, with desired reverberation times from 0 to 2 seconds specified in independent octave frequency bands from 125 Hz to 8000 Hz. However, octave-band reverberation in itself, is not enough - additional requirements must be satisfied for a useable reverberator. These requirements include a flat frequency response across the audio range of interest, (near) uniform rate of sound decay within an octave-band, high echo density, and an absence of flutter echos. 5.2 REQUIREMENTS Based on a set of requirements suggested by Schroeder [55], the following requirements must be satisfied by a new octave-band reverberator: 1. Flat frequency response to full-spectrum white noise; 2. Normal [resonant] modes must overlap and cover the audio frequency range of interest; 3. Reverberation times of the individual modes within an octave band must be equal or nearly equal so that different octave-band frequency components of the sound decay with equal or nearly equal rates; 4. High echo density early in the impulse response such that individual echos cannot be resolved by the ear; 5. Echo response free from periodicities (flutter echos); 6. Amplitude-frequency response free from periodicities. Chapter 5. Design of an Improved Reverberator 43 The first requirement, a flat frequency response to broadband white noise, if satisfied, would indicate an absence of ringing modes. It is unlikely that a ringing mode, the source of coloration in the processed signal, would go unnoticed i n a random signal of sufficient length. The second requirement, adequate coverage of the audio frequency range of interest, is also easily verified with white noise. The R T plot, introduced in Section 3.6, shows whether or not the third requirement is met. The fourth requirement is a test related to the Haas effect [16], and is determined by inspection of the impulse response, or using a reverb-print (see Section 3.8). The Haas effect is the inability of the human ear to differentiate two sounds separated by 50 ms or less, unless the second sound is several d B louder than the first. Some debate remains as to the actual minimum amount of time that must separate the two sounds - other reported values are 62, 80, and 100 ms. Flutter echos are best identified with the reverb-print. The degree to which the sixth and last requirement, an amplitude-frequency response free from periodicities, is satisfied, can be determined by inspection of the transfer function. The transfer function is the Fast Fourier Transform ( F F T ) of the impulse response. 5.3 DESIGNS A l l of the designs presented in this thesis are variations of the same basic idea - the input signal is separated into octave bands, the desired reverberation in each band is added, and the component signals are then recombined to form the output signal. Various techniques are available to construct bandpass filters with octave passbands as specified in Table A . l . However, digital filter design is well beyond the scope of this work - the interested reader is directed to any introductory D S P text [25, 42, 44]. Three different sets of bandpass filters were tried: single rate Butterworth bandpass niters, multirate Butterworth bandpass niters, and elliptic bandpass filters. Frequencies outside the range defined by the seven octave frequency bands from 125 Hz to 8000 Hz are ignored. The desired reverberation in each frequency band is added with a reverberator. Of the various filters presented in the last chapter, a cascade of five allpass filters, with parameters based on the SchroederLogan reverberator in Section 4.3.2, was chosen. The Schroeder-Logan reverberator is simple, allpass, and gave accurate measured reverberation times. The reverberator has the same gain parameters as those listed i n Table 4.3. The desired reverberation time determines the (largest) delay of the first allpass filter. A l l subsequent allpass filters have delays that are fractions of the delay of the first allpass filter, by the ratios obtained from the delays found in Table 4.3. To minimize the number of ringing modes, the actual delay i n terms of samples, for all five allpass filters was adjusted to the closest prime number [5]. For example, to obtain a desired reverberation time of 2 seconds at a sampling rate of 44.1 kHz, the first allpass filter will had a delay of 100 ms, as calculated by Equation 4.10, for a given gain of 0.7. The 100 ms delay is equivalent to 4410 samples, which is Chapter 5. Design of an Improved Reverberator 44 adjusted to the closest prime number of 4409. Similarly, the second allpass filter was set to have a delay of 68 ms, or 0.068 • 44100 = 2999 samples, is already a prime number, and so on. The seven component bands are summed to form the final output signal. 125 Hz BPF ALLPASS 250 Hz BPF ALLPASS ALLPASS Allpass Filter ALLPASS INPUT • 1 kHz BPF 2 kHz BPF OUTPUT ALLPASS ALLPASS ALLPASS Figure 5.1: Single rate reverberator design used for the B O B reverberator. Three designs based on this basic algorithm were proposed. These are: 1. Butterworth Octave B a n d (BOB) reverberator; 2. M u l t i r a t e B u t t e r w o r t h Octave B a n d ( M r B O B ) reverberator; 3. M u l t i r a t e E l l i p t i c Bandpass ( M r E B ) reverberator. The single sampling rate design, used in the B O B reverberator, is shown in Figure 5.1. The two multirate systems are of the form shown in Figure 5.2. In the latter design, there are only 4 distinct bandpass filters - the multirate bandpass filter is used to separate the signal into the four lowest octave bands. The M r B O B reverberator uses the same 1 kHz, 2 kHz, 4 kHz, and 8 k H z octave-band Butterworth filters as used by the B O B reverberator. The 1 kHz filter is used as the multirate filter for the 125 Hz to 500 Hz octave-bands. The M r E B reverberator replaces the 6 th order Butterworth filters with elliptic bandpass filters. The filter specifications for the multirate elliptic bandpass filters are found in Appendix C.3. The two-step decimation process, used in the multirate design, consists of first applying a lowpass anti-aliasing filter, followed by downsampling by a factor of two. The specifications for the lowpass filter are found in Appendix C . l . Interpolation is the reverse of decimation - a lowpass filter is applied after a special interpolation filter. The specifications for the interpolation filters can be found in the documentation for the M A T L A B Signal Processing Toolbox [37]. The following five items were used to test the octave-band reverberator prototypes: 1. The impulse response obtained with the test-case octave-band reverberation times. The test-case reverberation times are the average of the R T o and RT30 values obtained with the M L S S A system 2 Chapter 5. Design of an Improved Reverberator ALLPASS | Multirate Filter Allpass Filter LP * 2 Decimation • 2 LP Interpolation 45 I LP 12 LP »2 1 125 Hz BPF 250 Hz BPF LP »2 INPUT • 2 kHz BPF ALLPASS 4 kHz BPF ALLPASS 8 kHz BPF ALLPASS Figure 5.2: Multirate reverberator design, with staged decimation and staged interpolation, for the 125 Hz to 500 Hz octave bands, used in the M r B O B and M r E B reverberators. The multirate bandpass filter is used to filter out the 125 Hz to 1 kHz octave bands. for the Geography 200 classroom (listed in Table 3.3). These values are repeated in Table 5.1. The plot of the impulse response was used to verify the fourth requirement, listed in Section 5.2; 2. The E D R , discussed in Section 3.6, was computed and plotted in both two-dimensional and threedimensional views, and was used to determine if the second and third requirements are satisfied; 3. The R T plot, also defined in Section 3.6, shows the spectral dependence of the reverberation times. The octave-band R T reverberation times were found and compared with the test case reverberation times to gauge the accuracy of the design; 4. A reverb-print is presented to graphically show the echo density, and the possible presence of ringing modes, or coloration, and flutter echos; 5. The transfer function, or the F F T of the impulse response. Chapter Octave Band T60 5. 46 Design of an Improved Reverberator 125 250 500 1000 2000 4000 0.498 0 509 0.614 0.767 0.794 0.752 8000 0.613 Table 5.1: Test case reverberation times 5.3.1 BUTTERWORTH OCTAVE BAND REVERBERATOR The Butterworth Octave Band reverberator is little more than a straight-forward application of the same octave-band filters as defined by the ANSI standard [1]. The impulse response, for the test-case reverberation times, is shown in Figure 5.3. The exponential decay of the impulse response is evident, and the start of the signal shows a rapid build-up of dense reverberation - two hallmarks of a good diffuse reverberator. The EDR plots are graphed in Figures 5.4 and 5.5. The gradual decay of the signal for frequencies above the upper limit of the 8 kHz octave band, at time t = 0, is a consequence of the wide upper transition band of the 8 kHz Butterworth filter. The RT plot is shown in Figure 5.8. A spike is visible at an approximate frequency of 2346 Hz that is not present in the RT plot of the impulse response obtained with the MLSSA system for GEOG 200 / (see Figure 3.8). The cause of the spike is unknown. The RT reverberation times are listed in Table 5.2. As expected, there is close agreement with the test case reverberation times. Octave Band 125 250 500 1000 2000 4000 Test case T o 0 498 0 509 0 614 0.767 0.794 0.752 0.613 RT 0 534 0 548 0 630 0.776 0.827 0.747 0.620 6 8000 Table 5.2: RT reverberation times of the impulse response for the BOB reverberator (test case). The response to broadband white noise is shown in Figure 5.6. Frequencies less than 20 Hz are attenuated by more than 40 dB, and the gradual attenuation of frequencies above 11000 Hz is a consequence of the broad upper transition band of the 8 kHz filter. The reverb-print of the test-case impulse response is found in Figure 5.7. Small amounts of ringing are visible as horizontal streaks throughout the entire audio range of interest. The frequencies at which this occurs can also been seen in the EDR plots. However, the coloration cannot be heard in the processed audio signal. The transfer function is graphed in Figure 5.9. Although there are random spikes from about 100 Hz to about 11000 Hz, located primarily between adjacent octave-bands, the upper bound of the signal is essentially constant. The cause of the spikes is unknown. Chapter 1 0.051 -0.05 -0.05 1 1 1 1 0 5. 0.05 Design of an Improved 1 1 0.1 1 1 0.15 47 Reverberator r 1 1 0.2 1 0.25 1 0.3 1 0.35 0.4 1— 0.45 Time [s] Figure 5.3: Impulse response of the B O B reverberator (test case). Figure 5.4: 3D E D R plot of the impulse response of the B O B reverberator (test case). Figure 5.5: 2D E D R plot of the impulse response of the B O B reverberator (test case). Chapter 48 5. Design of an Improved Reverberator 10° 10 10 1 10 2 10* 3 Frequency [Hz] Figure 5.6: Response of the BOB reverberator to broad-band white noise. i 1 1 1 1 1 1 r Time [s] Figure 5.7: Reverb-print of the impulse response of the BOB reverberator (test case). Chapter 5. Design of an Improved Reverberator 10 10 2 49 10" 3 Frequency [Hz] Figure 5.8: RT plot of the impulse response of the BOB reverberator (test case). 20 - 0 m •0 a; -20 c |-40 tD UL -60 -80 1C" 3 10 10 ' _2 _ Normalized Frequency Figure 5.9: Transfer function of the BOB reverberator (test case). 1 Chapter 5.3.2 50 5. Design of an Improved Reverberator MULTIRATE O C T A V E B A N D R E V E R B E R A T O R The Multirate Butterworth Octave Band reverberator is the B O B reverberator refactored to use a multirate approach to reduce the number of computations required in the four lower octave bands. The overall design is illustrated in Figure 5.2. The specifications for the multirate Butterworth bandpass filter are found in Appendix C.2. The 1 kHz to 8 kHz filters are defined in the A N S I standard [1], and are identical to the filters used i n the B O B reverberator. The impulse response, for the test-case reverberation times, is shown in Figure 5.10. The E D R plots are graphed in Figures 5.11 and 5.12. The R T plot is visible i n Figure 5.13, and the measured R T reverberation times are listed in Table 5.3. The response to broadband white noise is shown in Figure 5.14. The reverb-print of the test-case impulse response is found in'Figure 5.15. The transfer function is graphed in Figure 5.16. Since the 2 kHz to 8 kHz niters are the same as those used i n the B O B reverberator, the results obtained with the multirate reverberator are virtually identical to those obtained with the single rate design. There are very minor differences i n the lower frequency bands but, for all pratical purposes, the reverberators are identical. The only appreciable difference is faster processing by a factor of 1.3. Octave Band 125 250 500 1000 2000 4000 8000 Test case T o 0 498 0 509 0 614 0.767 0.794 0.752 0.613 RT 0 514 0 542 0 643 0.773 0.827 0.747 0.620 6 Table 5.3: R T reverberation times of the impulse response for the M r B O B reverberator (test case). Figure 5.10: Impulse response of the M r B O B reverberator (test case). Chapter 5. Design of an Improved Reverberator 51 Figure 5.12: 2D E D R plot of the impulse response of the MrBOB reverberator (test case). 10 2 10 3 ID 4 Frequency [Hz] Figure 5.13: RT plot of the impulse response of the MrBOB reverberator (test case). 52 Chapter 5. Design of an Improved Reverberator Frequency [Hz] Figure 5.14: Response of the MrBOB reverberator to broad-band white noise. i 0 0.2 0.4 0.6 1 0.8 1 1 1 r 1 1.2 1.4 1.6 Time [s] Figure 5.15: Reverb-print of the impulse response of the MrBOB reverberator (test case). T \. Y ;. i io" - J Normalized Frequency Figure 5.16: Transfer function of the MrBOB reverberator (test case). Chapter 5.3.3 5. Design of an Improved 53 Reverberator M U L T I R A T E E L L I P T I C BANDPASS R E V E R B E R A T O R In the third and final prototype developed, the Multirate Elliptic Bandpass reverberator replaces the Butterworth filters elliptic bandpass filters. The elliptic bandpass filters are designed to have narrow transition bands, a minimum stopband attenuation of 30 d B , and a maximum of 0.05 d B ripple in the passband. The specifications for the filters are found in Appendix C.3. A single rate design is not possible, since it is impossible to design elliptic bandpass filters with these specifications for the lower octave frequency bands. The impulse response, obtained for the test-case reverberation times, is shown i n Figure 5.17. A s in the B O B and M r B O B reverberators, it shows a rapid buildup of diffuse reverberation and exhibits well-defined exponential decay. The E D R plots are graphed in Figures 5.18 and 5.19. The sharp upper transition band of the 8 kHz filter can easily be seen. The signal above 11360 Hz is the sum of the spectral leakages from each of the filters. The R T plot is shown in Figure 5.22. The uniform reverberation times within an octave band, most visible in the 8 kHz band, are a consequence of the flat passband. The measured R T reverberation times are listed in Table 5.4. There is close agreement with the test-case reverberation times. Octave 125 Test case T o RT 6 250 500 Band 1000 2000 4000 8000 0 498 0 509 0 614 0.767 0.794 0.752 0.613 0 517 0 536 0 630 0.772 0.799 0.746 0.594 Table 5.4: R T reverberation times of the impulse response for the M r E B reverberator (test case). The response to broadband white noise is shown in Figure 5.20. The sharp transition bands are visible for the 125 Hz and 8 k H z filters, on the left and right edges, respectively. The response is uniform over the audio range of interest. The reverb-print of the test-case impulse response is found in Figure 5.21. The sharp transition band of the 8 kHz filter is clearly visible, as is the flat frequency response of the 4 kHz and 8 kHz bands. The transfer function is graphed i n Figure 5.23. As expected, there is a flat frequency response within each octave band. The response between octave bands, although non-uniform, is bounded. Chapter 5. 51 Design of an Improved Reverberator Figure 5.17: Impulse response of the MrEB reverberator (test case). Figure 5.18: 3D E D R plot of the impulse response of the MrEB reverberator (test case). JJ - ! ^ 0.186 0.372 0.557 -syyy^S i 0 2756.3 5512.5 8268.8 _ 1 1 1 1 11025 13781.3 16537.5 19293.8 - Frequency [Hz] Figure 5.19: 2D E D R plot of the impulse response of the MrEB reverberator (test case). Chapter 5. Design of an Improved Reverberator Frequency [Hz] Figure 5.20: Response of the MrEB reverberator to broad-band white noise. Time [s] Figure 5.21: Reverb-print of the impulse response of the MrEB reverberator (test case). 55 Chapter 5. Design of an Improved 56 Reverberator 0.2 V10 10 Frequency [Hz] 2 10 3 4 Figure 5.22: RT plot of the impulse response of the MrEB reverberator (test case). ! I f; ; ...: . . |]. . . . . . f I I I 10~ 3 10" 10"' 2 Normalized Frequency Figure 5.23: Transfer function of the MrEB reverberator (test case). ;- Chapter 5.4 5. Design of an Improved 57 Reverberator COMPARISON A N D ANALYSIS Three prototypes, the B O B , M r B O B , and M r E B reverberators, were designed and tested as described above. Let us now compare their performances. The measured R T reverberation times for the B O B , M r B O B , and M r E B reverberators are repeated in Table 5.5. For each prototype, the difference between the test-case reverberation time and the measured time in each octave band are shown. A summary of the differences in the octave-band reverberation times, and the relative processing rates, are found in Table 5.6. W i t h regards to ctave-band reverberation time accuracy, the reverberators are considered identical. The multirate designs, however, execute 35 % faster than the single rate design. Octave 125 Test case 500 Band 1000 2000 4000 8000 T60 0 498 0 509 0 614 0 767 0 794 0 752 0 613 BOB 0 534 0 548 0 630 0 776 0 827 0 747 0 620 Difference 0 036 0 039 0 016 0 009 0 033 -0 004 0 007 MrBOB 0 514 0 542 0 643 0 773 0 827 0 747 0 620 Difference 0 016 0 033 0 029 0 006 0 033 -0 005 0 007 MrEB 0 517 0 536 0 630 0 772 0 799 0 746 0 594 Difference 0 019 0 027 0 016 0 005 0 005 -0 006 -0 019 Reverberator Design 250 Table 5.5: Comparison of the measured reverberation times for the B O B , M r B O B , and M r E B reverberators, and the test case reverberation times. Design Relative Abs. Dev. i n RT Speed BOB MrBOB 1.0 1.346 1.364 MrEB Max 0 039 0.033 0.027 Min 0 004 0.005 0.005 Avg 0 021 0.018 0.014 Table 5.6: Performance review of the three reverberator designs. Maximum and minimum deviations in R T are measured in individual octave-bands. In order to compare the characteristics of the filter banks, the allpass filters were removed and the impulse responses and the corresponding transfer functions were found. The impulse responses for the filter banks used i n the B O B , M r B O B , and M r E B reverberators are shown i n Figures 5.24, 5.25, and 5.26, respectively. The impulse responses for the B O B and M r B O B reverberators are nearly identical, and so are the transfer functions, shown in Figures 5.27 and 5.28. The transfer function for the M r E B reverberator, plotted in Figure 5.29, shows flat frequency responses within each octave band, but exhibits cusp-like features i n the overlapping transition bands of adjacent filters. The impulse response for theM r E B (Figure 5.26) is more irregular, as a consequence. The effect of interpolation on artificial reverberation, was left unchecked, until now. Staged decimation and staged interpolation are used in the multirate reverberation design, illustrated in Figure 5.2. Chapter 5. Design of an Improved 58 Reverberator Decimation poses no problem as long as the lowpass anti-aliasing filter has a reasonable passband ripple, and a suitable cutoff frequency. The lowpass filter developed for the multirate rate is acceptable, as evidenced by the impulse responses of the non-reverberant filterbanks. Figure 5.24: Impulse response of the Butterworth octave-band filterbank used in the BOB reverberator. Figure 5.25: Impulse response of the multirate Butterworth octave-band filterbank used in the MrBOB reverberator. -0.2 I I 1 0 - 1 I I I 2 3 4 I 5 Time [s] I 1_ i I 6 7 8 9 x 1 0 10 -3 Figure 5.26: Impulse response of the multirate elliptic octave-band filterbank used in the MrEB reverberator. Like integration, interpolation is a smoothing operation. The MATLAB interpolation routine uses the algorithm developed by Crochiere and Rabiner in 1979 [13]. For interpolation by a factor of r, the algorithm first expands the input vector by inserting r — 1 zeros between the original data values. Next, it uses a special symmetric FIR filter that allows the original data to pass through unchanged and 59 Chapter 5. Design of an Improved Reverberator interpolates the inserted points so that the mean-square errors between the interpolated points and their ideal values are minimized. Normalized Frequency Figure 5.27: Transfer function of the Butterworth octave-band filterbank used in the B O B reverberator. Normalized Frequency Figure 5.28: Transfer function of the multirate Butterworth octave-band filterbank used in the M r B O B reverberator. ! f / J i 101 10" 3 sr V / •—- i •• 10" J i i i i i I 10" Normalized Frequency ' i 1 1 i , . • •• I 10° Figure 5.29: Transfer function of the multirate elliptic octave-band filterbank used in the M r E B reverberator. It was found that interpolation has no appreciable effect on the artificial reverberation obtained with the cascaded allpass section. For example, the 125 Hz octave-band filter is applied to a decimated signal downsampled by a factor of 8 in the multirate design. The interpolated signal, and the equivalent undecimated/uninterpolated signal, are shown in Figure 5.30. Chapter 5. Design of an Improved Reverberator i 0 i 0.1 i 0.2 i 0.3 i 0.4 Time [s] i 0.5 i 0.6 60 i 0.7 l Figure 5.30: Non-interpolated (top) and interpolated (bottom) reverberation from a cascade of five allpass filters applied to the impulse response of the 125 Hz Butterworth octave band filter. The reverberation time is 0.5 s, and the decimation/interpolation factor is 8. 5.4.1 N O N - I N T E R P O L A T E D M U L T I R A T E B U T T E R W O R T H O C T A V E B A N D R E V E R B E R A T O R To avoid the interpolation of the superimposed reverberation in the lowest four octave-bands in the multirate design, the decimated signals were interpolated back up to the original sampling frequency before reverberation was added with the cascade allpass section. The schematics for the multirate reverberator section using staged and non-staged decimation are shown in Figure 5.31 and Figure 5.32, respectively. The effective results of these designs are virtually identical to that of the MrBOB reverberator, but with increased execution times. The computational overhead of decimation and interpolation offsets the computational gain of filtering the decimated octave-band signals. The staged decimation design executes at a relative execution rate of 0.985, and the non-staged decimation design has a relative rate of 0.964. The only advantage of these two designs is that the effective width of the transition bands of the multirate filter has been reduced in the 125 Hz to 500 Hz octave bands. The difference between a signal with added reverberation, and a decimated signal with added reverberation that is later interpolated back up to the initial sampling rate, was minor. The rates of Chapter ALLPASS 5. Design of an Improved Reverberator 61 Allpass Filter LP * n Decimation t n LP Interpolation Multirate Filter 125 Hz BPF LP »2 LP *2 LP ALLPASS • 4 LP 250 Hz BPF *2 ALLPASS ALLPASS 1 kHz BPF <H ALLPASS Figure 5.31: Multirate reverberator section with with staged decimation and single stage interpolation before reverberation. ALLPASS Allpass Filter LP In Decimation tn LP Interpolation Multirate Filter I 1 LP *8 125 Hz BPF • 8 LP ALLPASS LP *4 250 Hz BPF f 4 LP ALLPASS LP *2 500 Hz BPF t2 LP ALLPASS 1 kHz BPF «H ALLPASS Figure 5.32: Multirate reverberator section with single stage decimation and single stage interpolation before reverberation. exponential decay, and the corresponding reverberation times, are essentially the same. For example, the 125 Hz octave-band filtered signal, with 0.5 second of non-iterpolated and interpolated reverberation, is shown in Figure 5.30. 5.4.2 OPTIMIZED BUTTERWORTH O C T A V E - B A N D FILTERBANK The impulse response of the Butterworth octave-band filterbank, although the best of the three filterbank designs used or developed for this research, is not optimal. Digital Butterworth filters are denned, for the most part, by two parameters: the filter order and passband width [37, 44]. A n effort was made to improve the impulse response of the filterbank as a whole, by increasing the order and/or varying the passband width. Increasing the order beyond 3 narrowed the width of both the upper and lower transition bands, but only for the higher frequency octave-band filters - the 125 Hz octave-band filter was unstable with a filter order of 4 or more. The 250 Hz and 500 Hz filters were unstable at orders of 5 or more. Decreasing the passband width reduced the overlap between adjacent filters, and reduced the amplitude response of the filter bank as a whole. A single parameter, e, was introduced to vary the Chapter 5. Design of an Improved Reverberator 62 passband width of each filter simultaneously. The lower and upper frequency limits were adjusted as follows: / ; «— 1 / e / z and / „ <- ef . u A single variable numerical optimization method was applied to minimize the total deviation from unity of the amplitude-frequency response of the filterbank from 88 H z to 11360 Hz. The optimal value of e was found to 0.94213. The amplitude-frequency response of the optimized octave-band filterbank is plotted in Figure 5.33. The impulse response of the optimized filterbank is shown in Figure 5.34. Since it was virtually identical to the impulse response of the un-optimized filterbank, shown in Figure 5.24, this approach was not investigated further. 1.5 n \ /; / ~ \ v. - — ' / ~ \ *\ > II tl 1 0.5 It ™\\Jif V i V'/ W \ / • rf V\ iK\ >/\\ II 11 Q ty 1 10" 3 ' \ /J — \ y \ ' - 10" \ U\ Id ij \\ / 7 wf ll \\ •• yM/f N :\ wf \\i V W if, A LX / \ ' //\\ 7 'inaliii-r^friii X A* •I n \\ \\ v. ^-'^trTri 10" 2 1 Normalized Frequency Figure 5.33: Amplitude-frequency response of the 125 Hz to 8000 Hz Butterworth octave-band filters. The dashed lines are the amplitude-frequency responses of the Butterworth octave-band filters as defined in the A N S I standard [1]. The heavy dashed line is the amplitude-frequency of the sum of all seven standard filters. The solid lines (light) are the amplitude-frequency responses of the optimized filters, whereas the heavy solid line is the amplitude-frequency response of the sum of the seven optimized Butterworth filters. Figure 5.34: Impulse response of the optimized Butterworth octave-band filterbank (test case). Chapter 5. Design of an Improved Reverberator 5.5 63 SUMMARY Three designs for an octave-band reverberator were presented in this chapter. In all three designs, the output signal is formed as the sum the output of an octave-band filterbank applied to the input signal after reverberation is imparted with a cascade of 5 allpass filters in each subband. In the Butterworth Octave Band reverberator, the Butterworth octave-band niters, as defined in the A N S I standard, formed the filterbank. The Multirate Butterworth Octave Band reverberator replaced the four distinct 125 Hz to 1000 Hz filters with a multirate filter implemented with staged decimation and staged interpolation. The third and last design, the Multirate Elliptic Bandpass reverberator replaced the Butterworth niters with elliptic bandpass filters. A multirate approach was used to filter the lowest four octave bands identical to that used in the M r B O B design. Interpolation of artificial reverberation, either staged or non-staged, was found to have no practical difference on the output signal. The prototypes satisfied the design objective of accurate reverberation times from 0 to 2 seconds specified in independent octave frequency bands from 125 Hz to 8000 Hz. The maximum deviation in any octave-band reverberation time of any of the three designs was found to be 0.039 s, a relative error of 7.8%. The multirate reverberator designs exhibited slightly better accuracy than that of the single rate reverberator. The average processing time of the multirate designs was found to be 75 % of the single rate design. The reverberators were found to have high echo density, flat frequency response from 88 Hz to 11360 Hz, and an absence of flutter echos and coloration. The artificial reverberation sounded realistic in every listening test, performed on a variety of audio signals. Any one of the three designs developed in this thesis would make an excellent artificial diffuse reverberator. The B O B reverberator was chosen as the final design, because of its simplicity. The details of the Microsoft Windows implementation are presented in the next chapter. Chapter 6. Implementation 64 CHAPTER 6 IMPLEMENTATION The Microsoft Windows implementation of the B O B reverberator is almost trivial. B y design, it operates on a single 16-bit mono wave file sampled at a rate of 44.1 kHz. The entire reverberator, including the routines to read and write audio wave files, is contained within a single 15 K B D L L . 6.1 APPLICATION PROGRAMMING INTERFACE The reverberator D L L exports a single function with the following prototype: SR_API BOOL srProcess(HANDLE h e a p , PSSRT s s r t ) ; where the structure SSRT is defined as: typedef s t r u c t SSrT i TCHAR infile[MAX_FILE_NAME_LEN] ; TCHAR outfile[MAX_FILE_NAME_LEN]; float RT60_00125; float RT60_00250; float RT60_00500; float RT60_01000; float RT60_02000; float RT60_04000; float RT60_08000; } SSRT, * PSSRT; The caller is responsible for providing a handle to a heap of sufficient size. For buffers of 16 384 points, a heap of 5.5 M B is required. 6.2 D E V E L O P M E N T PLATFORM AU work was performed on a 400MHz Dual P I I P C with the following: • Windows N T 4.0 SP6a • Borland C++ 5.02 • Microsoft Visual C++ 6.0 with V S SP5 • M A T L A B 6.0.0.88 Release 12 • M A T L A B Signal Processing Toolbox (Revision: .1.12 Date: 2000/08/10) Chapter 6. Implementation 65 The Microsoft Visual C++ 6.0 compiler was used to develop and debug the source code. The Borland C++ 5.02 compiler was used to create a binary compatible DLL for use with the 6.3 IMPLEMENTATION ClassTalk executable. DETAILS A review of the current audio-processing software development kits (SDK) for the Microsoft Windows family of operating systems was undertaken. The details are found in Appendix D. The SDKs reviewed are not available for every version of Microsoft Windows, and not every sound card supports every feature of these SDKs, or conforms to common standards. In order to support as many versions of Microsoft Windows, and the largest number of audio cards possible, the Microsoft Windows Multimedia (MM) API [38] was used. The MM API was available in 1996, and perhaps earlier, and is still supported by Microsoft. The MM API is used to read and write wave files. The wave file to be processed is read into double-precision floating point buffers allocated from the application-supplied heap. Run-time memory operations are avoided, as an efficient double-buffer management scheme was used to maintain continuity across buffer boundaries with no run-time memory management overhead. The digital filters are applied by direct convolution with pointers. 6.4 T E S T PROCEDURES Output wave files created by the reverberator were tested with MATLAB. Close agreement is expected with the results obtained from the prototype, with the exception of the effects of truncation to signed 16-bit quantities. Extensive stability testing was also performed. 6.5 RESULTS The impulse response wave file, created with the test-case reverberation times, is shown in Figure 6.1. It is virtually identical to the impulse response of the prototype graphed in Figure 5.3. The effects of 16-bit quantization are visible in the EDR plots, and in the reverb-print. The EDR plots, Figures 6.2 and 6.3, show an elevated noise floor for times slightly beyond the maximum octaveband reverberation time of about 0.8 s. Beyond the maximum reverberation time, the audio signal has decayed to less than 2 - 1 6 , approximately 1.53 • 10 , and is rounded down to zero. This is also clearly -5 shown in a reverb-print, presented in Figure 6.6. Figure 6.4 shows the RT plot. It contains more spikes, and more variance, than the RT plot for the MATLAB prototype shown in Figure 5.8. The response of the reverberator to broad-band white noise is shown in Figure 6.5. Comparison with Figure 5.6 shows slightly more high-frequency noise. Chapter 6. Implementation 66 The R T times are listed in Table 6.1; they differ from those for the prototype. However, the maximum deviation is less 0.1 s and is acceptable. Additional testing is required to determine if the amount of deviation is random, or if it is consistent within each octave-band, in which case a correction formula might be found. Octave 125 Test case T6o Prototype RT Implementation Difference 250 Band 500 1000 2000 4000 8000 0 498 0 509 0 614 0.767 0.794 0.752 0.613 0 534 0 548 0 630 0.776 0.827 0.747 0.620 0 572 0 556 0 567 0.857 0.838 0.751 0.616 0 074 0 047 -0 047 0.090 0.044 -0.001 0.003 Table 6.1: R T reverberation times of the impulse response for the Microsoft Windows implementation of the B O B reverberator (test case). Performance is adequate: a 7.82 M B file is processed in 68.9 seconds, for a processing rate of 0.29 K B / ( M H z - s ) . Listening tests were performed for reverberation times up to 2 seconds, and the reverberation sounded realistic, in every instance. 0.051 -0.05 1 i 1 1 0 0.05 0.1 0.15 1 r 0.2 0.25 Time [s] 0.3 0.35 0.4 Figure 6.1: Impulse response of the reverberator (test case). 0.45 Chapter 6. Implementation 1.672 07 Frequency [Hz] Time [s] Figure 6.2: 3D EDR plot of an impulse response of the reverberator. 2756.3 11025 Frequency [Hz] 16537.5 19293.8 Figure 6.3: 2D EDR plot of an impulse response of the reverberator. 10 Frequency [Hz] Figure 6.4: RT plot for the impulse response of the reverberator (test case) Chapter 6. Implementation Figure 6.5: Response of the reverberator to broad-band white noise. T~ T - i — — r 2h Time [s] Figure 6.6: Reverb-print of the impulse response (test case). 68 Chapter 7. Conclusion and Future Work 69 CHAPTER 7 CONCLUSION AND F U T U R E W O R K The objective of the research reported here was to develop a software reverberator capable of accurately adding reverberation to digital audio signals, with desired reverberation times from 0 to 2 seconds specified for individual octave frequency bands from 125 Hz to 8000 Hz. The Butterworth Octave Band reverberator, created here, achieved the design requirements. The reverberation sounds realistic, and the octave-band reverberation is clearly distinguishable. The reverberator was tested, in part, by measuring the reverberation times of the impulse responses generated with specified octave-band reverberation times. The E D R was used to measure frequencydependent reverberation times, and used a noise-reduction algorithm and a unique, rationalized reverberation time measurement algorithm developed by the author. The Microsoft Windows implementation of the B O B reverberator is reasonably fast, with a processing rate of 0.29 K B / ( M H z s ) on 16-bit mono wave files recorded at a sampling rate of 44.1 kHz. On a 400 M H z P C , this translates to an effective rate of about twice the playback speed of an unprocessed audio file, demonstrating artificial octave-band reverberation can be performed in real-time. The reverberator is contained entirely within a single 15 K B D L L . Potential applications of the B O B reverberator include multimedia applications, games, virtual-reality simulations, and the testing of speech intelligibility in simulated acoustical environments (eg in ClassTalk). Future work should include making the following suggested improvements to the reverberation-time algorithm, and improvements to the design and Microsoft Windows implementation of the B O B reverberator. Reverberation time algorithm: 1. Refinement of the E D R and R T algorithms, and in-depth comparison with the results obtained with other software packages; 2. Use of weighting in the straight-line approximation to the linear portion of a decay curve in the iterative reverberation-time algorithm, since impulse responses decay in magnitude with increasing time. Design improvements: 1 1. Investigation of the suitability of higher-order Butterworth filters for the higher frequency octave bands; Chapter 7. Conclusion and Future Work 70 2. Determination of the effect of a lowpass filter to attenuate frequencies above 12 kHz in the reverberator output; 3. Explore the usefulness of lowpass filtering to preserve the input signal below the lower frequency limit of 88 Hz defined for the 125 Hz band, and highpass filtering to preserve the high frequency content above 11360 Hz, the upper frequency limit of the 8 k H z octave band; 4. Use of nested allpass filters in each octave frequency band for increased echo density - if an associated formula for reverberation time can be found; 5. Investigation of a design that uses Gardner's efficient convolution technique to add frequencydependent reverberation with a synthetic impulse response generated by the method suggested by Moorer; 6. Investigation of a design based on a N-level binary tree structured quadrature mirror filter ( Q M F ) filter bank [57, 59]; 7. Investigation of a reverberator design based on a multicomplementary 8-band audio equalizer by Zoler [61]. Microsoft Windows implementation: 1. Refactoring to take advantage of Intel M M X and S I M D extensions with the Intel I P P library [26]; 2. Refactoring as a DirectX C O M object to allow realtime "streaming with minimal input/output delay; 3. Extending the existing implementation to support stereo wave file, different sampling rates, and different file formats; 4. Using f l o a t or i n t 3 2 data types for internal calculations, instead of the double data type, if accuracy is maintained; 5. Refactoring to use the faster multirate design. Bibliography 71 BIBLIOGRAPHY [1] Ansi si.1-1986 (asa 65-1986): Specifications for octave-band and fractional-octave-band analog and digital filters, 1993. [2] A . A . R . Aljudi and M . A . H . Abdul-Karim. Digital reverberation time meter. J. Audio Eng. Soc, 34(9):661-663, Sep 1986. [3] R. Ansari and B . L i u . Multirate signal processing. In S.K. M i t r a and J . F . Kaiser, editors, Handbook For Digital Signal Processing. John Wiley & Sons, New York, 1993. [4] F . A . Beltran, J . R . Beltran, J . Arregui, and B . Gracia. A real-time dsp-based reverberation system with computer interface. [5] W . H . Beyer. Standard Mathematical Tables. C R C Pres, Inc., West Palm Beach, Florida, twenty-four edition, 1976. [6] K . Bodlund. O n the use of the integrated impulse response method for laboratory reverberation measurements. J. Sound Vibration, 56(3):341-362, 1978. [7] J . Boer. Game Audio Programming. Charles River Media, Hingham, Massachusetts, 2003. [8] O. Cappe and J . Laroche. Evaluation of short-time spectral attenuation techniques for the restoration of musical recordings. IEEE [9] L . Cerveau. Trans. Speech Audio Processing, 3(l):84-93, Jan 1995. Couplage temps rel d'outils d'acoustique prvisionnelle et de dispositif d'auralisation. P h D thesis, University of Paris, 1999. [10] W . T . Chu. Comparison of reverberation measurements using schroeder's impulse method and decaycurve averaging method. J. Acoust. Soc. Am., 63(5): 1444-1450, 1978. [11] L . Cohen. Time-frequency distributions - a review. Proc. IEEE, 77(7):941-981, J u l 1989. [12] Creative Technology Limited. Creative, Environmental Audio Extensions: EAX 2.0, 1999. [13] R . E . Crochiere and L . R . Rabiner. A program for multistage decimation, interpolation and narrow band filtering. In Digital Signal Processing Committee, editor, Programs for Digital Signal Processing. I E E E Press, New York, 1979. Bibliography 72 [14] R . E . Crochiere and L . R . Rabiner. Multirate Digital Signal Processing. Prentice-Hall, New Jersey, 1983. [15] M . B . de Carvalho and E . A . B . da Silva. Subband coding of signals. In Gordana Jovanovic-Dolecek, editor, Multirate Systems: Design & Applications. Idea Group Publishing, Hershey, 2002. [16] F . A . Everest. The Master Handbook of Acoustics. Tab Books, Blue Ridge Summit, P A , 1981. [17] L . Faiget, C . Legros, and R. Ruiz. Optimization of the impulse response length: Application to noisy and highly reverberant rooms. J. Audio Eng. Soc, 46(9):741-750, Sep 1998. [18] W . G . Gardner. The virtual acoustic room. Master's thesis, Massachusetts Institute of Technology, 1992. [19] W . G . Gardner. Efficient convolution without input-output delay. J. Audio Eng. Soc, 43(3):127-135, Mar 1995. [20] W . G . Gardner. Reverberation algorithms. In M . Kahrs and K . Brandenburg, editors, Applications of Digital Signal Processing to Audio and Acoustics. Kluwer Academic Publishers, Boston, 1998. [21] D . Griesinger. Beyond mis - occupied hall measurement with fft techniques. [22] F . J . Harris. O n the use of windows for harmonic analysis with the discrete fourier transform. Proc. IEEE, 66(l):51-83, J a n 1978. [23] M . Hodgson. Empirical prediction of speech levels and reverberation i n classrooms. J. Build. Acoust, 8(1):1-14, 2001. [24] M . Hodgson, personal communication, 2003. [25] E . C . Ifeachor and B . W . Jervis. Digital Signal Processing, A Pratical Approach. Prentice-Hall, New Jersey, second edition, 2002. [26] Intel. Intel Integrated Performance Primitives for Intel Architecture, Reference Manual, Volume 1: Signal Processing, 2003. [27] ISO, Switzerland. Acoustics - Measurement of the reverberation time of rooms with reference to other acoustical parameters, second edition, J u n 1997. [28] J . M . Jot. A n analysis/synthesis approach to real-time artificial reverberation. Proc. IEEE ICASSP- 92, 2:221-224, 1992. [29] J . M . Jot. Etude et Realisation d'un Spatialisateur de sons par Modeles Physique et Perceptifs. P h D thesis, T E L E C O M Paris, Sep 1992. Bibliography 73 [30] J . M . Jot, L . Cerveau, and O. Warusfel. Analysis and synthesis of room reverberation based on a statistical time-frequency model. New York, Sep 1997. Preprint 4629. [31] J . M . Jot and A . Chaigne. Digital delay networks for designing artificial reverberators. Paris, Feb 1991. Preprint 3030 (E-2). [32] L . E . Kinsler and A . R . Frey. Foundamentals of Acoustics. John Wiley & Sons, Inc., New York, 1962. [33] H . Kuttruff. Room Acoustics. Spon Press, London, fourth edition, 2000. [34] C E . Livingstone, T . E . Base, and A . F . Hawtin. The design and testing of a "new" reverberation meter. J. Audio Eng. Soc, 30(9):614-620, Sep 1982. [35] Loki Software. OpenAL Specification and Reference, June 1999. [36] J . Marsch and C . Porschmann. Frequency dependent control of reverberation time for auditory virtual environments. Applied Acoustics, 61:189-198, 2000. [37] The Mathworks, Inc. Signal Processing Toolbox, User's Guide, Version 4-2, 1999. [38] Microsoft Corporation. MSDN Library, October 2001. [39] F . Mintzer and B . L i u . The design of optimal multirate bandpass and bandstop filters. IEEE Trans. Acoust. Speech and Signal Processing, 26(6):534-543, 1978. [40] S.K. M i t r a and J . F . Kaiser, editors. Handbook For Digital Signal Processing. John Wiley & Sons, New York, 1993. [41] J . A . Moorer. About this reverberation business. Computer Music Journal, 3(2):13-28, 1979. [42] A . V . Oppenheim and R . W . Schafer. Discrete-Time Signal Processing. Prentice-Hall, New Jersey, second edition, 1999. [43] M . R . Portnoff. Time-frequency representation of digital signals and systems based on short-time fourier analysis. IEEE Trans. Acoustics Speech Signal Processing, 28(l):55-69, Feb 1980. [44] J . G . Proakis and D . G . Manolakis. Digital Signal Processing, Principles, Algorithms, and Applications. Macmillan Publishing Company, New York, second edition, 1992. [45] L . R . Rabiner and B . Gold. Theory and Application of Digital Signal Processing. Prentice-Hall, New Jersey, 1975. [46] L . R . Rabiner and R . W . Schafer. Digital Processing of Speech Signals. Prentice-Hall, New Jersey, 1978. 74 Bibliography [47] B . Rasmussen, J . H . Rindel, and H . Henriksen. Design and measurement of short reverberation times at low frequencies in talks studios. J. Audio Eng. Soc, 39(l/2):47-57, Jan 1991. [48] P . A . Regalia, S.K. M i t r a , and P.P. Vaidyanathan. The digital all-pass filter: A versatile signal processing building block. Proc. IEEE, 76(l):19-37, Jan 1988. [49] D . D . Rife. MLSSA (Maximum-Length Sequence System Analyzer) Reference Manual, Version 10WI- 4. D R A Laboratories, 2001. [50] D . Rocchesso and J . O . Smith. Circulant and elliptic feedback delay networks for artificial reverberation. IEEE Trans. Speech and Audio Processing, 5(l):51-63, Jan 1997. [51] M . Schoenle, N . J . Fliege, and U . Zolzer. Parametric approximation of room impulse responses by multirate systems. Proc. IEEE ICASSP-93, 1:153-156, A p r 1993. [52] M . R . Schroeder. Frequency-correlation functions of frequency responses in rooms. J. Acoust. Soc. Am., 34(12):1819-1823, Dec 1962. [53] M . R . Schroeder. New method of measuring reverberation time. J. Acoust. Soc. Am., 37:409-412, 1965. [54] M . R . Schroeder. Progress in architectural acoustics and artificial reverberation: Concert hall acoustics and number theory. J. Audio Eng. Soc, 32(4): 194-203, A p r 1984. [55] M . R . Schroeder and B . F . Logan, "colorless" artificial reverberation. J. Audio Eng. Soc, 9(3):192197, J u l 1961. [56] J . Stautner and M . Puckette. Designing multichannel reverberators. Computer Music Journal, 6(l):52-65, 1982. [57] B . W . Suter. Multirate and Wavelet Signal Processing. Academic Press, New York, 1998. [58] P.P. Vaidyanathan. Multirate digital filters, filter banks, polyphase networks, and applications: A tutorial. Proc. IEEE, 78(l):56-93, Jan 1990. [59] P.P. Vaidyanathan. Multirate Systems and Filter Banks. Prentice-Hall, New Jersey, 1993. [60] J . Vanderkooy. Aspects of mis measuring systems. J. Audio Eng. Soc, 42(4):219-231, A p r 1994. [61] U . Zolzer. Digital Audio Signal Processing. John Wiley & Sons, New York, 1997. Appendix A. 75 Miscellaneous APPENDIX A MISCELLANEOUS A.l OCTAVE BANDS AND O N E THIRD OCTAVE BANDS Octave bands are proportional bands, for which the lower, /(, and upper, / „ , frequency limits are related to the center frequency, f , by / ; = 2 ~ / / m c given by BW = / „ - / ; . 2 c and / „ = 2 m / 2 / / . The frequency bandwidth, BW, is c Normalized with respect to the center frequency BW/f c constant. For octave bands, m — 1, f /fi u = 2 m / 2 - 2 ~ / is = 2, and for one-third octave bands, m = 1/3, f /fi u m = 1.26. The frequencies of the standard octave bands are found in Table A . l . /( [Hz] fc [Hz] 16 11 16 22 31.5 22 44 63 44 31.5 63 125 88 125 177 250 177 500 355 250 500 355 710 Band U [Hz] 88 1000 710 1000 1420 2000 1420 2000 2840 4000 2840 4000 5680 8000 5680 8000 11360 16000 11360 16000 22720 Table A . l : Octave frequency bands defined by lower (/;), upper ( / „ ) , and center (/ ) frequencies. c 2 Appendix B. Noise Reduction and Reverberation Time Algorithms 76 APPENDIX B N O I S E R E D U C T I O N AND R E V E R B E R A T I O N T I M E ALGORITHMS Impulse response measurements are often corrupted with noise. Noise tends to bias calculated reverberation times to higher values. The Noise Reduction Algorithm ( N R A ) developed for this thesis is based on the methods published by Cerveau [9], and is presented in Section B . l . The iterative Reverberation Time Algorithm (RTA) was used to determine the reverberation time from the slope of the early, linear portion of a decay curve. The decay curve is either an E D C , as defined in Section 3.4, or any frequency component of an E D R (see Section 3.6). The interval over which a straight-line approximation is made is repeatedly increased, as long as the re-calculated coefficient of regression increases or remains the same, for each new data point added. T h e R T A is a unique algorithm developed by the author, and is outline in Section B.2. B.l NOISE REDUCTION ALGORITHM The two-part noise reduction algorithm developed for this thesis is based on the iterative method developed by Cerveau [9]. Cerveau's algorithm is itself an extension of the method presented by Vanderkooy [60]. The average energy of the noise is estimated by averaging over a small interval of the late portion of the squared impulse response. Refering to the echogram in Figure 3.4 as an example, the late portion, which is assumed to consist entirely of gaussian noise, starts after about 0.5 s. This procedure is formally outlined in the Noise Estimation Algorithm ( N E A ) detailed below. Noise Estimation Algorithm INPUTS: (1) Time t (2) Squared impulse response h (t) (3) Time interval dt 2 1. Set p <- 0 2. Divide t into n intervals of length dt, ignore unused data beyond last block 3. For i = 1 , . . . , n 3.1 Set pi <— average of h (t) on the i 2 4. Set p <— min(pi) th interval Appendix B. Noise Reduction and Reverberation Time Algorithms 77 O U T P U T S : Minimum average noise power p For the results reported in this thesis, dt = 0.25 s. Noise Reduction Algorithm I N P U T S : (1) Time t (2) Squared impulse response h (t) (3) Time interval dt 2 1. Set i <- 0 and h {t) *- h (t) 2 2 Q 2. Setp<- N E A ( i , hl(t), dt) 3. While i < n or p > p 3.1 Remove noise 3.1.1 Set h {t) <- h (t) - p 2 2 3.1.2 If ti$(tj) < 0, set h (tj) *- 0.25p 2 3.2 Set p <—• N E A ( i , / i ( i ) , dt) 2 3.3 Set i « - i + 1 4. Set k (t) «2 O U T P U T S : Reduced-noise squared impulse response / r ( £ ) For the results reported in this thesis, n = 50 and p = 10~ B.2 REVERBERATION T I M E ALGORITHM Based on the definitions of the T20 and T30 found in Section 3.2, define the interval of reverberation regression, T , to be the interval of energy loss starting from 5 d B to x + 5 d B below the maximum value x of a decay curve. The interval of reverberation regression is shown in Figure B . l . The reverberation time is obtained from the slope, m, of the straight-line approximation on the interval of reverberation regression, by T 6 0 = -5? (B.l) m For the results reported in this thesis, the value of x is at least 10, and thus the Reverberation Time Algorithm (RTA) returns T10 at a minimum. As before, let the impulse response be denoted by h(t). For notational purposes, define f(t) to be the time-reversed integral formula to calculate the E D C given by Equation 3.2. Let D(t) represent a decay curve, calculated as D(t) = 1 0 1 o g ( / ( / i ( £ ) ) ) . Let the inverse function of 10 D be denoted D~ (z). l Although D(t) may not be strictly monotonic for a given set of numerical data, assume a unique t can be found such that \D(t) — z\ < e, for any z, given a small (reasonable) value of e. The linear regression function, used to calculate the straight-line approximation to the linear portion of a decay curve, denoted by g, is defined as (r ,m,b)^-g(x,y) 2 (B.2) Appendix B. Noise Reduction and Reverberation Time Algorithms 78 MAX -5dB -15dB nSt ^0 f1 ^2 t 2Q t t 3 t 3f Figure B.l: Illustration of the Reverberation Time Algorithm. The interval of reverberation regression, T , is defined as the interval from 5 dB to x + 5 dB below the maximum (MAX) of a decay curve. A minimum time, to, is defined to ensure the maximum value of the decay curve, occuring at time ti, is not affected by corruption at the start of the impulse response, if required. As i is increased incrementally in steps of St from i3 , a straight line is fitted to the decay curve on the interval [£2, £3]. This P s is repeated as long as the coefficient of regression remains monotonically nondecreasing. The final reverberation time, with the largest coefficient of regression, is obtained from the straight-line approximation calculated on the interval [£2, £3^. x 3 0 r o c e s where r is the coefficient of regression, m is the slope, and b is the intercept, of the straight line fitted 2 to the data vectors x and y. Several times are used in the RTA, and are formally defined below: 1. to > 0 is the minimum time limit for the maxmimum value (MAX), located at t\\ 2. t<2, is the approximate time of a point 5 dB lower than the maximum value; 3. <3 is the approximate time of a point x + 5 dB lower than the maximum value. It is the initial time-domain upper limit of the interval used for the straight-line approximation; 0 4- £3 = t + n St is the current upper limit for the time-domain interval of regression for the n** iteration of the algorithm; 1 3o 5. t3 is the final upper limit for the time-domain interval of regression, for which the largest coefficient of regression is obtained. f Appendix B. Noise Reduction and Reverberation Time Reverberation Time Algorithm I N P U T S : (1) Time t (2) Squared impulse response h (t) (3) Sampling frequency f (4) Minimum time to (5) Decimation factor d 2 s 1. Decimate t and h (t) by a factor of d 2 2. Set St <- d/f s 3. Set D(t) <- 10 log (/(/i (i))) 2 10 4. Set 2 < — max(£>(t)) for t > £ ; maximum found at t\ 0 5. If z> z .5.1 Set t <- J0 (z - 5.0) 5.2 Set t <- D~ {z - 15.0) _1 2 l 3o 5.3 Set t <- i 3 o 3 5.4 Set (r ,m,o) ^ g([t ,t ], [D(t ), .D(t )]) 5.5 Set r «- r 5.6 Set t <- t + <5i 2 2 2 3 2 3 2 3 3 5.7 Set (r ,m,6) ^ ([t ,t ],[D(i ),Z?(t )]) 5.8 If r > f , set f <— r , go to step 5.6 2 5 2 6. Set i 3 / 2 < —t O U T P U T S : (1) 2 3 2 2 3 2 3 Final time value i 3 / (2) Slope of the straight-line approximation m For the results reported in this thesis, z — -40 dB, and to = 0 . Algorithms 79 Appendix B. Noise Reduction and Reverberation Time Algorithms B.3 80 NOISE REDUCTION AND REVERBERATION T I M E ALGORITHMS APPLIED TO T H E E D C As an example of the effectiveness of N R A and R T A for reverberation-time estimates, both algorithms will be applied to the 1 kHz octave-band filtered impulse response of G E O G 200. The E D C , with and without noise reduction, is shown in Figures B.2 and B.3. The initial linear portion of the curve, on which the reverberation time is calculated, has increased with noise reduction (lower curves). Figure B.2: E D C s of the 1000 Hz octave-band filtered impulse response of G E O G 200. The upper curve is the E D C without noise reduction. The lower curve is the E D C calculated after application of the noise reduction algorithm. 0 0.1 0.2 0.3 0.4 0.5 Time [s] 0.6 0.7 0.8 0.9 1 Figure B.3: E D C s of the 1000 Hz octave-band filtered impulse response of G E O G 200 normalized to 0 dB at t = 0. The upper curve is the E D C without noise reduction, and is linear over a drop of 15 d B . The lower curve is the E D C calculated after application of the noise-reduction algorithm. The linear portion has been extended to a drop of 40 d B in the decay curve - an improvement of almost 270 %. Appendix B. Noise Reduction and Reverberation Time Algorithms 81 Figure B.4: The coefficient of regression (top and center (large scale)) and the reverberation regression interval (bottom) used in determining the reverberation time, as functions of time, for the 1000 Hz octave-band filtered impulse response of G E O G 200. The maximum of 0.99882 for the coefficient of regression is obtained at a time of 0.518 s. The corresponding interval of reverberation regression is found to be 34.575 d B . The coefficient of regression, r , and the interval of reverberation regression, T , are shown i n Figure 2 x B.4. The coefficient of regression achieves a maximum value of 0.99882 at a time of 0.518 s, with a corresponding T of 34.6 d B . The upper time limit, can in fact, be estimated from the echogram (see x Figure 3.4). The slope of the straight-line approximation is found to be 78.1, from which the reverberation time of 0.768 is obtained. This value is in very close agreement with the value of 0.767 listed in Table 3.3. Appendix B.4 B. Noise Reduction and Reverberation Time Algorithms 82 NOISE REDUCTION AND REVERBERATION T I M E ALGORITHMS APPLIED TO T H E E D R As in the case of an E D C calculated for a (bandpass filtered) impulse response, the linear portions of the E D R are significantly improved when noise reduction is used. The E D R plot for an impulse response measured i n G E O G 200 without noise reduction is graphed in Figure B.5. The corresponding two-dimensional E D R plot is shown Figure B.6. The E D R plots for the impulse response with noise reduction are graphed in Figures B.7 and B.8. Clearly, the initial linear portions of most frequency components have been extended. Plots of the maximum coefficient of regression, r , for each frequency component of an E D R without 2 and with noise-reduction are visible in Figure B.9 and Figure B.10, respectively. A s expected, the variability is reduced and the maximum coefficient of regression is pushed closer to unity. The interval of reverberation regression, T , is increased, in some cases substantially, after application x of the noise reduction algorithm. A plot of T against / for the E D R of G E O G 200 without noise reduction x is visible in Figure B . l l . The effect of the noise reduction algorithm is shown in Figure B.12. The average T x has increased from about 15 d B to approximately 25 d B . The R T plots, without and with noise reduction, are graphed in Figures B.13 and B.14, respectively. The R T reverberation times, as defined in Section 3.6, are listed in Table B . l . As expected, the reverberation times are lower after application of the noise reduction algorithm, and are closer to the average of the RT20 and RT30 values measured by the M L S A A system shown in Table 3.3. Octave Band RT 125 250 500 1000 2000 4000 8000 Without N o i s e R e d u c t i o n 0 519 6 201 1 941 0.854 0.856 0.824 0.648 With N o i s e R e d u c t i o n 0 471 0 603 0 781 0.806 0.771 0.747 0.595 Table B . l : R T reverberation times obtained from the E D R of the impulse response for the G E O G 200 classroom. Appendix B. Noise Reduction and Reverberation Time Algorithms 1.672 83 Frequency [Hz] Time [s] Figure B.5: E D R plot of a measured impulse response of G E O G 200 without noise reduction. Minor contour lines occur every 10 d B . The major contour line indicates -60 d B . o 0.186 0.372 0.557 1 Mr^V/xr—^ / \ / , 1 2 0.743 o E 0.929 13 1.486 1.672 r'1 n. ... 1.115 . / /if.u 2756.3 !.... AAJJVA I - y ^ V : 5512.5 8268.8 11025 Frequency [Hz] 13781.3 16537.5 19293.8 Figure B.6: 2D E D R plot of a measured impulse response of G E O G 200 without noise reduction. Minor contour lines occur every 10 d B . The major contour line indicates -60 d B . Appendix B. Noise Reduction and Reverberation Time 1.672 Algorithms 84 Frequency [Hz] Time [s] Figure B.7: EDR plot of a measured impulse response of G E O G 200 with noise reduction. Minor contour lines occur every 10 dB. The major contour line indicates -60 dB. 0 2756.3 5512.5 8268.8 11025 Frequency [Hz] 13781.3 16537.5 19293.8 Figure B.8: 2D E D R plot of a measured impulse response of G E O G 200 with noise reduction. Minor contour lines occur every 10 dB. The major contour line indicates -60 dB. Appendix B. Noise Reduction and Reverberation Time Algorithms 85 1.05 0.95 10 Frequency [Hz] Figure B.9: Plot of the maximum coefficient of regression obtained for the straight-line approximation to the early linear portion of each frequency component of the E D R for G E O G 200, without noise reduction. t ! ! ~—^>-~^/—V 2 ry i 1 1 10 •WVi 10 Frequency [Hz] 3 10* Figure B.10: Plot of the maximum coefficient of regression obtained for the straight-line approximation to the early linear portion of each frequency component of the E D R for G E O G 200, with noise reduction. Appendix B. Noise Reduction and Reverberation Time Algorithms 86 Figure B . l l : Plot of the maximum interval of reverberation regression, T , for each frequency component of an E D R of G E O G 200, without noise reduction. x 10 2 10 3 io" Frequency [Hz] Figure B.12: Plot of the maximum interval of reverberation regression, T , for each frequency component of an E D R of G E O G 200, with noise reduction. x Appendix B. Noise Reduction and Reverberation Time Algorithms 10 Frequency [Hz] Figure B.13: R T plot of a measured impulse response of G E O G 200 without noise reduction. 10 Frequency [Hz] Figure B.14: R T plot of a measured impulse response of G E O G 200 with noise reduction. 87 Appendix C. Filter Specifications 88 APPENDIX C F I L T E R SPECIFICATIONS As the bandwidth of the octave frequency bands decrease by a factor of 2 for each lower frequency band (see Section A . l ) , a single set of filter coefficients will suffice i n a multirate design, with decimation/interpolation factors that are powers of 2. C.l LOWPASS DECIMATION F I L T E R SPECIFICATIONS The lowpass filter used to prevent aliasing in decimation is a nineth-order Butterworth filter with a -3 dB point at a normalized frequency of 0.21814. The amplitude-frequency response is plotted in Figure C . l . The filter coefficients are listed i n Table C . l . T i 1 1 r Normalized Frequency Figure C . l : Amplitude-frequency response of the lowpass Butterworth decimation filter. bo h b 3 454510e -005 Oo 1 000000e+000 3 109059e -004 Ol -4 485559e+000 1 243624e -003 02 9 611330e+000 63 2 901789e -003 G3 -1 263335e+001 &4 4 352683e -003 O4 1 111119e+001 65 4 352683e -003 0* -6 734447e+000 be b ba 2 90178?e -003 Oe 2 79927le+000 1 243624e -003 a 3 109059e -004 as 1 251796e-001 69 3 454510e -005 ag -9 262650e-003 2 \ 7 7 -7 666587e-001 Table C . l : Lowpass Butterworth decimation filter coefficients. Appendix C.2 C. Filter 89 Specifications M U L T I R A T E BUTTERWORTH BANDPASS F I L T E R SPECIFICATIONS The multirate Butterworth bandpass filter is based on the A N S I specification [1] for the 1 kHz octave filter. The filter coefficients are listed in Table C.2. The amplitude-frequency response graphed in Figure C.2, and the magnitude-frequency response is shown in Figure C.3. The phase response is graphed in Figure C.4. bo b b bi h b 2 3 6 1 013237e-004 a n 1 000000e+000 0 000000e+000 a i - 5 748772e+000 -3 0397lle-004 a 1 382940e+001 2 0 000000e+000 a 3 0397lle-004 fl4 1 296967e+001 0 OOOOOOe+000 0 5 - 5 056305e+000 -1 013237e-004 3 de -1 781889e+001 8 249072e-001 Table C.2: Multirate Butterworth bandpass filter coefficients. 0.25 Normalized Frequency Figure C.2: Amplitude frequency response of the multirate Butterworth bandpass filter. Appendix C.2 89 C. Filter Specifications M U L T I R A T E BUTTERWORTH BANDPASS F I L T E R SPECIFICATIONS The multirate Butterworth bandpass filter is based on the A N S I specification [1] for the 1 kHz octave filter. The filter coefficients are listed i n Table C.2. The amplitude-frequency response graphed in Figure C.2, and the magnitude-frequency response is shown in Figure C.3. The phase response is graphed in Figure C.4. bo bi 1 013237e-004 ao 1 000000e+000 0 000000e+000 m - 5 748772e+000 02 - 3 039711e-004 b 0 000000e+000 b 3 03971le-004 0 000000e+000 OB - 5 056305e+000 -1 013237e-004 06 8 249072e-001 3 4 h be 2 1 382940e+001 a 3 -1 781889e+001 a 4 a 1 296967e+001 Table C.2: Multirate Butterworth bandpass filter coefficients. 1 r 0.25 Normalized Frequency Figure C.2: Amplitude frequency response of the multirate Butterworth bandpass filter. Appendix C. Filter Specifications Figure C.4: Phase response of the multirate Butterworth bandpass filter. 90 Appendix C.3 E L L I P T I C B A N D P A S S 91 C. Filter Specifications F I L T E R S P E C I F I C A T I O N S The elliptic bandpass filters, used in the M r E B reverberator, were designed to the following specifications: 1. Passband of [(1 — e)/;, (1 + e)/ ], where e = 0.007, and / ; and f band limits for the 1 k H z octave; u u are the lower and upper octave 2. Maximum passband ripple of 0.20 dB; 3. Minimum of 50 d B attenuation in the stopbands. The multirate filter, used in bandpass filtering the 125 Hz to 1 kHz bands, is discussed in Section C.3.1. The coefficients for the 2 kHz, 4 kHz and 8 kHz elliptic bandpass filters are tabulated in Section C.3.2. C.3.1 M U L T I R A T E E L L I P T I C BANDPASS F I L T E R SPECIFICATIONS The coefficients for the multirate elliptic bandpass filter are listed i n Table C.3. The amplitude-frequency response is graphed in Figures C.5, and the magnitude-frequency response is shown in Figure C.6. The phase response is graphed in Figure C.7. bo 9 852982e--004 ao 1 OOOOOOe+000 bi - 7 727697e--003 Ol - 9 75283le+000 b 2 568156e--002 02 4 291176e+001 b - 4 515518e--002 «3 -1 121695e+002 b 3 924997e--002 d4 h 1 211167e--015 a 2 3 4 - 3 924997e--002 be 1 929013e+002 5 - 2 280495e+002 a6 1 876940e+002 b 7 4 515518e--002 b 8 - 2 568156e--002 as 3 952980e+001 9 7 727697e--003 ag -8 741745e+000 - 9 852982e--004 aio 8 721464e-001 b bio a 7 -1 061954e+002 Table C.3: Multirate elliptic bandpass filter coefficients. ! ! ! ! \ \ 1 0 0.05 0.1 0.15 0.2 0.25 Normalized Frequency Figure C.5: Amplitude-frequency response of the multirate elliptic bandpass filter. Appendix C. Filter Specifications Figure C.7: Phase response of the multirate elliptic bandpass filter. 92 Appendix C.3.2 E L L I P T I C B A N D P A S S F I L T E R C. Filter Specifications 93 S P E C I F I C A T I O N S The filter coefficients for 2 kHz, 4 kHz and 8 kHz elliptic bandpass filters are listed in Table C.4, Table C.5, and Table C.6, respectively. bo 1 936427e -003 bi -1 4 3 l l 3 4 e -002 2 4 540110e -002 b -7 721215e -002 b 3 a 0 a i 0.1 a 3 1 000000e+000 -9 293791e+000 3 927846e+001 -9 938641e+001 64 6 578433e -002 04 1 667080e+002 65 3 783764e -016 a s -1 936773e+002 be -6 578433e -002 67 7 721215e -002 de 1 578255e+002 d -8 907834e+001 7 -4 5 4 0 l l 0 e -002 as 3 332981e+001 bg 1 431134e -002 ag -7 466543e+000 b i o -1 936427e -003 O l O 7 606748e-001 6 8 Table C.4: Elliptic bandpass filter coefficients for the 2 k H z octave-band. bo 4 087852e--003 a n 1 000000e+000 b i -2 379334e--002 a i -7 810844e+000 2 6 238099e--002 a 2 2 881894e+001 b 3 - 9 256518e--002 a 3 -6 581424e+001 b 4 7 275245e--002 o 4 b 5 5 736572e--016 as -7 275245e--002 ae b be b 9 256518e--002 b -6 238099e--002 b 2 379334e--002 7 a 9 bio -4 087852e--003 a 7 as a g aio 1 027633e+002 -1 144760e+002 9 210064e+001 -5 286470e+001 2 074708e+001 -5 040638e+000 5 788377e-001 Table C.5: Elliptic bandpass filter coefficients for the 4 k H z octave-band. Appendix C. Filter Specifications 60 9 425354e--003 bl -2 631228e--002 62 4 330612e--002 b -6 003573e--002 &5 -8 351654e--002 3 7 835923e--002 be 67 8 215356e--002 -8 351654e--002 an Ol d2 a 3 1 000000e+000 -3 989329e+000 1 086773e+001 - 2 047279e+001 04 3 115580e+001 05 -3 765818e+001 ae 3 822042e+001 a -3 161277e+001 2 194162e+001 7 7 835923e--002 a -6 003573e--002 ag bio 4 330612e--002 aio 5 344916e+000 bu -2 631228e--002 an -1 624481e+000 612 9 425354e--003 fes 09 B 012 -1 205813e+001 3 414831e-001 Table C.6: Elliptic bandpass filter coefficients for the 8 kHz octave-band. 94 Appendix D. Review of Current Audio Processing SDKs for Microsoft Windows 95 APPENDIX D R E V I E W OF C U R R E N T A U D I O PROCESSING SDKs FOR M I C R O S O F T W I N D O W S Digital audio processing has been around for decades. However, it was not until recently (1997) that fullfeatured software development kits (SDKs) were available, that allowed rapid development of extensive audio effects. This trend has been mirrored by recent advances in inexpensive audio hardware. The following sections form a non-exhaustive list of currently available audio processing software development packages for Microsoft Windows operating systems. Commercial software was not reviewed. D.l MICROSOFT The Win32 API (Application Programming Interface) and DirectX from Microsoft are the most popular and accessible software development platforms available to game programmers today. Microsoft, in consultation with a large number of prominent audio hardware manufacturers and game developers, has created several versatile SDKs that provide exceptional audio processing capability. These are the DirectX Audio, DirectSound, and DirectMusic libraries. D.l.l DIRECTX AUDIO DirectX Audio is a free, well-tested library that provides audio and music processing and playback. All DirectX components are based on COM (Component Object Model). COM enforces a standardized object model at the binary level, enabling compatibility across different languages. D.l. 2 DIRECTSOUND DirectSound is the low-level audio component of DirectX Audio that provides the flexibility to perform just about any audio processing task. It is essentially a software interface to a hardware-based digital audio-mixing device. In normal practice, wrappers or object-oriented 0-1-+ abstractions are written to encapsulate and organise the DirectSound features used by an application. Many audio-card device drivers are in fact 'DirectSound compatible', and audio latency (the time difference between when a sound is triggered in software and when it is heard) can be as low as 10 ms in accelerated hardware audio cards. Appendix D.l. 3 D. Review of Current Audio Processing SDKs for Microsoft Windows 96 DIRECTMUSIC DirectMusic is the latest addition to the DirectX Audio system. It provides musical capability layered on top of the existing audio features of DirectSound. DirectMusic started with M I D I (Musical Instrument Digital Interface) and D L S (Downloadable Sound) but has evolved to play any form of digital audio, as it is built on a streaming architecture. D.2 CREATIVE TECHNOLOGIES Creative Technologies is best known for their SoundBlaster sound cards. Creative has managed to dominate the audio card market for I B M compatible P C s and, in the process, has become a de facto standard. Creative remains on the forefront of P C audio technology and develops its Own S D K s , such as EAX. D.2.1 ENVIRONMENTAL AUDIO EXTENSION ( E A X ) E A X (Environmental Audio extension) was pioneered and developed by Creative, but later released as an open-industry-standard. It provides a statistical reverberation engine that can be applied in a global context or to individual sound sources. Version 1.0 was crude and has been replaced by E A X 2.0. E A X 2.0 [12] adds 3D reverberation capabilities, with occlusion and obstruction effects, to the D i rectSound component of DirectX. The A P I is well designed, and many properties of reverberation are controllable. Frequency-dependent reverberation is limited to setting an attenuation at a reference high frequency of 5 kHz. A l l low-pass effects are specified as high frequency attenuations in d B relative to the low frequencies. Simulation of air absorption is supported, but is restricted to a constant attenuation for frequencies above 5 kHz. Although Creative does not formally specify the reverberation algorithms used, careful review of the entire E A X 2.0 A P I reveals diffuse reverberation is frequency-dependent in only three frequency ranges low, medium, and high (above 5 kHz). The limits of the low and medium frequency ranges are unspecified in the documentation. Specifications for E A X 3.0 are available only by signing a N D A . D.2.2 DIRSND DirSnd is an outdated set of C + + wrappers for M S DirectSound developed in February 1997 by Tom Bouril of Creative Labs, Inc. Appendix D. Review of Current Audio Processing SDKs for Microsoft Windows D.3 97 OPENAL The OpenAL (Open Audio Library) [35] is a software interface to audio hardware. It provides an openstandard for multichannel positional audio effects centered around a lister in a simulated three dimensional space. Reverberation is.implemented according to the IA-SIG I3DL2 guidelines (not reviewed). D.4 JAMES BOER'S G A M E AUDIO PROGRAMMING ( G A P ) James Boer [7] has developed a mid-level API on top of DirectX Audio. It simplifies several common audio processing tasks by providing wave file loading, disk-based streaming, and high-level sound scripting functionality. D.5 SUMMARY Software Frequency Dependent Octave-band Package Reverberation Reverberation No No unknown No DirectX EAX 9.0 1.0 EAX 2.0 limited No EAX 3.0 unknown unknown DirSnd No No OpenAL unknown unknown GAP No No Comments Not a v a i l a b l e f o r NT Table D . l : Summary of the digital audio processing software development kits for the Microsoft Windows platform reviewed for this thesis.
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- Frequency-dependent software reverberation : design...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
Frequency-dependent software reverberation : design and implementation of a seven octave-band reverberator Halingten, Kurtis 2003
pdf
Page Metadata
Item Metadata
Title | Frequency-dependent software reverberation : design and implementation of a seven octave-band reverberator |
Creator |
Halingten, Kurtis |
Date Issued | 2003 |
Description | Software reverberators are used to superimpose reverberation on audio signals, and are used extensively in the multimedia and broadcasting industries. Several commercially-available reverberators claim to support frequency-dependent reverberation, but none have been found to implement octave-band frequency-dependent reverberation. The objective of the research reported here was to develop a reverberator capable of accurately adding reverberation to digital audio signals, with desired reverberation times from 0 to 2 seconds specified for individual octave frequency bands from 125 Hz to 8000 Hz. The physics governing diffuse reverberation have been reviewed. An indepth investigation of the methods to measure reverberation was performed. Measurement of frequency-dependent reverberation times reported in this thesis used an iterative noise-reduction algorithm combined with a novel, unique, rationalized reverberation time measurement algorithm. The properties of the common DSP filters used for superimposing reverberation have been reviewed. Several published reverberator designs have been simulated, but were found to be unsuitable to meet the research objectives. This fact, combined with the limited reverberation functionality of current audio processing software development kits, prompted the development of new reverberators. Several new software reverberators are presented. Two of these are based on a computationally efficient multirate design. A l l of the prototypes satisfied the research objective of accurate superposition of octave-band reverberation. The best design was implemented in a Microsoft Windows DLL. |
Extent | 13075811 bytes |
Genre |
Thesis/Dissertation |
Type |
Text |
File Format | application/pdf |
Language | eng |
Date Available | 2009-11-17 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
DOI | 10.14288/1.0099747 |
URI | http://hdl.handle.net/2429/15060 |
Degree |
Master of Applied Science - MASc |
Program |
Mechanical Engineering |
Affiliation |
Applied Science, Faculty of Mechanical Engineering, Department of |
Degree Grantor | University of British Columbia |
Graduation Date | 2004-05 |
Campus |
UBCV |
Scholarly Level | Graduate |
Aggregated Source Repository | DSpace |
Download
- Media
- 831-ubc_2004-0062.pdf [ 12.47MB ]
- Metadata
- JSON: 831-1.0099747.json
- JSON-LD: 831-1.0099747-ld.json
- RDF/XML (Pretty): 831-1.0099747-rdf.xml
- RDF/JSON: 831-1.0099747-rdf.json
- Turtle: 831-1.0099747-turtle.txt
- N-Triples: 831-1.0099747-rdf-ntriples.txt
- Original Record: 831-1.0099747-source.json
- Full Text
- 831-1.0099747-fulltext.txt
- Citation
- 831-1.0099747.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0099747/manifest