<< Chapter < Page Chapter >> Page >

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.

[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 MathType@MTEF@5@5@+=feaagaart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamivamaaBaaaleaacaaI2aGaaGimaaqabaaaaa@37BB@ . Reverb time may also be written as R T 60 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 :

τ = N f S MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaeqiXdqNaeyypa0ZaaSaaaeaacaWGobaabaGaamOzamaaBaaaleaacaWGtbaabeaaaaaaaa@3AD8@

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 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 with the independent axis measured in time rather than samples.

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.

Given the comb filter impulse response pictured in , derive an equation for the reverb time 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.

T 60 = 3 τ log 10 g MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamivamaaBaaaleaacaaI2aGaaGimaaqabaGccqGH9aqpdaWcaaqaaiabgkHiTiaaiodacqaHepaDaeaaciGGSbGaai4BaiaacEgadaWgaaWcbaGaaGymaiaaicdaaeqaaOGaam4zaaaaaaa@41B0@

Based on your previous derivation, develop an equation for the comb filter gain "g" in terms of the desired loop time and reverb time.

g = 10 3 τ T 60 MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaam4zaiabg2da9iaaigdacaaIWaWaaWbaaSqabeaacqGHsisldaWcaaqaaiaaiodacqaHepaDaeaacaWGubWaaSbaaWqaaiaaiAdacaaIWaaabeaaaaaaaaaa@3ECE@

To finish up, derive the equation for the comb filter delay "N" in terms of the desired loop time.

N = τ f S MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamOtaiabg2da9iabes8a0jaadAgadaWgaaWcbaGaam4uaaqabaaaaa@3AC8@

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 makessense 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 screencast video to create your own VI. The video includes anaudio demonstration of the finished result. As a bonus, the video also explains where the "comb filter" gets its name.

[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 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 availablehere: 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).

[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.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Musical signal processing with labview (all modules). OpenStax CNX. Jan 05, 2010 Download for free at http://cnx.org/content/col10507/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Musical signal processing with labview (all modules)' conversation and receive update notifications?

Ask