Sounds Logical
home

WaveWarp 2.0 Example DrawingBoard

Index Current Example DrawingBoard Group Previous Example DrawingBoard Group Next Example DrawingBoard Group Previous Example DrawingBoard Next Example DrawingBoard Bottom of Page

Description | Components Used

PolyphaseVersusDirectDownsamplingEducationalExample2_2

Description
Polyphase versus direct implementation of a downsampler: polyphase case Demonstrates how to build an anti-aliasing downsampler in the "polyphase" implementation. In this example, the sample rate is reduced by a factor of 4 (via the Simple DownSampler). An FIR anti-aliasing low-pass filter is constructed in polyphase form, i.e. from 4 parallel filter "branches" (or "phases") fed with successively delayed versions of the input. The filters in each branch (imported from off-line designs created using the MATLAB code in the script-file "wwxmpl12.m" located in the wwmatlab directory) comprise the exact polyphase representation of the corresponding "direct" low-pass filter (demonstrated in the companion ExampleDrawingBoard "PolyphaseVersusDirectDownsamplingEducationalExample1.dwb"). Play the DrawingBoard and note that the audio sounds reasonable, despite the significant degree of downsampling. The "high frequencies" have, however, been attenuated as expected from the low-pass filtering (compare with the original by temporarily bypassing the entire downsampling chain to appreciate the difference). Now compare the output of this downsampler with that of the "direct" implementation of the same anti-aliasing filter (from "PolyphaseVersusDirectDownsamplingEducationalExample1.dwb"). You will observe that the ouputs are identical for the two implementations (this is most easily appreciated by temporarily connecting up the ASCII input /output files -- which are included in both DrawingBoards -- and disconnecting the WAV file and soundcard. The ASCII files can be opened with a text editor and allow convenient and accurate comparison since they offer direct access to the exact numerical input /output data without the scaling inherent to the WAV I/O interface). The important point about the polyphase structure is that all the filters are executed at the low sample rate. This implementation is therefore considerably more efficient than the direct implementation where the filter is executed at the high sample rate. Even with the overhead associated with the extra components in the polyphase implementation, you will observe (e.g. from a CPU resource monitor) a considerable performance gain (speed improvement) over the direct method. This is the entire motivation for using the polyphase method. Moreover, when the polyphase structure is implemented in the most efficient manner (i.e. without separate multiple components, but coded together within a single component), drastic improvements in efficiency can be achieved. Such a "self-contained" internal polyphase architecture is the basis of many of the pre-built down- (up-) samplers in the mutirate category of the Component Library. For a thorough discussion on polyphase filtering, see "Wavelets and Filter Banks" by Gilbert Strang and Truong Nguyen, Wellesley-Cambridge Press, 1996, and "Multirate Digital Signal Processing" by Ronald E Crochiere and Lawrence R Rabiner, Prentice Hall, 1983. This DrawingBoard nicely illustrates the power and versatility of WaveWarp's sample-by-sample multirate audio engine.
Components used:

Index Current Example DrawingBoard Group Previous Example DrawingBoard Group Next Example DrawingBoard Group Previous Example DrawingBoard Next Example DrawingBoard Top of Page

home - news - products - store - support - site map - company info
© 2007 Sounds Logical. All rights reserved.
Sounds Logical
legal notice - privacy statement