Docsity

Digital Audio signal processing, Lecture notes of Digital Signal Processing

Partial preview of the text

Download Digital Audio signal processing and more Lecture notes Digital Signal Processing in PDF only on Docsity!

Digital Audio Signal Processing

Second Edition

Udo Zölzer

Helmut Schmidt University, Hamburg, Germany

A John Wiley & Sons, Ltd, Publication

Contents

Preface to the Second Edition ix

  • 1 Introduction Preface to the First Edition xi
    • 1.1 Studio Technology
    • 1.2 Digital Transmission Systems
    • 1.3 Storage Media
    • 1.4 Audio Components at Home
    • References
  • 2 Quantization
    • 2.1 Signal Quantization
      • 2.1.1 Classical Quantization Model
      • 2.1.2 Quantization Theorem
      • 2.1.3 Statistics of Quantization Error
    • 2.2 Dither
      • 2.2.1 Basics
      • 2.2.2 Implementation
      • 2.2.3 Examples
    • 2.3 Spectrum Shaping of Quantization – Noise Shaping
    • 2.4 Number Representation
      • 2.4.1 Fixed-point Number Representation
      • 2.4.2 Floating-point Number Representation
      • 2.4.3 Effects on Format Conversion and Algorithms
    • 2.5 Java Applet – Quantization, Dither, and Noise Shaping
    • 2.6 Exercises
    • References
  • 3 AD/DA Conversion
    • 3.1 Methods
      • 3.1.1 Nyquist Sampling
      • 3.1.2 Oversampling
      • 3.1.3 Delta-sigma Modulation
    • 3.2 AD Converters vi Contents
      • 3.2.1 Specifications
      • 3.2.2 Parallel Converter
      • 3.2.3 Successive Approximation
      • 3.2.4 Counter Methods
      • 3.2.5 Delta-sigma AD Converter
    • 3.3 DA Converters
      • 3.3.1 Specifications
      • 3.3.2 Switched Voltage and Current Sources
      • 3.3.3 Weighted Resistors and Capacitors
      • 3.3.4 R-2R Resistor Networks
      • 3.3.5 Delta-sigma DA Converter
    • 3.4 Java Applet – Oversampling and Quantization
    • 3.5 Exercises
    • References
  • 4 Audio Processing Systems
    • 4.1 Digital Signal Processors
      • 4.1.1 Fixed-point DSPs
      • 4.1.2 Floating-point DSPs
    • 4.2 Digital Audio Interfaces
      • 4.2.1 Two-channel AES/EBU Interface
      • 4.2.2 MADI Interface
    • 4.3 Single-processor Systems
      • 4.3.1 Peripherals
      • 4.3.2 Control
    • 4.4 Multi-processor Systems
      • 4.4.1 Connection via Serial Links
      • 4.4.2 Connection via Parallel Links
      • 4.4.3 Connection via Standard Bus Systems
      • 4.4.4 Scalable Audio System
    • References
  • 5 Equalizers
    • 5.1 Basics
    • 5.2 Recursive Audio Filters
      • 5.2.1 Design
      • 5.2.2 Parametric Filter Structures
      • 5.2.3 Quantization Effects
    • 5.3 Nonrecursive Audio Filters
      • 5.3.1 Basics of Fast Convolution
      • 5.3.2 Fast Convolution of Long Sequences
      • 5.3.3 Filter Design by Frequency Sampling
    • 5.4 Multi-complementary Filter Bank
      • 5.4.1 Principles
      • 5.4.2 Example: Eight-band Multi-complementary Filter Bank
    • 5.5 Java Applet – Audio Filters Contents vii
    • 5.6 Exercises
    • References
  • 6 Room Simulation
    • 6.1 Basics
      • 6.1.1 Room Acoustics
      • 6.1.2 Model-based Room Impulse Responses
      • 6.1.3 Measurement of Room Impulse Responses
      • 6.1.4 Simulation of Room Impulse Responses
    • 6.2 Early Reflections
      • 6.2.1 Ando’s Investigations
      • 6.2.2 Gerzon Algorithm
    • 6.3 Subsequent Reverberation
      • 6.3.1 Schroeder Algorithm
      • 6.3.2 General Feedback Systems
      • 6.3.3 Feedback All-pass Systems
    • 6.4 Approximation of Room Impulse Responses
    • 6.5 Java Applet – Fast Convolution
    • 6.6 Exercises
    • References
  • 7 Dynamic Range Control
    • 7.1 Basics
    • 7.2 Static Curve
    • 7.3 Dynamic Behavior
      • 7.3.1 Level Measurement
      • 7.3.2 Gain Factor Smoothing
      • 7.3.3 Time Constants
    • 7.4 Implementation
      • 7.4.1 Limiter
      • 7.4.2 Compressor, Expander, Noise Gate
      • 7.4.3 Combination System
    • 7.5 Realization Aspects
      • 7.5.1 Sampling Rate Reduction
      • 7.5.2 Curve Approximation
      • 7.5.3 Stereo Processing
    • 7.6 Java Applet – Dynamic Range Control
    • 7.7 Exercises
    • References
  • 8 Sampling Rate Conversion
    • 8.1 Basics
      • 8.1.1 Upsampling and Anti-imaging Filtering
      • 8.1.2 Downsampling and Anti-aliasing Filtering
    • 8.2 Synchronous Conversion
    • 8.3 Asynchronous Conversion viii Contents
      • 8.3.1 Single-stage Methods
      • 8.3.2 Multistage Methods
      • 8.3.3 Control of Interpolation Filters
    • 8.4 Interpolation Methods
      • 8.4.1 Polynomial Interpolation
      • 8.4.2 Lagrange Interpolation
      • 8.4.3 Spline Interpolation
    • 8.5 Exercises
    • References
  • 9 Audio Coding
    • 9.1 Lossless Audio Coding
    • 9.2 Lossy Audio Coding
    • 9.3 Psychoacoustics
      • 9.3.1 Critical Bands and Absolute Threshold
      • 9.3.2 Masking
    • 9.4 ISO-MPEG-1 Audio Coding
      • 9.4.1 Filter Banks
      • 9.4.2 Psychoacoustic Models
      • 9.4.3 Dynamic Bit Allocation and Coding
    • 9.5 MPEG-2 Audio Coding
    • 9.6 MPEG-2 Advanced Audio Coding
    • 9.7 MPEG-4 Audio Coding
    • 9.8 Spectral Band Replication
    • 9.9 Java Applet – Psychoacoustics
    • 9.10 Exercises
    • References
  • Index

Preface to the Second Edition

This second edition represents a revised and extended version and offers an improved description besides new issues and extended references. The contents of this book are the basis of a lecture on Digital Audio Signal Processing at the Hamburg University of Technology (TU Hamburg-Harburg) and a lecture on Multimedia Signal Processing at the Helmut Schmidt University, Hamburg. For further studies you can find interactive audio demonstrations, exercises and Matlab examples on the web site

http://ant.hsu-hh.de/dasp/ Besides the basics of digital audio signal processing introduced in this second edition, further advanced algorithms for digital audio effects can be found in the book DAFX – Digital Audio Effects (Ed. U. Zölzer) with the related web site

http://www.dafx.de My thanks go to Professor Dieter Leckschat, Dr. Gerald Schuller, Udo Ahlvers, Mijail Guillemard, Christian Helmrich, Martin Holters, Dr. Florian Keiler, Stephan Möller, Francois-Xavier Nsabimana, Christian Ruwwe, Harald Schorr, Dr. Oomke Weikert, Catja Wilkens and Christian Zimmermann.

Udo Zölzer Hamburg, June 2008

Preface to the First Edition

Digital audio signal processing is employed in recording and storing music and speech signals, for sound mixing and production of digital programs, in digital transmission to broadcast receivers as well as in consumer products like CDs, DATs and PCs. In the latter case, the audio signal is in a digital form all the way from the microphone right up to the loudspeakers, enabling real-time processing with fast digital signal processors. This book provides the basis of an advanced course in Digital Audio Signal Processing which I have been giving since 1992 at the Technical University Hamburg-Harburg. It is directed at students studying engineering, computer science and physics and also for professionals looking for solutions to problems in audio signal processing like in the fields of studio engineering, consumer electronics and multimedia. The mathematical and theoretical fundamentals of digital audio signal processing systems will be presented and typical applications with an emphasis on realization aspects will be discussed. Prior knowledge of systems theory, digital signal processing and multirate signal processing is taken as a prerequisite. The book is divided into two parts. The first part (Chapters 1–4) presents a basis for hardware systems used in digital audio signal processing. The second part (Chapters 5–9) discusses algorithms for processing digital audio signals. Chapter 1 describes the course taken by an audio signal from its recording in a studio up to its reproduction at home. Chapter 2 contains a representation of signal quantization, dither techniques and spectral shaping of quantization errors used for reducing the nonlinear effects of quantization. In the end, a comparison is made between the fixed-point and floating- point number representations as well as their associated effects on format conversion and algorithms. Chapter 3 describes methods for AD/DA conversion of signals, starting with Nyquist sampling, methods for oversampling techniques and delta-sigma modulation. The chapter closes with a presentation of some circuit design of AD/DA converters. After an introduction to digital signal processors and digital audio interfaces, Chapter 4 describes simple hardware systems based on a single- and multiprocessor solutions. The algorithms introduced in the following Chapters 5–9 are, to a great extent, implemented in real-time on hardware platforms presented in Chapter 4. Chapter 5 describes digital audio equalizers. Apart from the implementation aspects of recursive audio filters, nonrecursive linear phase filters based on fast convolution and filter banks are introduced. Filter designs, parametric filter structures and precautions for reducing quantization errors in recursive filters are dealt with in detail. Chapter 6 deals with room simulation. Methods for simulation of artificial room impulse response and methods for approximation of measured impulse responses

xii Preface to the First Edition

are discussed. In Chapter 7 the dynamic range control of audio signals is described. These methods are applied at several positions in the audio chain from the microphone up to the loudspeakers in order to adapt to the dynamics of the recording, transmission and listening environment. Chapter 8 contains a presentation of methods for synchronous and asynchronous sampling rate conversion. Efficient algorithms are described which are suitable for real-time processing as well as off-line processing. Both lossless and lossy audio coding are discussed in Chapter 9. Lossless audio coding is applied for storing of higher word-lengths. Lossy audio coding, on the other hand, plays a significant role in communication systems. I would like to thank Prof. Fliege (University of Mannheim), Prof. Kammeyer (University of Bremen) and Prof. Heute (University of Kiel) for comments and support. I am also grateful to my colleagues at the TUHH and especially Dr. Alfred Mertins, Dr. Thomas Boltze, Dr. Bernd Redmer, Dr. Martin Schönle, Dr. Manfred Schusdziarra, Dr. Tanja Karp, Georg Dickmann, Werner Eckel, Thomas Scholz, Rüdiger Wolf, Jens Wohlers, Horst Zölzer, Bärbel Erdmann, Ursula Seifert and Dieter Gödecke. Apart from these, I would also like to say a word of gratitude to all those students who helped me in carrying out this work successfully. Special thanks go to Saeed Khawaja for his help during translation and to Dr. Anthony Macgrath for proof-reading the text. I also would like to thank Jenny Smith, Colin McKerracher, Ian Stoneham and Christian Rauscher (Wiley). My special thanks are directed to my wife Elke and my daughter Franziska.

Udo Zölzer Hamburg, July 1997

2 Introduction

Digital Transmission

Digital Mixing ConsoleDigital Storage Media

Audio System (CD,DVD, Radio,PC)

Concert hall Audio studio

Living room Automobile PC

Figure 1.1 Signal processing for recording, storage, transmission and reproduction.

multichannel MADI interfaces to the mixing console. The final stereo mix is stored via a two-channel AES/EBU interface [AES92] on a two-channel MASTER machine. External appliances for effects or room simulators are also connected to the mixing console via a two-channel AES/EBU interface. All systems are synchronized by a MASTER clock reference. In digital audio technology, the sampling rates^1 fS = 48 kHz for professional studio technology, fS = 44 .1 kHz for compact disc and fS = 32 kHz for broadcasting applications are established. In addition, multiples of these sampling frequencies such as

  1. 2 , 96 , 176 .4, and 192 kHz are used. The sound mixing console plays a central role in a digital sound studio. Figure 1.3 shows the functional units. The N input signals are processed individually. After level and panorama control, all signals are summed up to give a stereo mix. The summation is carried out several times so that other auxiliary stereo and/or mono signals are available for other purposes. In a sound channel (see Fig. 1.4), an equalizer unit (EQ), a dynamic unit (DYN), a delay unit (DEL), a gain element (GAIN) and a panorama element (PAN) are used. In addition to input and output signals in an audio channel, inserts as well as auxiliary or direct outputs are required.

1.2 Digital Transmission Systems

In this section digital transmission will be briefly explained. Besides the analog wireless broadcasting systems based on amplitude and frequency modulation, DAB^2 (Digital Audio Broadcasting) has been introduced in several countries [Hoe01]. On the other hand, the internet has pushed audio/video distribution, internet radio and video via cable networks.

Terrestrial Digital Broadcasting (DAB)

With the introduction of terrestrial digital broadcasting, the quality standards of a compact disc will be achieved for mobile and stationary reception of radio signals [Ple91]. Therefore, the data rate of a two-channel AES/EBU signal from a transmitting studio is reduced with the help of a source coder [Bra94] (see Fig. 1.5). Following the source coder (SC), additional information (AI) like the type of program (music/speech) and

(^1) Data rate 16 bit × 48 kHz = 768 kbit/s; data rate (AES/EBU signal) 2 × ( 24 + 8 ) bit × 48 kHz = 3 .072 Mbit/s; data rate (MADI signal) 56 × ( 24 + 8 ) bit × 48 kHz = 86 .016 Mbit/s. (^2) http://www.worlddab.org/.

1.2 Digital Transmission Systems 3

MASTERSYNC GENERATOR

MASTERSYNC GENERATOR

ROOM SIMULATOR

DIGITAL MULTITRACK HARD DISC RECORDER

AES/EBU

AES/EBU DIGITAL MIXING CONSOLEDIGITAL MIXING CONSOLE

DIGITAL STEREO MASTER MACHINE

MADI AES/EBU

DIGITAL SIGNALS

AES/EBU -> MADICONVERSION

MADI

ANALOG SIGNALS

ANALOG-to-DIGITALCONVERSION

MADI

EFFECTS

Figure 1.2 Digital sound studio.

Pegel-Steller

Panorama-Steller

Summe Links

Summe Rechts

SP 1

SP 2

SP N

Signal Processing:

Digital Inputs 1.. N

Equalizer Unit Dynamics Unit Delay Unit

1 2 N

Gain Control

Pan Control

Left Channel

Right Channel

Stereo Output

Stereo Auxiliaries

Figure 1.3 N-channel sound mixing console.

traffic information is added. A multicarrier technique is applied for digital transmission to stationary and mobile receivers. At the transmitter, several broadcasting programs are combined in a multiplexer (MUX) to form a multiplex signal. The channel coding and

1.2 Digital Transmission Systems 5

one broad-band transmitting signal. The synthesis filter bank has several complex-valued input signals and one complex-valued output signal. The real-valued band-pass signal is obtained by modulating with e j ωc^ t^ and taking the real part. At the receiver, the complex- valued base-band signal is obtained by demodulation followed by low-pass filtering. The complex-valued analysis filter bank provides the complex-valued band-pass signals from which the ISO-MPEG1 frame is formed after frequency and time deinterleaving and channel decoding. The PCM signal is combined using the synthesis filter bank after extracting the subband signals from the frame.

ω

ω ω

ω ω

ω

ω

Figure 1.7 Filter banks within DAB.

DAB Transmission Technique. The special problems of mobile communications are dealt with using a combination of the OFDM transmission technique with DPSK modulation and time and frequency interleaving. Possible disturbances are minimized by consecutive channel coding. The schematic diagram in Fig. 1.8 shows the relevant subsystems. For example, the transmission of a program P 1 which is delivered as an ISO-MPEG stream is shown in Fig. 1.8. The channel coding doubles the data rate. The typical characteristics of a mobile communication channel like time and frequency selectivity are handled by using time and frequency interleaving with the help of a multicarrier technique.

6 Introduction

Figure 1.8 DAB transmission technique.

The burst disturbances of consecutive bits are reduced to single bit errors by spreading the bits over a longer period of time. The narrow-band disturbances affect only individual carriers by spreading the transmitter program P 1 in the frequency domain, i.e. distribution of transmitter programs of carrier frequencies at a certain displacement. The remaining disturbances of the mobile channel are suppressed with the help of channel coding, i.e. by adding redundancy, and decoding with a Viterbi decoder. The implementation of an OFDM transmission is discussed in the following.