Connexions

You are here: Home » Content » Reverberation
Content Actions
Lenses

What is a lens?

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

This content is ...
In these lenses
  • This module is included inLens: Digital Signal Processing with NI LabVIEW and the National Instruments Platform
    By: Sam ShearmanAs a part of collection:"Musical Signal Processing with LabVIEW (All Modules)"

    Comments:

    "This online course covers signal processing concepts using music and audio to keep the subject relevant and interesting. Written by Prof. Ed Doering from the Rose-Hulman Institute of Technology, […]"

    Click the "NI Signal Processing" link to see all content selected in this lens.

    NI Signal Processing
Tags

(?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Reverberation

Module by: Ed Doering

Summary: Reverberation is a property of concert halls that greatly adds to the enjoyment of a musical performance. Sound waves propagate directly from the stage to the listener, and also reflect from the floor, walls, ceiling, and back wall of the stage to create myriad copies of the direct sound that are time-delayed and reduced in intensity. In this module, learn about the concept of reverberation in more detail and ways to emulate reverberation using a digital filter structure known as a comb filter.

LabVIEWq.png This module refers to LabVIEW, a software development environment that features a graphical programming language. Please see the LabVIEW QuickStart Guide module for tutorials and documentation that will help you:
• Apply LabVIEW to Audio Signal Processing
• Get started with LabVIEW
• Obtain a fully-functional evaluation edition of LabVIEW

Introduction

Reverberation is a property of concert halls that greatly adds to the enjoyment of a musical performance. The on-stage performer generates sound waves that propagate directly to the listener's ear. However, sound waves also bounce off the floor, walls, ceiling, and back wall of the stage, creating myriad copies of the direct sound that are time-delayed and reduced in intensity.
In this module, learn about the concept of reverberation in more detail and ways to emulate reverberation using a digital filter structure known as a comb filter.
The Figure 1 screencast video continues the discussion by visualizing the sound paths in a reverberant environment. The impulse response of the reverberant environment is also introduced. Understanding the desired impulse response is the first step toward emulating reverberation with a digital filter.
snd_reverb-concept.html
Figure 1: [video] Sound paths in a reverberant environment and impulse response model

Comb Filter Theory

The comb filter is a relatively simple digital filter structure based on a delay line and feedback. Watch the Figure 2 screencast video to learn how you can develop the comb filter structure by considering an idealized version of the impulse response of a reverberant environment.
snd_reverb-combfilter-theory.html
Figure 2: [video] Development of the comb filter structure as a way to implement an idealized reverberant impulse response
The difference equation of the comb filter is required in order to implement the filter in LabVIEW. In general, a difference equation states the filter output y(n) as a function of the past and present input values as well as past output values.
Take some time now to derive the comb filter difference equation as requested by the following exercise.
Problem 1
Derive the difference equation of the comb filter structure shown at the end of the Figure 2 video.
[ Click for Solution 1 ]
Solution 1
[ Hide Solution 1 ]

Comb Filter Implementation

Once the difference equation is available, you can apply the coefficients of the equation to the LabVIEW "IIR" (infinite impulse response) digital filter. The Figure 3 screencast video walks through the complete process you need to convert the comb filter difference equation into a LabVIEW VI. The LabVIEW MathScript node creates the coefficient vectors. Once the comb filter is complete, its impulse response is explored for different values of delay line length and feedback gain.
Please follow along with the video and create your own version of the comb filter in LabVIEW. Refer to TripleDisplay to install the front-panel indicator used to view the signal spectrum.
snd_reverb-combfilter-build.html
Figure 3: [video] Implementing the comb filter in LabVIEW; exploration of the impulse response as a function of delay line length and feedback gain

Loop Time and Reverb Time

As you have learned in previous sections, the comb filter behavior is determined by the delay line length N and the feedback coefficient g. From a user's point of view, however, these two parameters are not very intuitive. Instead, the comb filter behavior is normally specified by loop time τ τ MathType@MTEF@5@5@+=feaagaart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaeqiXdqhaaa@3701@ and reverb time denoted T 60 T 60 MathType@MTEF@5@5@+=feaagaart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamivamaaBaaaleaacaaI2aGaaGimaaqabaaaaa@37BB@ . Reverb time may also be written as R T60 R T60 MathType@MTEF@5@5@+=feaagaart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamOuamaaBaaaleaacaWGubGaaGOnaiaaicdaaeqaaaaa@3892@ . Loop time indicates the amount of time necessary for a given sample to pass through the delay line, and is therefore the delay line length N times the sampling interval. The sampling interval is the reciprocal of sampling frequency, so the loop time may be expressed as in Equation 1:
τ= N f S τ= N f S MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaeqiXdqNaeyypa0ZaaSaaaeaacaWGobaabaGaamOzamaaBaaaleaacaWGtbaabeaaaaaaaa@3AD8@ (1)
Reverb time indicates the amount of time required for the reverberant signal's intensity to drop by 60 dB (dB = decibels), effectively to silence. Recall from the Figure 2 video that the comb filter's impulse response looks like a series of decaying impulses spaced by a delay of N samples; this impulse response is plotted in Figure 4 with the independent axis measured in time rather than samples.
snd_reverb-impulseresponse.png
Figure 4: Comb filter impulse response
Take a few minutes to derive an equation for the comb filter feedback gain "g" as a function of the loop time and the reverb time. The following pair of exercises guide you through the derivation.
Problem 2
Given the comb filter impulse response pictured in Figure 4, derive an equation for the reverb time T 60 T 60 MathType@MTEF@5@5@+=feaagaart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamivamaaBaaaleaacaaI2aGaaGimaaqabaaaaa@37BB@ in terms of the loop time τ τ MathType@MTEF@5@5@+=feaagaart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaeqiXdqhaaa@3701@ and the comb filter's feedback constant g. Hint: Recall the basic equation to express the ratio of two amplitudes in decibels, i.e., use the form with a factor of 20.
[ Click for Solution 2 ]
Solution 2
T 60 = 3τ log 10 g T 60 = 3τ log 10 g MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamivamaaBaaaleaacaaI2aGaaGimaaqabaGccqGH9aqpdaWcaaqaaiabgkHiTiaaiodacqaHepaDaeaaciGGSbGaai4BaiaacEgadaWgaaWcbaGaaGymaiaaicdaaeqaaOGaam4zaaaaaaa@41B0@
[ Hide Solution 2 ]
Problem 3
Based on your previous derivation, develop an equation for the comb filter gain "g" in terms of the desired loop time and reverb time.
[ Click for Solution 3 ]
Solution 3
g= 10 3τ T 60 g= 10 3τ T 60 MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaam4zaiabg2da9iaaigdacaaIWaWaaWbaaSqabeaacqGHsisldaWcaaqaaiaaiodacqaHepaDaeaacaWGubWaaSbaaWqaaiaaiAdacaaIWaaabeaaaaaaaaaa@3ECE@
[ Hide Solution 3 ]
Problem 4
To finish up, derive the equation for the comb filter delay "N" in terms of the desired loop time.
[ Click for Solution 4 ]
Solution 4
N=τ f S N=τ f S MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamOtaiabg2da9iabes8a0jaadAgadaWgaaWcbaGaam4uaaqabaaaaa@3AC8@
[ Hide Solution 4 ]
Now, return to your own comb filter VI and modify the front-panel controls and LabVIEW MathScript node to use loop time and reverb time as the primary user inputs. Experiment with your modified system to ensure that the spacing between impulses does indeed match the specified loop time, and that the impulse decay rate makes sense for the specified reverb time.

Comb Filter Implementation for Audio Signals

In this section, learn how to build a comb filter in LabVIEW that can process an audio signal, specifically, an impulse source. Follow along with the Figure 5 screencast video to create your own VI. The video includes an audio demonstration of the finished result. As a bonus, the video also explains where the "comb filter" gets its name.
snd_reverb-combfilter-audio.html
Figure 5: [video] Building a LabVIEW VI of a comb filter that can process an audio signal
Next, learn how you can replace the impulse source with an audio .wav file. Speech makes a good test signal, and the Figure 6 screencast video shows how to modify your VI to use a .wav audio file as the signal source. The speech clip used as an example in the video is available here: speech.wav (audio courtesy of the Open Speech Repository, www.voiptroubleshooter.com/open_speech; the sentences are two of the many phonetically balanced Harvard Sentences, an important standard for the speech processing community).
snd_reverb-combfilter-wav.html
Figure 6: [video] Modifying the LabVIEW VI of a comb filter to process a .wav audio signal

References

  • Moore, F.R., "Elements of Computer Music," Prentice-Hall, 1990, ISBN 0-13-252552-6.
  • Dodge, C., and T.A. Jerse, "Computer Music: Synthesis, Composition, and Performance," 2nd ed., Schirmer Books, 1997, ISBN 0-02-864682-7.

Comments, questions, feedback, criticisms?

Send feedback