UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Frequency-dependent software reverberation : design and implementation of a seven octave-band reverberator Halingten, Kurtis 2003

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

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

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 T H E R E Q U I R E M E N T S F O R T H E D E G R E E O F M A S T E R O F A P P L I E D S C I E N C E 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 i i A B S T R A C T Software reverberators are used to superimpose reverberation on audio signals, and are used exten-sively 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 rever-berator 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. 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 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 D L L . Contents iii CONTENTS Abstract 1 1 Contents iii List of Tables vi List of Figures y i i i 1 Introduction 1 1.1 Motivation 1 1.2 Scope of Project 2 1.3 Organization 2 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 Summary 7 3 Measurement of Reverberation 8 3.1 Empirical Methods •  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 EDC Noise Reduction 11 3.6 Energy Decay Relief 13 Contents iv 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 . 18 3.10 Summary 21 4 Art i f i c ia l Reverbera t ion . 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 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 4.4 Feedback Delay Networks 37 4.4.1 Jot Reverberator 38 4.5 Multirate Algorithms 38 4.5.1 Multirate Digital Reverberation Systems 39 4.6 Convolution with an Impulse Response 40 4.7 Summary 40 5 Des ign of an Improved Reverberator 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 Comparison and Analysis 57 5.4.1 Non-interpolated Multirate Butterworth Octave Band Reverberator 60 5.4.2 Optimized Butterworth Octave-Band Filterbank 61 5.5 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 ; - 65 6.5 Results 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 76 B. l Noise Reduction Algorithm 76 B.2 Reverberation Time Algorithm 77 B.3 Noise Reduction and Reverberation Time Algorithms Applied to the EDC 80 B. 4 Noise Reduction and Reverberation Time Algorithms Applied to the EDR 82 C Filter Specifications 88 C. l 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 95 D. l 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 OF 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 GEOG 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 GEOG 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 Summary of audio processing SDKs reviewed 97 List of Figures viii LIST OF FIGURES 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 kHz 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 RT 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 RT plot for the Schroeder-Logan Reverberator 33 4.17 Reverb-print of the impulse response of the Schroeder-Logan reverberator 34 4.18 RT 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 BOB 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) 50 5.11 3D EDR plot of an impulse response of the MrBOB reverberator (test case) . 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 GEOG 200 80 B.3 EDCs of the 1 kHz octave-band filtered impulse response of GEOG 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 GEOG 200 without noise reduction . . . 83 B.6 2D EDR plot of a measured impulse response of GEOG 200 without noise reduction . . . 83 B.7 3D EDR plot of a measured impulse response of GEOG 200 with noise reduction 84 B.8 2D EDR plot of a measured impulse response of GEOG 200. with noise reduction 84 B.9 Plot of coefficient of regression against frequency for an EDR of GEOG 200 85 B.10 Plot of coefficient of regression against frequency for an EDR of GEOG 200 85 B . l l Plot of the interval of reverberation regression against frequency for an EDR of GEOG 200 86 B.12 Plot of the interval of reverberation regression against frequency for an EDR of GEOG 200 86 B.13 RT plot of a measured impulse response of GEOG 200 without noise reduction 87 B. 14 RT plot of a measured impulse response of GEOG 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. Introduction 1 C H A P T E R 1 INTRODUCTION 1.1 M O T I V A T I O N 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 in highly reverberant envi-ronments, 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 Dr. 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 in 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 in 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. By 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. Introduction 2 1.2 S C O P E O F P R O J E C T 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 Mult iMedia (MM) A P I was used. The software reverberator was coded in straight C, and was encapsulated in a dynamic link library (DLL) . 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 O R G A N I Z A T I O N 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 DSP 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 DSP building blocks available, Chapter 5 presents the design and simulation of several versions of an octave-band 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 in 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 C H A P T E R 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 dB, 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 d i rec t early d i f fuse s o u n d re f lec t ions reverbera t ion I 1 > o t Figure 2.1: The reverberation response model. The direct sound occurs at a time of t0, followed shortly by the early reflections. Diffuse reverberation occurs after a time of t\. 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 M a t e r i a l 125 250 500 1000 2000 4000 Drywal 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 or 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 Glass window pane 0.25 0.15 0.08 0.06 0.04 0.03 Th in carpet 0.05 0.10 0.15 0.25 0.40 0.50 Suspended a c o u s t i c a l c e i l i n g 0.90 0.75 0.60 0.70 0.80 0.90 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.d, of all of the room surfaces when subjected to a diffuse sound field, is given by Z)j adi Si (2-1) The quantity A = ad 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 cadS #!(*)= #1(0) exp AV (2.2) where pr(0) is the steady-state sound pressure in Pascals at time t = 0, c is the speed of sound in air Chapter 2. Background 6 in m/s, V is the volume of the room in m 3 , S is the total surface area in m 2 , and ad is the average absorption coefficient. The speed of sound in air is given by c = 20.05V273.3 + T m/s for a temperature T in °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 6 , or 60 dB in terms of the sound pressure level, is formally defined as the reverberation time and denoted TQO. It can be derived from Equation 2.2, and is given by T60 = 0 . 1 6 ^ - = 0 . 1 6 ^ (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 absorp-tion by air cannot be overlooked. The exponential decay of sound intensity, I(x), x meters from the source is given by I{x) = ^Ioe-mx (2.4) where lo is the intensity at the source, and m is the attenuation constant, commonly called the air-absorption exponent. The air-absorption exponent depends on frequency, humidity, pressure, and tem-perature, and is more pronounced at higher frequencies, as can be seen from the typical indoor-air exponent values listed in Table 2.2. Octave -Band RH ["/,] 500 1000 2000 4000 30 0 0005 0.0012 0.0030 0.0095 50 0 0004 0.0010 0.0024 0.0061 80 0 0003 0.0008 0.0020 0.0051 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 _ Q V A (2.5) adS + 4rnV 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. Background 7 2 . 2 . 2 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 O P T I M U M R E V E R B E R A T I O N T IMES 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 6 0 [s] Classrooms 0.4 - 0.5 Movie theatres 0.7 Recording s tud ios 0.3 Conference rooms 1 Theatres 1 Concert h a l l s 1.8 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 replac-ing 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, than to remodel at a later date. 2.3 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 C H A P T E R 3 M E A S U R E M E N T OF REVERBERATION 3.1 E M P I R I C A L M E T H O D S Wallace Clement Sabine in 1895 [32] first measured reverberation time in 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 bandpass-filtered 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 in 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 S Y S T E M S 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 (MLS) 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 = 2n — 1 samples. Since room acoustic impulse 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 T D S S Y S T E M S 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, TDS 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 ME 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 mea-surements 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 kHz 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.01 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 dB 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 2o, and T30. 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 dB and -25 dB below the maximum initial value. For the T 3 0 , the lower limit is dropped to -35 dB. 3.3 IMPULSE RE S P O N S E 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 DSP systems such software reverberators. 3.4 E N E R G Y D E C A Y C U R V E 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 (s2(t)) denotes the ensemble average of the squared impulse response. The right-hand side of the 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 3. Measurement of Reverberation 11 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 ANSI S l . l -1986 (ASA 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 in length and of limited accuracy. Electrical noise is present in ampli-fiers, discretization errors are unavoidable in analog-to-digital conversion systems, and acoustical back-ground noise, the largest source of noise, is always present. The total noise in a measured room impulse response is best visualized with an echogram. A n echogram is the square of the impulse response plotted in units of dB. A n echogram, from an impulse response measured in the Geography 200 classroom with a M L S system, is shown in 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 N O I S E R E D U C T I O N 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 rt fOO pt \ h2(T)dT= h2{T)d{-T)= h2(T)dT~ h2(T)dT (3.2) Jt Joo JO Jo Other techniques include: 1. Sliding time window; 2. Truncation of the measured impulse response with high levels of noise; Chapter 3. Measurement of Reverberation 12 1.693 8000 1/3 Octave Band Time [s] Figure 3.3: A three dimensional surface generated from the EDC 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 ° h2(r) dr, 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 kHz octave-band filtered impulse response of G E O G 200 (maximum nor-malized 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 E N E R G Y D E C A Y R E L I E F Recall that the E D C is defined as /oo h2(r)dT (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 fac-tors: 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. Measurement of Reverberation 14 2. The accuracy is limited by the bandpass filter design characterisitics - namely, the amplitude-frequency, phase, and group-delay properties; 3. The measurement is corrupted by noise which biases calculated reverberation times towards higher 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 (EDR) 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 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 EDRh(t, f) for fixed frequency should yield the EDCh(t): E D R h ( t , / ) df = EDC f c ( t ) ; 2. Integration of E D R / , ( i , / ) for fixed time should yield the squared Fourier transform of h(t) integrated over all time: EVRh(t, f) dt = \H(f)\2; 3. Preservation of causality - that is, if h(t) is causal, p(t, f) = 0 for t < 0: f0°° p(t, f) dt = \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 values. (3.4) Chapter 3. Measurement of Reverberation 15 have lower side-lobes in their amplitude-frequency response, resulting in 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 (FFT) 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 dB was suitable. The Blackman-Harris window is defined by w(n) = a0 - ax cos(27r/7V n) + a2 cos(27r/Ar 2n) - a3 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 35875 0 40217 a i 0 49755 0 49364 0 48829 0 49703 0,2 0 07922 0 05677 0 14128 0 09392 a.3 - - 0 01168 0 00183 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 in Figure 3.5. For clearer graphical presentation, the resolutions in 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 SNR, and this improvement is visible in 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. As 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 in Figure 3.7. The "well-behaved" contours in the upper right corner indicate a stable exponential decay with a good SNR. 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 3. Measurement of Reverberation 16 developed by the author, detailed in Appendix B.2, is used to determine the best straight-line approx-imation 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 EDCs , 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 dB (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 imple-mented 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 RT plot will be referred to as RT (octave-band) reverberation times. O c t a v e Band 125 250 500 1000 2000 4000 8000 Teo 0 . 4 7 1 0 . 6 0 3 0 . 7 8 1 0 . 8 0 6 0 . 7 7 1 0 . 7 4 7 0 . 5 9 5 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 COMPARISON OF THE E D R AND THE 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, in octave-frequency bands. These are the RT 2 o and the R T 3 0 , and an adjustable R T 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 dB lower than the starting E D C value. The impulse response of the U B C Geography 200 classroom wil l be used in 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 in Table 3.3. The RT plot for the same impulse response of the Geography 200 classroom is shown in Figure 3.8. Wi th 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. Measurement of Reverberation 17 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 ~2 W = 101og10 (3.6) where the function sq(x) = x 2 is applied to every element of \B |. The logarithmic scaling linearizes the 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 18 1.672 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 dB. The major contour line indicates -60 dB. 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 ob-tained 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 Cte, measures the ratio of early-to-late arriving sound energy. The 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 dB (3.7) Cu = 10 log I D Ioh2(r)dr Chapter 3. Measurement of Reverberation 19 0 2756.3 5512.5 8268.8 11025 13781.3 16537.5 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 dB. The major contour line indicates -60 dB. O c t a v e B a n d M e a s u r e m e n t 1 2 5 2 5 0 5 0 0 1 0 0 0 2 0 0 0 4 0 0 0 8 0 0 0 A v e r a g e E D T 0 6 7 8 0 5 2 2 0 6 3 7 0 . 7 8 3 0 7 6 0 0 6 6 1 0 5 9 8 0 6 9 3 R T 2 0 0 5 0 1 0 5 1 9 0 6 3 7 0 . 8 0 3 0 8 1 8 0 7 6 2 0 6 1 8 0 7 1 6 RT30 0 4 9 5 0 4 9 9 0 5 9 1 0 . 7 3 0 0 7 7 0 0 7 4 1 0 6 0 7 0 6 6 5 R T u s e r 0 6 0 0 0 5 5 4 0 6 2 1 0 . 8 2 4 0 8 2 2 0 7 7 3 0 6 4 0 0 7 1 1 ( R T 2 0 + R T 3 0 ) / 2 0 4 9 8 0 5 0 9 0 6 1 4 0 . 7 6 7 0 7 9 4 0 7 5 2 0 6 1 3 0 6 9 1 R T ( E D R ) 0 4 7 1 0 6 0 3 0 7 8 1 0 . 8 0 6 0 7 7 1 0 7 4 7 0 5 9 5 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 te is the time delimiting the early and late sound energies. The early-time limit is normally 50 ms 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 Dte, and is given by Dt. J~h>(T)dT For D50, it is exactly related to C50 by the following relation: , C50 = 10 l o g 1 0 D, 50 1 -D< 50 dB (3.8) (3.9) Chapter 3. Measurement of Reverberation 20 Figure 3.9: Reverb-print of an impulse response measured for Geography 200. Chapter 3. Measurement of Reverberation 21 3.10 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 EDRs. Measuring the reverberation time in octave or third-octave bands provides a measure of the frequency-dependence 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 in the frequency domain and accurate reverberation times, when used in conjuction with a noise-reduction method. The RT plot is a graph of the reverberation times extracted from an E D R by application of the RTA. A RT 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 C H A P T E R 4 ARTIFICIAL REVERBERATION 4.1 H ISTORICAL RE V E R B E R A T I O N 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 re-verberator. 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 D I G I T A L E L E M E N T S 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)\ = \elwT\ = 1, for all frequencies u>. x(n) H z H ->y(n) 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 2 , -m3 Z > y(n) Figure 4.2: Multitap line flow diagram. Time delays in terms of samples, nii, can be approximated by w T ; / s , where fs 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) = Ylaix(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 Reverberation 24 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 F i l t er 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) + gm x(n - m) (4.2) where m is the length of the delay in samples, and go and gm are gains. The feed-forward comb filter can simulate the superposition of a direct signal, g0x(n), plus a single, attenuated and delayed "echo", gmx(n — m). Attenuation by air can be approximated by the choice of the gain gm. The delay in time can be approximated by the acoustical propagation over a distance oicm/fs meters, where c is the speed of sound and fs is the sampling rate. x(n) t> z m -t* y(n) Figure 4.3: Feed-forward comb filter flow diagram. Impulse Response Frequency Response Phase Response 1 • 0) T J f 0.5 E < 0 0 100 200 300 400 500 0 0.5 1 0 0.5 1 Sample Normalized Frequency Normalized Frequency Figure 4.4: Responses for a feed-forward comb filter with gains go = 1.0 and gm = 0.7, and a delay of 20 samples. The transfer function for the feed-forward comb filter is given by H(z)=g0+gmz-m (4.3) For the simple case, go = gm = 1, the magnitude frequency response is |1 -f- e~tum\, which simplifies to 2 |cos w f |. The impulse, frequency, and phase responses for a feed-forward filter, with gains go = 1.0 and gm = 0.7, and a delay of 20 samples, are shown in Figure 4.4. Chapter 4. Artificial Reverberation 25 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 in 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 y(n) — x(n — m) + gy(n — m) (4.4) where m is the length of the feedback delay in 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) + g2 u(n - 3 m) + and is illustrated in Figure 4.6. (4.5) 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 H(z) = (4.6) The amplitude of the frequency response can be found by evaluating | i ? ( 2 ) | on the unit circle in the complex plane. This is done with the substitution z = elu. 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 dB. 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/fs seconds; the time required for the output to be attenuated by a factor of 60 dB is 60 - 3 r (4.9) - 2 0 l o g 1 0 g l o g 1 0 g 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 fs, and is • -60 fs l o g 1 0 \g\ (4.10) Similarly, the gain, given a delay as a number of samples, for a reverberation time of Teo can be shown to be g = l fj - 3 m/(/ sr 6 o ) ( 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 Normalized Frequency 0.5 1 Normalized Frequency Figure 4.7: Responses for a feedback comb filter with a gain g = 0.7 and a delay of 20 samples. Chapter 4. Artificial Reverberation 27 Frequency-Dependent Feedback Comb Filter The high-frequency attenuation by air can be approximated in a feedback comb filter by inserting a first-order lowpass filter with a transfer function of the form 1 l - a z - 1 into the feedback loop. The transfer function of the frequency-dependent comb filter then becomes z - m (4.12) H{z) = l-gHlp(z)z-m z~m -az-™-1 1 — a z~l — g z~m For stability, the denominator must be greater than 0. This is ensured when 9 l - o < 1 (4.13) (4.14) (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 in Figure 4.8. Impulse Response Frequency Response Phase Response E < 8 20 100 200 300 400 500 Sample -40 Normalized Frequency 0.5 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 -m-H{z) = Y (4.16) Chapter 4. Artificial Reverberation 28 where N is the number of comb niters. If all the gains gt are set for the same reverberation time, all the 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, wil l 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 in 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 in samples, and g is the feedback gain. The impulse reponse is h(n) = -gu(n) + (1 - g2) [u(n - m) + gu(n - 2 m) + g2 u(n - 3 m) H ] (4.18) and is illustrated in Figure 4.10. If g = y/2/2 in 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 — a A- z~m H{z) = — (4.19) v ' l - g z ~ m v ' To show that the magnitude of the frequency response is unity for all frequencies, set z = elu and find the absolute value of the transfer function. H(el") = . = e - t t m " 9 . (4.20) Chapter 4. Artificial Reverberation 29 h(n) 1-92 gd-g 2 ) g 2 d - g 2 ) g 3 ( 1 . g 2 ) m 2m 3m 4m Figure 4.10: Allpass filter impulse response. Since |e i m u \ = 1, it is easy to show 1-ge* l - g e -1 (4.21) Thus \H(elu')\ — 1, and the allpass filter has unity gain at all frequencies. The impulse, frequency, and phase responses for an allpass filter, with a gain of 0.7 and a delay of 20 samples, are shown in Figure 4.11. Impulse Response Frequency Response Phase Response 0.2 a 0.1 3 o -0.1 -0.2 0 100 200 300 400 500 Sample 0 0.5 Normalized Frequency 0.5 1 Normalized Frequency 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 _m. i=l a l Observe that the number of terms in both the numerator and denominator increases as 2™. Chapter 4. Artificial Reverberation 30 Nested Al lpass F i l t er 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 Fn(z) F(z) = Fd{z) the transfer function of a nested system is g ( * ) = i y ' (4-24) v ' Fd(z)-gFn(z) • v ; Notice that if F(z) is a delay (z~m), H(z) reduces to the transfer function of an allpass filter. By application of Equation 4.24, the overall transfer function is found to be = - 9 2 + 9 l 9 2 z - ^ - 9 l z - ™ * + z - i ^ -l+9lZ-mi +9l92Z~m2 - S 2 ^ ( 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 9i-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. (4.23) x(n) Allpass Z m 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 re-verberation time of TQO as is available for comb and allpass filters in 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 COMB 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 Reverberation 31 1 0.5 0 -0.5 -1 Impulse Response • • 0.2 CD 0.1 CD 1 0 'c ro -0.1 -0.2 100 200 300 400 500 Sample Frequency Response 0.5 1 Normalized Frequency Phase Response 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 6 0 , the gain of each comb filter is found with Equation 4.11, noting that the delay in terms of samples is given by m = T fs. F i l t e r delay [ms] Comb 1 31 Comb 2 . 37 Comb 3 41 Comb 4 45 A l l p a s s 1 5 A l l p a s s 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 in Table 4.2. As 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 Frequency [Hz] 10 Figure 4.14: R T plot for the Schroeder Reverberator with the reverberation time set to 0.5 s. Chapter 4. Artificial Reverberation 32 Octave Band 125 250 500 1000 2000 4000 8000 RT 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 RT 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. 1.5 0.5 ^ '—f? 1 1 1 _ -^ — — i 1— . i i i 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Time [s] Figure 4.15: Reverb-print of the impulse response of the Schroeder reverberator. Chapter 4. Artificial Reverberation 33 4 . 3 . 2 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 d e l a y [ms ] g a i n A l l p a s s 1 1 0 0 0 . 7 A l l p a s s 2 6 8 - 0 . 7 A l l p a s s 3 6 0 0 . 7 A l l p a s s 4 1 9 . 7 0 . 7 A l l p a s s 5 5 . 8 5 0 . 7 Table 4.3: Allpass filter parameters for the Schroeder-Logan reverberator. 0) r— 2 0 1 1 1—1 W W EJf! -i •to2 103 104 Frequency [Hz] Figure 4.16: R T plot for the Schroeder-Logan Reverberator. The reverberation time of 2 seconds is visible in the RT plot shown in Figure 4.16. The corresponding RT times are listed in Table 4.4. O c t a v e B a n d 1 2 5 2 5 0 5 0 0 1 0 0 0 2 0 0 0 4 0 0 0 8 0 0 0 R T 2 . 0 3 3 2 . 0 3 6 2 . 0 5 0 2 . 0 3 5 2 . 0 3 6 1 . 9 5 3 1 . 9 4 1 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 Reverberation 34 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 in 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. C o m b d e l a y 2 5 k H z 5 0 k H z 4 4 . 1 k H z F i l t e r ( m s ) 9i 9i 9i 1 5 0 0 . 2 4 0 . 4 6 0 . 4 1 2 5 6 0 . 2 6 0 . 4 8 0 . 4 3 3 6 1 0 . 2 8 0 . 5 0 0 . 4 5 4 6 8 0 . 2 9 0 . 5 2 0 . 4 6 5 7 2 0 . 3 0 0 . 5 3 0 . 4 7 6 7 8 0 . 3 2 0 . 5 5 0 . 4 9 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 IR 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 4. Artificial Reverberation 36 Octave Band 125 250 500 1000 2000 4000 8000 RT 0.591 0.803 0.748 0.672 0.636 0.551 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. And 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 smal l medium large 0.38 - 0.57 0.58 - 1.29 1.30 - i n f i n i t e Table 4.7: Applicable reverberation time ranges for Gardner's reverberators. Feedback 9 Loop 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 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 The Marsch-Porschmann reverberator [36] is an extension of the Gardner reverberator. A single high-order FIR 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 (FFT) 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 F E E D B A C K 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 Reverberation 38 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]. x(n). a i 1 312 3 13 321 a 22 3 23 331 a 32 a 33 - m i t ' 1 •p Z ' - m ? 1 Z c z - "3 . —1 c. d -t> y(n) Figure 4.21: General structure of a feedback delay network of order 3. 4.4.1 J O T R E V E R B E R A T O R 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 Hz 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 ANSI 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. Applica-tions 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 in 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 R E V E R B E R A T I O N 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 in 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 in 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 kHz 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 in 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 Reverberation 41 technique to create artificial reverberation. 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 in Table 4.8. Unfortu-nately, no reverberator simulated here was found acceptable to meet the research objectives, prompting the design of entirely new reverberators in the next chapter. Reverberator Octave Band Reverberat ion 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 S c h o e n l e - F l i e g e - Z o l e r Yes No Table 4.8: Comparison of popular existing reverberator designs. Chapter 5. Design of an Improved Reverberator 42 C H A P T E R 5 DESIGN OF AN IMPROVED REVERBERATOR 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 ac-curately 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 rever-beration 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 in 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 RT 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 dB 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 (FFT) 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 DSP 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 Schroeder-Logan 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 in 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 in 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 wil l 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. INPUT • 125 Hz BPF 250 Hz BPF 1 kHz BPF 2 kHz BPF ALLPASS ALLPASS ALLPASS ALLPASS Allpass Filter ALLPASS ALLPASS ALLPASS OUTPUT 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 Band (BOB) reverberator; 2. Mult i rate Butterworth Octave Band (MrBOB) reverberator; 3. Mult i rate El l ip t ic Bandpass (MrEB) 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 kHz 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 6th 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 RT 2 o and RT30 values obtained with the M L S S A system Chapter 5. Design of an Improved Reverberator 45 ALLPASS | Allpass Filter Decimation Interpolation LP * 2 • 2 LP Multirate Filter I 1 INPUT • LP »2 LP 12 125 Hz BPF LP »2 250 Hz BPF 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 three-dimensional 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 5. Design of an Improved Reverberator 46 Octave Band 125 250 500 1000 2000 4000 8000 T60 0.498 0 509 0.614 0.767 0.794 0.752 0.613 Table 5.1: Test case reverberation times 5.3.1 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 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. 125 250 Octave Band 500 1000 2000 4000 8000 Test case T 6o 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 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 atten-uated 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 5. Design of an Improved Reverberator 47 0.051 1 1 1 1 r -0.05 1 1 1 1 1 1 1 1 1 1 1— -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 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 5. Design of an Improved Reverberator 48 1 0 ° 1 0 1 1 0 2 1 0 3 1 0 * 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 49 10 2 10 3 10" Frequency [Hz] Figure 5.8: RT plot of the impulse response of the BOB reverberator (test case). 20 0 m •0 a; -20 c | - 4 0 tD UL -60 -80 1C -" 3 10_2 10_' 1 Normalized Frequency Figure 5.9: Transfer function of the BOB reverberator (test case). Chapter 5. Design of an Improved Reverberator 50 5.3.2 MULTIRATE OCTAVE BAND REVERBERATOR The Multirate Butterworth Octave Band reverberator is the B O B reverberator refactored to use a multi-rate 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 in 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 in 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 in 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 in 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. 125 250 Octave Band 500 1000 2000 4000 8000 Test case T6o 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 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 EDR plot of the impulse response of the MrBOB reverberator (test case). 102 103 ID4 Frequency [Hz] Figure 5.13: RT plot of the impulse response of the MrBOB reverberator (test case). Chapter 5. Design of an Improved Reverberator 52 Frequency [Hz] Figure 5.14: Response of the MrBOB reverberator to broad-band white noise. i 1 1 1 1 r 0 0.2 0.4 0.6 0.8 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 \ . -; . i Y io" J Normalized Frequency Figure 5.16: Transfer function of the MrBOB reverberator (test case). Chapter 5. Design of an Improved Reverberator 53 5.3.3 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 dB, and a maximum of 0.05 dB 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 in Figure 5.17. As 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 RT 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. 1 2 5 2 5 0 O c t a v e B a n d 5 0 0 1 0 0 0 2 0 0 0 4 0 0 0 8 0 0 0 T e s t c a s e T 6 o 0 4 9 8 0 5 0 9 0 6 1 4 0 . 7 6 7 0 . 7 9 4 0 . 7 5 2 0 . 6 1 3 R T 0 5 1 7 0 5 3 6 0 6 3 0 0 . 7 7 2 0 . 7 9 9 0 . 7 4 6 0 . 5 9 4 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 kHz 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 in 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. Design of an Improved Reverberator 51 Figure 5.17: Impulse response of the MrEB reverberator (test case). Figure 5.18: 3D EDR plot of the impulse response of the MrEB reverberator (test case). 0.186 0.372 0.557 J  - ! ^ -syyy^S _ i 1 1 1 1 -0 2756.3 5512.5 8268.8 11025 13781.3 16537.5 19293.8 Frequency [Hz] Figure 5.19: 2D EDR plot of the impulse response of the MrEB reverberator (test case). Chapter 5. Design of an Improved Reverberator 55 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). Chapter 5. Design of an Improved Reverberator 56 0.2 V-102 103 104 Frequency [Hz] Figure 5.22: RT plot of the impulse response of the MrEB reverberator (test case). I ! ;-f; ; : ] f ... . . | . . . . . . I I I 10~3 10"2 10"' Normalized Frequency Figure 5.23: Transfer function of the MrEB reverberator (test case). Chapter 5. Design of an Improved Reverberator 57 5.4 COMPARISON AND 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 RT 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. O c t a v e B a n d 1 2 5 2 5 0 5 0 0 1 0 0 0 2 0 0 0 4 0 0 0 8 0 0 0 T e s t c a s e T60 0 4 9 8 0 5 0 9 0 6 1 4 0 7 6 7 0 7 9 4 0 7 5 2 0 6 1 3 B O B 0 5 3 4 0 5 4 8 0 6 3 0 0 7 7 6 0 8 2 7 0 7 4 7 0 6 2 0 D i f f e r e n c e 0 0 3 6 0 0 3 9 0 0 1 6 0 0 0 9 0 0 3 3 - 0 0 0 4 0 0 0 7 R e v e r b e r a t o r M r B O B 0 5 1 4 0 5 4 2 0 6 4 3 0 7 7 3 0 8 2 7 0 7 4 7 0 6 2 0 D e s i g n D i f f e r e n c e 0 0 1 6 0 0 3 3 0 0 2 9 0 0 0 6 0 0 3 3 - 0 0 0 5 0 0 0 7 M r E B 0 5 1 7 0 5 3 6 0 6 3 0 0 7 7 2 0 7 9 9 0 7 4 6 0 5 9 4 D i f f e r e n c e 0 0 1 9 0 0 2 7 0 0 1 6 0 0 0 5 0 0 0 5 - 0 0 0 6 - 0 0 1 9 Table 5.5: Comparison of the measured reverberation times for the B O B , M r B O B , and M r E B reverber-ators, and the test case reverberation times. D e s i g n B O B M r B O B M r E B R e l a t i v e S p e e d 1 . 0 1 . 3 4 6 1 . 3 6 4 M a x 0 0 3 9 0 . 0 3 3 0 . 0 2 7 A b s . D e v . i n R T M i n 0 0 0 4 0 . 0 0 5 0 . 0 0 5 A v g 0 0 2 1 0 . 0 1 8 0 . 0 1 4 Table 5.6: Performance review of the three reverberator designs. Maximum and minimum deviations in RT 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 in the B O B , M r B O B , and M r E B reverberators are shown in 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 in the overlapping transition bands of adjacent filters. The impulse response for the-M 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 decima-tion and staged interpolation are used in the multirate reverberation design, illustrated in Figure 5.2. Chapter 5. Design of an Improved Reverberator 58 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 1 I I I I I I 1_ i I 0 - 1 2 3 4 5 6 7 8 9 10 Time [s] x 1 0 - 3 Figure 5.26: Impulse response of the multirate elliptic octave-band filterbank used in the MrEB rever-berator. 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 Chapter 5. Design of an Improved Reverberator 59 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 V sr / J • 101 i •—- i • i ' i i i i i I 1 i , . • • • I 10"3 10"J 10"1 10° Normalized Frequency Figure 5.29: Transfer function of the multirate elliptic octave-band filterbank used in the M r E B rever-berator. 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 60 i i i i i i i i l 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Time [s] 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 mul-tirate 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 re-verberation that is later interpolated back up to the initial sampling rate, was minor. The rates of Chapter 5. Design of an Improved Reverberator 61 ALLPASS Allpass Filter LP * n Decimation t n LP Interpolation LP *2 Multirate Filter LP »2 125 Hz BPF LP *2 250 Hz BPF 1 kHz BPF • 4 LP ALLPASS ALLPASS ALLPASS <H ALLPASS Figure 5.31: Multirate reverberator section with with staged decimation and single stage interpolation before reverberation. ALLPASS LP In tn LP Allpass Filter Decimation Interpolation LP *8 LP *4 LP *2 Multirate Filter I 1 125 Hz BPF 250 Hz BPF 500 Hz BPF 1 kHz BPF • 8 LP f 4 LP t2 LP ALLPASS ALLPASS ALLPASS «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 B U T T E R W O R T H O C T A V E - B A N D F I L T E R B A N K 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 / „ <- efu. 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 Hz 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 0.5 n \ / ~ \ / ~ \ / \ / ; — ' v . - ' N *\ : \ > ™\\ Jif \ \ Id wf yM/f w f II V i V ' / U ij ll \\i 1 tl \ / W \\ W V •I n It • rf V\ / if, \\ II 11 ty /J \ iK\ >/\\ \ y \ 7 LX \\ A //\\ 7 X A* \\ v. Q 1 — ' - •• ^ - ' ^ t r T r i 'inaliii-r^ friii 10"3 ' 10"2 10"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 63 5.5 S U M M A R Y 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 rever-berator. 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 C H A P T E R 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 heap, 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]; f l o a t RT60_00125; f l o a t RT60_00250; f l o a t RT60_00500; f l o a t RT60_01000; f l o a t RT60_02000; f l o a t RT60_04000; f l o a t 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 DEVELOPMENT PLATFORM AU work was performed on a 400MHz Dual PII 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 ClassTalk executable. 6.3 I M P L E M E N T A T I O N D E T A I L S 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 P R O C E D U R E S 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 R E S U L T S 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 octave-band 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 - 5 , and is rounded down to zero. This is also clearly 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 RT 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. O c t a v e B a n d 1 2 5 2 5 0 5 0 0 1 0 0 0 2 0 0 0 4 0 0 0 8 0 0 0 T e s t c a s e T 6 o 0 4 9 8 0 5 0 9 0 6 1 4 0 . 7 6 7 0 . 7 9 4 0 . 7 5 2 0 . 6 1 3 P r o t o t y p e 0 5 3 4 0 5 4 8 0 6 3 0 0 . 7 7 6 0 . 8 2 7 0 . 7 4 7 0 . 6 2 0 R T I m p l e m e n t a t i o n 0 5 7 2 0 5 5 6 0 5 6 7 0 . 8 5 7 0 . 8 3 8 0 . 7 5 1 0 . 6 1 6 D i f f e r e n c e 0 0 7 4 0 0 4 7 - 0 0 4 7 0 . 0 9 0 0 . 0 4 4 - 0 . 0 0 1 0 . 0 0 3 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 reverber-ation sounded realistic, in every instance. 0.051 1 i 1 1 1 r -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 Time [s] Figure 6.1: Impulse response of the reverberator (test case). Chapter 6. Implementation 07 1.672 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 68 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). Chapter 7. Conclusion and Future Work 69 C H A P T E R 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 spec-ified 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 frequency-dependent reverberation times, and used a noise-reduction algorithm and a unique, rationalized rever-beration 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 MHz 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 rever-berator. Reverberation time algorithm: 1. Refinement of the E D R and RT 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 rever-berator 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 kHz 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 frequency-dependent 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 (QMF) 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 SIMD extensions with the Intel IPP 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 in t32 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 iu . Multirate signal processing. In S.K. Mi t ra 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. On 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 Trans. Speech Audio Processing, 3(l):84-93, Jan 1995. [9] L . Cerveau. Couplage temps rel d'outils d'acoustique prvisionnelle et de dispositif d'auralisation. PhD thesis, University of Paris, 1999. [10] W . T . Chu. Comparison of reverberation measurements using schroeder's impulse method and decay-curve 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, Jul 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 nar-row 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. On the use of windows for harmonic analysis with the discrete fourier transform. Proc. IEEE, 66(l):51-83, Jan 1978. [23] M . Hodgson. Empirical prediction of speech levels and reverberation in 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, Jun 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. PhD 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 iu . The design of optimal multirate bandpass and bandstop filters. IEEE Trans. Acoust. Speech and Signal Processing, 26(6):534-543, 1978. [40] S.K. Mi 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 Applica-tions. 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. Bibliography 74 [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. Mit ra , 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 reverber-ation. 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, Apr 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 acous-tics and number theory. J. Audio Eng. Soc, 32(4): 194-203, Apr 1984. [55] M . R . Schroeder and B . F . Logan, "colorless" artificial reverberation. J. Audio Eng. Soc, 9(3):192-197, Jul 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, Apr 1994. [61] U . Zolzer. Digital Audio Signal Processing. John Wiley & Sons, New York, 1997. Appendix A. Miscellaneous 75 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, fc, by / ; = 2 ~ m / 2 / c and / „ = 2 m / 2 / / c . The frequency bandwidth, BW, is given by BW = / „ - / ; . Normalized with respect to the center frequency BW/fc = 2 m / 2 - 2 ~ m / 2 is constant. For octave bands, m — 1, fu/fi = 2, and for one-third octave bands, m = 1/3, fu/fi = 1.26. The frequencies of the standard octave bands are found in Table A . l . Band /( [Hz] fc [Hz] U [Hz] 16 11 16 22 31.5 22 31.5 44 63 44 63 88 125 88 125 177 250 177 250 355 500 355 500 710 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 (/ c) frequencies. Appendix B. Noise Reduction and Reverberation Time Algorithms 76 APPENDIX B NOISE REDUCTION AND REVERBERATION T I M E ALGORITHMS Impulse response measurements are often corrupted with noise. Noise tends to bias calculated reverber-ation times to higher values. The Noise Reduction Algorithm (NRA) 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. The 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 devel-oped 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 (NEA) detailed below. Noise Estimation Algorithm INPUTS: (1) Time t (2) Squared impulse response h2(t) (3) Time interval dt 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 h2(t) on the ith interval 4. Set p <— min(pi) 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 h2(t) (3) Time interval dt 1. Set i <- 0 and h2Q{t) *- h2(t) 2. Setp<- N E A ( i , hl(t), dt) 3. While i < n or p > p 3.1 Remove noise 3.1.1 Set h2{t) <- h2(t) - p 3.1.2 If ti$(tj) < 0, set h2(tj) *- 0.25p 3.2 Set p <—• N E A ( i , / i 2 ( i ) , dt) 3.3 Set i « - i + 1 4. Set k2(t) «-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 IME ALGORITHM Based on the definitions of the T20 and T30 found in Section 3.2, define the interval of reverberation regression, Tx, to be the interval of energy loss starting from 5 dB to x + 5 dB below the maximum value 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) = 101og 1 0 ( / ( / i (£))) . Let the inverse function of D be denoted D~l(z). 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 (r2,m,b)^-g(x,y) (B.2) Appendix B. Noise Reduction and Reverberation Time Algorithms 78 MAX -5dB -15dB nSt t 0^ f 1 2^ t2Q t3 t 3 f Figure B. l : Illustration of the Reverberation Time Algorithm. The interval of reverberation regression, Tx, 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 3 is increased incrementally in steps of St from i3 0 , a straight line is fitted to the decay curve on the interval [£2, £3]. This P r o c e s 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 ^ . where r 2 is the coefficient of regression, m is the slope, and b is the intercept, of the straight line fitted 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. <30 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; 4- £3 = t3o + n St is the current upper limit for the time-domain interval of regression for the n**1 iteration of the algorithm; 5. t3f is the final upper limit for the time-domain interval of regression, for which the largest coefficient of regression is obtained. Appendix B. Noise Reduction and Reverberation Time Algorithms 79 Reverberation Time Algorithm I N P U T S : (1) Time t (2) Squared impulse response h2(t) (3) Sampling frequency fs (4) Minimum time to (5) Decimation factor d 1. Decimate t and h2(t) by a factor of d 2. Set St <- d/fs 3. Set D(t) <- 10 log 1 0(/(/i 2(i))) 4. Set 2 <— max(£>(t)) for t > £0; maximum found at t\ 5. If z> z .5.1 Set t2 <- J0 _ 1(z - 5.0) 5.2 Set t3 o <- D~l{z - 15.0) 5.3 Set t3 <- i 3 o 5.4 Set (r2,m,o) ^ g([t2,t3], [D(t2), .D(t3)]) 5.5 Set r 2 «- r 2 5.6 Set t3 <- t 3 + <5i 5.7 Set (r 2,m,6) ^5([t2,t3],[D(i2),Z?(t3)]) 5.8 If r 2 > f 2, set f2 <— r 2 , go to step 5.6 6. Set i 3 / <— t 3 O U T P U T S : (1) 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 . Appendix B. Noise Reduction and Reverberation Time Algorithms 80 B .3 NOISE REDUCTION AND REVERBERATION T I M E ALGORITHMS APPLIED TO THE 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 0.6 0.7 0.8 0.9 1 Time [s] 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 dB. 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 dB 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 dB. The coefficient of regression, r 2 , and the interval of reverberation regression, Tx, are shown in Figure B.4. The coefficient of regression achieves a maximum value of 0.99882 at a time of 0.518 s, with a corresponding Tx of 34.6 dB. The upper time limit, can in fact, be estimated from the echogram (see 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. Noise Reduction and Reverberation Time Algorithms 82 B . 4 NOISE REDUCTION AND REVERBERATION T I M E ALGORITHMS APPLIED TO THE 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 in 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 2 , for each frequency component of an E D R without and with noise-reduction are visible in Figure B.9 and Figure B.10, respectively. As expected, the variability is reduced and the maximum coefficient of regression is pushed closer to unity. The interval of reverberation regression, Tx, is increased, in some cases substantially, after application of the noise reduction algorithm. A plot of Tx against / for the E D R of G E O G 200 without noise reduction is visible in Figure B . l l . The effect of the noise reduction algorithm is shown in Figure B.12. The average Tx has increased from about 15 dB to approximately 25 dB. The RT plots, without and with noise reduction, are graphed in Figures B.13 and B.14, respectively. The RT reverberation times, as defined in Section 3.6, are listed in Table B . l . As expected, the rever-beration 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 Noise Reduct ion 0 519 6 201 1 941 0.854 0.856 0.824 0.648 With Noise Reduct ion 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 83 1.672 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 dB. The major contour line indicates -60 dB. o 0.186 0.372 0.557 2 0.743 o E 0.929 1.115 13 1.486 1.672 1 Mr^V/xr—^ , 1 / \ / n. ... r ' 1 . / !.... AAJJVA I /if.u - y ^ V : 2756.3 5512.5 8268.8 11025 13781.3 16537.5 19293.8 Frequency [Hz] 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 dB. The major contour line indicates -60 dB. Appendix B. Noise Reduction and Reverberation Time Algorithms 84 1.672 Frequency [Hz] Time [s] Figure B.7: EDR plot of a measured impulse response of GEOG 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 13781.3 16537.5 19293.8 Frequency [Hz] Figure B.8: 2D EDR plot of a measured impulse response of GEOG 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 • W V i ry ! 1 1 i 102 103 10* Frequency [Hz] 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, Tx, for each frequency component of an E D R of G E O G 200, without noise reduction. 102 103 io" Frequency [Hz] Figure B.12: Plot of the maximum interval of reverberation regression, Tx, for each frequency component of an E D R of G E O G 200, with noise reduction. Appendix B. Noise Reduction and Reverberation Time Algorithms 87 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. Appendix C. Filter Specifications 88 APPENDIX C F ILTER 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 in a multirate design, with decima-tion/interpolation factors that are powers of 2. C . l LOWPASS DECIMATION FILTER 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 in Table C . l . T 1 i 1 r Normalized Frequency Figure C . l : Amplitude-frequency response of the lowpass Butterworth decimation filter. \ bo 3 454510e -005 Oo 1 000000e+000 h 3 109059e -004 O l -4 485559e+000 b2 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 2 90178?e -003 Oe 2 79927le+000 b7 1 243624e -003 a7 -7 666587e-001 ba 3 109059e -004 as 1 251796e-001 69 3 454510e -005 ag -9 262650e-003 Table C . l : Lowpass Butterworth decimation filter coefficients. Appendix C. Filter Specifications 89 C . 2 MULTIRATE 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 1 0 1 3 2 3 7 e - 0 0 4 a n 1 000000e+000 0 000000e+000 a i - 5 748772e+000 b2 - 3 0 3 9 7 l l e - 0 0 4 a 2 1 382940e+001 b3 0 000000e+000 a3 -1 781889e+001 bi 3 0 3 9 7 l l e - 0 0 4 f l 4 1 296967e+001 h 0 OOOOOOe+000 0 5 - 5 056305e+000 b6 -1 0 1 3 2 3 7 e - 0 0 4 de 8 2 4 9 0 7 2 e - 0 0 1 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. Filter Specifications 89 C . 2 MU 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 ANSI 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 1 013237e-004 ao 1 000000e+000 bi 0 000000e+000 m -5 748772e+000 02 -3 039711e-004 a 2 1 382940e+001 b3 0 000000e+000 a 3 -1 781889e+001 b 4 3 03971le-004 a 4 1 296967e+001 h 0 000000e+000 O B -5 056305e+000 be -1 013237e-004 06 8 249072e-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 90 Figure C.4: Phase response of the multirate Butterworth bandpass filter. Appendix C. Filter Specifications 91 C . 3 E L L I P T I C B A N D P A S S 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)/ u ] , where e = 0.007, and / ; and fu are the lower and upper octave band limits for the 1 kHz octave; 2. Maximum passband ripple of 0.20 dB; 3. Minimum of 50 dB 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 ELLIPTIC BANDPASS F I L T E R SPECIFICATIONS The coefficients for the multirate elliptic bandpass filter are listed in 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 b2 2 568156e--002 0 2 4 291176e+001 b3 -4 515518e--002 « 3 -1 121695e+002 b4 3 924997e--002 d 4 1 929013e+002 h 1 211167e--015 a 5 -2 280495e+002 be -3 924997e--002 a 6 1 876940e+002 b 7 4 515518e--002 a 7 -1 061954e+002 b 8 -2 568156e--002 as 3 952980e+001 b 9 7 727697e--003 ag -8 741745e+000 bio -9 852982e--004 a io 8 721464e-001 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 92 Figure C.7: Phase response of the multirate elliptic bandpass filter. Appendix C. Filter Specifications 93 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 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 a 0 1 000000e+000 bi -1 43 l l34e -002 a i -9 293791e+000 b 2 4 540110e -002 0.1 3 927846e+001 b3 -7 721215e -002 a 3 -9 938641e+001 64 6 578433e -002 04 1 667080e+002 65 3 783764e -016 a s -1 936773e+002 be -6 578433e -002 de 1 578255e+002 67 7 721215e -002 d7 -8 907834e+001 6 8 -4 540 l l0e -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 Table C.4: Elliptic bandpass filter coefficients for the 2 kHz octave-band. b o 4 087852e--003 a n 1 000000e+000 b i -2 379334e--002 a i -7 810844e+000 b 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 1 027633e+002 b 5 5 736572e--016 as -1 144760e+002 be -7 275245e--002 ae 9 210064e+001 b7 9 256518e--002 a7 -5 286470e+001 ba -6 238099e--002 as 2 074708e+001 b9 2 379334e--002 ag -5 040638e+000 bio -4 087852e--003 aio 5 788377e-001 Table C.5: Elliptic bandpass filter coefficients for the 4 kHz octave-band. Appendix C. Filter Specifications 94 60 9 425354e--003 an 1 000000e+000 bl -2 631228e--002 O l -3 989329e+000 62 4 330612e--002 d2 1 086773e+001 b3 -6 003573e--002 a3 -2 047279e+001 7 835923e--002 04 3 115580e+001 &5 -8 351654e--002 05 -3 765818e+001 be 8 215356e--002 ae 3 822042e+001 67 -8 351654e--002 a7 -3 161277e+001 fes 7 835923e--002 aB 2 194162e+001 09 -6 003573e--002 ag -1 205813e+001 bio 4 330612e--002 aio 5 344916e+000 bu -2 631228e--002 an -1 624481e+000 612 9 425354e--003 012 3 414831e-001 Table C.6: Elliptic bandpass filter coefficients for the 8 kHz octave-band. 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 AUDIO PROCESSING SDKs FOR MICROSOFT WINDOWS Digital audio processing has been around for decades. However, it was not until recently (1997) that full-featured 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 D I R E C T X A U D I O 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 D I R E C T S O U N D 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. Review of Current Audio Processing SDKs for Microsoft Windows 96 D . l . 3 D I R E C T M U S I C 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 MIDI (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 PCs and, in the process, has become a de facto standard. Creative remains on the forefront of P C audio technology and develops its Own SDKs , such as E A X . 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 dB 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 D I R S N D DirSnd is an outdated set of C + + wrappers for MS DirectSound developed in February 1997 by Tom Bouril of Creative Labs, Inc. Appendix D. Review of Current Audio Processing SDKs for Microsoft Windows 97 D.3 O P E N A L The OpenAL (Open Audio Library) [35] is a software interface to audio hardware. It provides an open-standard 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 Package Frequency Dependent Reverberat ion Octave-band Reverberat ion Comments D i rec tX 9.0 No No Not a v a i l a b l e f o r NT EAX 1.0 unknown No EAX 2.0 l i m i t e d No EAX 3.0 unknown unknown DirSnd No No OpenAL unknown unknown GAP No No Table D . l : Summary of the digital audio processing software development kits for the Microsoft Windows platform reviewed for this thesis. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

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>
                        
                    
IIIF logo 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

Comment

Related Items