Go to:
Title Page               Chapter 1           Appendix A   Appendix J
Copyright                Chapter 2           Appendix B   Appendix K
Abstract                 Chapter 3           Appendix C   Appendix L
Acknowledgements         Chapter 4           Appendix D   References
Table of Contents        Chapter 5           Appendix E
List of Figure           Conclusions/        Appendix F
List of Tables           Future Directions   Appendix G
List of Audio Examples                       Appendix H
List of Programs                             Appendix I


WAVELET SIGNAL PROCESSING OF DIGITAL AUDIO WITH APPLICATIONS IN ELECTRO-ACOUSTIC MUSIC


A Thesis

Submitted to the Faculty

in partial fulfillment of the requirements for the degree of

Master of Arts

in

Electro-acoustic Music


by

Corey Cheng

DARTMOUTH COLLEGE

Hanover, New Hampshire

May 31, 1996


Examining Committee:

(chairman) Larry Polansky

Charles Dodge

Geoff Davis




Edward Michael Berger

Dean of Graduate Studies




Copyright by

Corey Cheng

1996



Abstract



This thesis documents original applications of wavelet theory to digital audio signal processing for electro-acoustic musical purposes. A non-mathematical introduction to wavelets for the musician is given first, along with a brief description of previous work in wavelet theory and audio signal processing. A mathematical summary of multiresolution analysis, the heart of wavelet theory, is then presented. Three original applications of selected theoretical constructs in wavelet theory are then proposed and implemented. Specifically, the concepts of second-generation wavelet shrinkage, exponential decay of wavelet coefficients, and wideband-octave frequency decomposition are used to construct algorithms which denoise, spectrally enhance, and wideband-equalize digital audio, respectively.

A secondary goal of this thesis is to provide both the end-user and the C++ programmer with documented, publicly available tools that accomplish these audio-related, wavelet-based tasks. To this end, the MATLAB and GNU C++ environments are used to prototype and implement the three algorithms mentioned above on a Silicon Graphics Indy workstation. Audio examples of the output of these programs are presented along with each algorithm. Appendices document the development of the MATLAB code and C++ libraries which were used for these experiments. C++ classes for audio file (AIFF file format) I/O, interpolating and non-interpolating delay-line processing, real-time digital filtering (simple time-domain convolution), and real-time audio processing are discussed. In addition, a failed but instructional attempt at a C++ class that models a proposed wavelet file format (WAIFF - Wavelet Audio Interchange File Format) is discussed.


Acknowledgments



The author wishes to thank Professors Larry Polansky, Charles Dodge, Jon Appleton, Eric Hansen, and Geoff Davis for all of their help with the technical and conceptual development of the ideas contained in this thesis.

In addition, the author wishes to thank fellow graduate students Martin Dupras, Timothy Polashek, and Scott Lawrence for all of their informal discussions on audio and musical signal processing.

This thesis is dedicated to Angelo S. DiDomenico of Framingham (North) High School, Framingham, Massachusetts, who will be retiring at the end of the 1996 academic year. ìThe rest is trivial.î


Table of Contents



Abstractii
Acknowledgmentsiii
Table of Contentsiv
List of Figuresvi
List of Tablesvii
List of Audio Examples on accompanying CDviii
List of Programsix

***

Chapter 1 Non-mathematical, introductory analogy of wavelet theory to fugue analysis and storywriting for the musician 1
Chapter 2 Non-mathematical, introductory analogy of wavelet theory to fugue analysis and storywriting for the musician 23
Chapter 3 Mathematical summary of multiresolution analysis and relevant wavelet theory 45
Chapter 4 Second generation wavelet shrinkage: a comparison of the lifting scheme and circular convolution in the denoising of digital audio 59
Chapter 5 Using the wideband-octave decomposition of wavelet analysis to achieve wideband equalization of digital audio 71
Conclusions and Future Directions 90

***

Appendix A Technical notes on the equipment and software used in this thesis. 92
Appendix B Guidelines on compiling and using the software utilities created for this thesis 95
Appendix C Forward and inverse wavelet transform code for both the lifted and circular convolution methods 96
Appendix D C++ source code for programs used in Chapter 3 117
Appendix E C++ source code for program used in Chapter 4 127
Appendix F C++ source code for program used in Chapter 5 134
Appendix G class Aiff_file, code for a C++ class which models AIFF (Audio Interchange File Format) I/O 152
Appendix H class Waiff_file, code for a C++ class which models a possible wavelet file format (WAIFF - Wavelet Audio Interchange File Format) 224
Appendix I class Audio_port, code for a C++ class which models real-time audio input/output 251
Appendix J class Delayline, code for a C++ class which models an interpolating and non-interpolating delay line 267
Appendix K class Filter, code for a C++ class which models a real-time, time-domain digital filtering (convolution) of digital audio 290
Appendix L Prototype MATLAB code with examples 302
References 339


List of Figures



FigureDescription
Page
1.1Comparison of different time/frequency resolutions in Fourier Analysis.
3
1.2Fourier analysis of a sharp transient.
4
1.3Wavelet-based analysis of a sharp transient.
5
1.4Mother wavelet and daughter wavelet shapes for different levels of a wavelet analysis.
7
1.5J.S. Bach, Von Himmel Hoch, Variation No. 4 (manuals only).

Illustration of augmentation in a fugue.

10
1.6J.S. Bach, The Art of the Fugue, Canon No. 1.

Illustration of augmentation in a lower register than the theme's register.

11
1.7J.S. Bach, The Art of the Fugue, Fugue No. 6.

Graphical comparison of augmentation in a lower register to wavelet analysis. Overlay of wavelet grid on standard musical notation.

13
1.8Non-fugal example of wavelet-like analysis using standard musical notation
14
1.9Wavelet analysis of music in Figure 1.8
14
1.10Construction of a simple story with text-based scaling functions.
18
2.1Recursive, digital filterbank configurations for the forward and inverse dyadic wavelet transforms.
24
3.1Denoising using wavelet analysis
47
4.1Exponential decay of wavelet coefficients across analysis levels.
63
4.2Spectral enhancement algorithm.
66
5.1Wavelet-based equalization
72
5.2Time-domain view of level 0 analysis coefficients using the 5/3 binary coefficient filterbank; produced using the equalize program.
77
5.3Time-domain view of level 0 analysis coefficients using the 6/10 binary coefficient filterbank; produced using the equalize program.
78
5.4Time-domain view of level 1 analysis coefficients using the 5/3 binary coefficient filterbank; produced using the equalize program.
79
5.5Time-domain view of level 1 analysis coefficients using the 6/10 binary coefficient filterbank; produced using the equalize program.
80
Conc. 1A proposed waveshaping instrument that uses wavelet analysis as a control mechanism for the transfer function (lookup table)
91



List of Tables



TableDescription
Page
2.1Wavelet coefficients for several analysis and resynthesis filters used in this thesis
44
2.2Number of vanishing moments for the filters listed in Table 2.1
44
3.1List of audio examples using circular convolution denoising
56
3.2List of audio examples using the lifted, interpolating wavelet denoising algorithm
57
4.1List of audio examples using the spectral enhancement algorithm
69
5.1List of audio examples using the equalize program. Listening to individual levels of wavelet coefficients.
74-75
5.2List of audio examples using the equalize program.

Time-varying equalization for compositional purposes.

81
C.1Structure of an input data block to flwt(),a C++ function that performs the fast forward, lifted wavelet transform.
98
C.2Structure of an output data block processed by flwt(), a C++ function that performs the fast forward, lifted wavelet transform.
98
C.3Structure of an input data block to iflwt(),a C++ function that performs the fast inverse, lifted wavelet transform.
100
C.4Structure of an output data block processed by iflwt(),

a C++ function that performs the fast inverse, lifted wavelet transform.

100
C.5Structure of an input data block to fwt(), a C++ function that performs the fast forward, circular convolution wavelet transform.
102
C.6Structure of an output data block processed by fwt(),

a C++ function that performs the fast forward, circular convolution wavelet transform.

102
C.7Structure of an input data block to ifwt(), a C++ function that performs the fast inverse, circular convolution wavelet transform.
104
C.8Structure of an output data block processed by ifwt(),

a C++ function that performs the fast inverse, circular convolution wavelet transform.

104
F.1A wavelet-based graphic equalizer's band characteristics
136
G.1Names and descriptions of C++ programs that use

class Aiff_file

161
H.1Names and descriptions of C++ programs that use

class WAiff_file

230
I.1Names and descriptions of C++ programs that use

class Audio_port

256
J.1Names and descriptions of C++ programs that use

class Delayline

271
K.1Names and descriptions of C++ programs that use

class Filter

294


List of Audio Examples on accompanying CD



All audio examples can be found on the accompanying CD, "Wavelet signal processing of digital audio with applications in electro-acoustic music."

I. Denoising using binary wavelets
CD Track #Audio example Artistwindow sizeiterations threshold
13.1Martin Dupras originalnoisysample
23.2Martin Dupras 327682100
33.3Martin Dupras 327684100
43.4Martin Dupras 327688100
53.5Martin Dupras 327681230
63.6Martin Dupras 327681270
73.7Martin Dupras 3276812200
83.8Martin Dupras 32768125000







II. Denoising using lifted, interpolated wavelets
CD Track #Audio example Artistwindow sizeiterations vanishing indexvanishing moments = (2 * vanishing index) - 1 threshold
93.9Martin Dupras 3276822 3100
103.10Martin Dupras 3276842 3100
113.11Martin Dupras 3276882 3100
123.12Martin Dupras 32768122 330
133.13Martin Dupras 32768122 370
143.14Martin Dupras 32768122 3200
153.15Martin Dupras 32768122 35000
163.16Martin Dupras 32768123 5100
173.17Martin Dupras 32768124 7100

III. Spectral Enhancement / Excitation
CD Track #Audio example Artist / title of excerptversion
184.1Peter Gabriel / In Your Eyes original 44.1kHz file
194.2 normalized 11.025 kHz file
204.3 normalized, spectrally enhanced 44.1kHz file
214.4Disney, Little Mermaid /

Kiss the Girl

original 44.1kHz file
224.5 normalized 11.025 kHz file
234.6 normalized, spectrally enhanced 44.1kHz file
244.7Peter Gabriel / Red Rain original 44.1kHz file
254.8 normalized 11.025 kHz file
264.9 normalized, spectrally enhanced 44.1kHz file
274.10J.C. Risset / Inharmonique original 44.1kHz file
284.11 normalized 11.025 kHz file
294.12 normalized, spectrally enhanced 44.1kHz file
304.13Murder, Inc. / Mania original 44.1kHz file
314.14 normalized 11.025 kHz file
324.15 normalized, spectrally enhanced 44.1kHz file
334.16Killing Joke / White Out original 44.1kHz file
344.17 normalized 11.025 kHz file
354.18 normalized, spectrally enhanced 44.1kHz file
364.19Murder, Inc. /

Mr. Whiskey's Name

original 44.1kHz file
374.20 normalized 11.025 kHz file
384.21 normalized, spectrally enhanced 44.1kHz file
394.22Corey Cheng / Woods original 44.1kHz file
404.23 normalized 11.025 kHz file
414.24 normalized, spectrally enhanced 44.1kHz file

IV. Listening to individual levels of wavelet coefficients

CD

Track #

Audio exampleArtist / Title DescriptionApproximate Band characteristics of this level of coefficients at a sampling rate of 44.1kHz (given in Hz) Control file usedWavelet Filters used / vanishing moments (see tables 2.1 and 2.2)
425.1 (White noise)original file
435.2 " level 0 "final average"

coeffs only

0 - 689.062solo.level0_of_5.eq 6/10, 2/2
445.3 " level 1 wavelet

coefficients only

689.062 - 1378.12solo.level1_of_5.eq 6/10, 2/2
455.4 " level 2 wavelet

coefficients only

1378.12 - 2756.25solo.level2_of_5.eq 6/10, 2/2
465.5 " level 3 wavelet

coefficients only

2756.25 - 5512.5solo.level3_of_5.eq 6/10, 2/2
475.6 " level 4 wavelet

coefficients only

5512.5 - 11025.0solo.level4_of_5.eq 6/10, 2/2
485.7 " level 5 wavelet

coefficients only

11025.0 - 22050.0solo.level5_of_5.eq 6/10, 2/2
495.8 Hootie and the Blowfish /

Only Wanna Be With You

original file
505.9 " level 0 "final average"

coeffs only

0 - 689.062solo.level0_of_5.eq 6/10, 3/3
515.10 " level 1 wavelet

coefficients only

689.062 - 1378.12solo.level1_of_5.eq 6/10, 3/3
525.11 " level 2 wavelet

coefficients only

1378.12 - 2756.25solo.level2_of_5.eq 6/10, 3/3
535.12 " level 3 wavelet

coefficients only

2756.25 - 5512.5solo.level3_of_5.eq 6/10, 3/3
545.13 " level 4 wavelet

coefficients only

5512.5 - 11025.0solo.level4_of_5.eq 6/10, 3/3
555.14 " level 5 wavelet

coefficients only

11025.0 - 22050.0solo.level5_of_5.eq 6/10, 3/3

CD

Track #

Audio exampleArtist / Title DescriptionApproximate Band characteristics of this level of coefficients at a sampling rate of 44.1kHz (given in Hz) Control file usedWavelet Filters used / vanishing moments (see tables 2.1 and 2.2)
565.15 Bye Bye Birdie Soundtrack / Honestly Sincere original file
575.16 " level 0 "final average"

coeffs only

0 - 689.062solo.level0_of_5.eq 6/10, 3/3
585.17 " level 1 wavelet

coefficients only

689.062 - 1378.12solo.level1_of_5.eq 6/10, 3/3
595.18 " level 2 wavelet

coefficients only

1378.12 - 2756.25solo.level2_of_5.eq 6/10, 3/3
605.19 " level 3 wavelet

coefficients only

2756.25 - 5512.5solo.level3_of_5.eq 6/10, 3/3
615.20 " level 4 wavelet

coefficients only

5512.5 - 11025.0solo.level4_of_5.eq 6/10, 3/3
625.21 " level 5 wavelet

coefficients only

11025.0 - 22050.0solo.level5_of_5.eq 6/10, 3/3
635.22 Sting / Fields of Gold original file
645.23 " level 0 "final average"

coeffs only

0 - 689.062solo.level0_of_5.eq 6/10, 3/3
655.24 " level 1 wavelet

coefficients only

689.062 - 1378.12solo.level1_of_5.eq 6/10, 3/3
665.25 " level 2 wavelet

coefficients only

1378.12 - 2756.25solo.level2_of_5.eq 6/10, 3/3
675.26 " level 3 wavelet

coefficients only

2756.25 - 5512.5solo.level3_of_5.eq 6/10, 3/3
685.27 " level 4 wavelet

coefficients only

5512.5 - 11025.0solo.level4_of_5.eq 6/10, 3/3
695.28 " level 5 wavelet

coefficients only

11025.0 - 22050.0solo.level5_of_5.eq 6/10, 3/3
705.29 Sting / Fields of Gold original file
715.30 " level 0 "final average"

coeffs only

0 - 689.062solo.level0_of_5.eq 5/3, 2/2
725.31 " level 1 wavelet

coefficients only

689.062 - 1378.12solo.level1_of_5.eq 5/3, 2/2
735.32 " level 2 wavelet

coefficients only

1378.12 - 2756.25solo.level2_of_5.eq 5/3, 2/2
745.33 " level 3 wavelet

coefficients only

2756.25 - 5512.5solo.level3_of_5.eq 5/3, 2/2
755.34 " level 4 wavelet

coefficients only

5512.5 - 11025.0solo.level4_of_5.eq 5/3, 2/2
765.35 " level 5 wavelet

coefficients only

11025.0 - 22050.0solo.level5_of_5.eq 5/3, 2/2

V. Time-varying wavelet-based equalization
CD Track #Audio example Artist / TitleDescription Control file used
775.36Hootie and the Blowfish /

Only Wanna Be With You

original filetime_varying.eq
785.37" processed filetime_varying.eq
795.38Sting / Fields of Gold original filetime_varying.eq
805.39" processed filetime_varying.eq
815.40Killing Joke / White Out original filetime_varying.eq
825.41" processed filetime_varying.eq
835.42Murder, Inc. /

Mr. Whiskey's Name

original filetime_varying.eq
845.43" processed filetime_varying.eq

VI. Delayline usage
CD Track #Audio example filedescription
N/AN/Adelaytest2.cc non-audio testing of class Delayline for floating point values
N/AN/Adelaytest3.cc test of class Delayline for stereo audio data
85j.1delaytest4.cc four channel chorusing example, original file (Palestrina)
86j.2delaytest4.cc four channel chorusing example. stereo mixdown of deep quad chorusing of soundfile (Palestrina)
87j.3delaytest5.cc exhibition of high-frequency attenuation of noise due to non-integral sample delay tap. original file (white noise)
88j.4delaytest5.cc exhibition of high-frequency attenuation of noise due to non-integral sample delay tap. processed file (white noise)
89j.5ac_test4.cc implementation of Perry Cook's slide flute
90j.6ac_test4a.cc implementation of Perry Cook's slide flute with time-varying parameters
91j.7granular.cc application of granular synthesis for time-stretching purposes. original file (Beethoven)
92j.8granular.cc application of granular synthesis for time-stretching purposes. processed file (Beethoven)
93j.9granular.cc application of granular synthesis for time-compression purposes. original file (Palestrina)
94j.10granular.cc application of granular synthesis for time-compression purposes. processed file (Palestrina)

VII. Filter usage
CD Track #Audio example filedescription
95k.1filter_test.cc demonstration of low pass filtering on an existing soundfile. original soundfile (Beethoven)
96k.2filter_test.cc demonstration of low pass filtering on an existing soundfile. processed soundfile (Beethoven)
N/AN/Afilter_test2.cc demonstration of different types of filters (low-pass, high-pass, notch) working on real-time audio input


List of programs



Program nameDescription Page of source code listing Audio example (if available)
normal_wavelet_transform.hcontains definitions for fwt() and ifwt() , functions that perform the wavelet transform with circular convolution 106
lifted_wavelet_transforms.hcontains definitions for flwt() , iflwt() , and interpolate() , functions that perform the interpolated, lifted transform 110
equalizeWavelet-based equalization program. 1405.1 - 5.43
spectral_enhanceWavelet-based spectral enhancement program. Adds high frequencies to low-sample-rate digital audio files. 1294.1 - 4.24
circ_conv_wavelet_denoiseWavelet-based denoising program that uses standard circular convolution for the analysis/resynthesis digital filters. 1243.1 - 3.8
lifted_wavelet_denoiseWavelet-based denoising program that uses lifted, interpolated wavelets. 1213.9 - 3.17
ac.hcontains declaration for

class Aiff_file

162
ac.error.cccontains declarations for error messages used by class Aiff_file and other classes 171
ac.cccontains definitions for member functions of class Aiff_file 173
ac_testdemonstrates constructors, prints soundfile information 205
ac_test2demonstrates file copying with read_frames and write_frames 206
ac_test3rudimentary one-zero filter with class Delayline (see appendix K) 208
ac_test4implementation of Perry Cook's slide flute with class Aiff_file 209j.5
ac_test4aimplementation of Perry Cook's slide flute with time dependent parameters 211j.6

Program nameDescription Page of source code listing Audio example (if available)
ac_test5more tests of the read_frames and write_frames functions 213
ac_test7more tests of the read_frames and write_frames functions 214
ac_test8transport controls demonstrations 216
ac_test9more testing of transport controls 218
ac_test104 and 8 channel i/o tests 220
ac_test11testing backwards reading of files 222
ac_test12testing backwards reading of files for sample bitwidths other than 16 223
ac3.hcontains declaration for

class WAiff_file

231
ac3.cccontains definition for member functions of

class WAiff_file

236
waiff_test.cccontains a test driver program for

class WAiff_file

248
ac2.hcontains declaration and definition for class Audio_port 257
audio_port_testdemonstration of floating point and integer sample I/O 262
audio_port_test2example of real-time digital filtering with class Filter 264
delayline.hcontains declaration and definition for class Delayline 273
delaytest2non-audio testing of class Delayline for floating point values 277
delaytest3test of class Delayline for stereo data 278
delaytest4class Delayline is used to implement four-channel chorusing of a stereo soundfile 281j.1, j.2
delaytest5exhibition of high-frequency attenuation of noise due to linear interpolation 283j.3, j.4
granularimplementation of simple granular synthesis using multiple delay lines 288j.7, j.8, j.9, j.10
filter.hcontains definitions for member functions of class Filter 295
filter_testdemonstration of low pass filtering on an existing soundfile 298k.1, k.2
filter_test2demonstration of different types of filters (low-pass, high-pass, notch) working on real-time audio input 299


Go to:
Title Page               Chapter 1           Appendix A   Appendix J
Copyright                Chapter 2           Appendix B   Appendix K
Abstract                 Chapter 3           Appendix C   Appendix L
Acknowledgements         Chapter 4           Appendix D   References
Table of Contents        Chapter 5           Appendix E
List of Figure           Conclusions/        Appendix F
List of Tables           Future Directions   Appendix G
List of Audio Examples                       Appendix H
List of Programs                             Appendix I