Cascaded Allpass Filter Test Bed
The Allpass Filter: Overview
An allpass filter is a signal processing element with a unique and seemingly paradoxical property: it passes all frequencies with unity gain (0 dB) while introducing frequency-dependent phase shifts. Unlike conventional filters that attenuate certain frequency bands, the allpass filter leaves the amplitude spectrum completely unchanged—its sole function is to manipulate phase relationships.
Mathematically, an allpass filter has poles and zeros positioned symmetrically with respect to the unit circle in the z-plane, ensuring that its magnitude response remains flat across all frequencies while its phase response varies continuously.
First-Order Allpass Filters
The simplest allpass filter is the first-order design, characterized by a single delay and a feedback coefficient (g). Its transfer function creates a 180° phase shift at a characteristic frequency, with the phase response transitioning smoothly from 0° at DC to -180° (or +180°, depending on implementation) at Nyquist.
The first-order allpass is particularly elegant because it can be implemented with minimal computational cost: one delay element, one multiply, and two additions.
Higher-Order Allpass Filters
Second-order and higher-order allpass filters employ biquad topologies with carefully matched pole-zero pairs. A second-order allpass section provides up to 360° of phase shift, with the transition steepness controlled by the Q (resonance) parameter. Higher orders are achieved by cascading multiple second-order sections, each contributing its phase response to create increasingly complex phase characteristics.
The Q parameter deserves special attention: at Q = 0.707 (the Butterworth alignment), the phase transition is maximally smooth. Higher Q values create sharper phase transitions localized around the center frequency, while lower Q values spread the phase shift over a broader frequency range.
Applications in Audio Systems
Crossover Networks
In loudspeaker crossover design, allpass filters serve a critical function: time-aligning drivers with different acoustic centers. When a woofer and tweeter are physically offset, their acoustic outputs arrive at the listener at different times. An allpass filter applied to the electrically closer driver can introduce the necessary group delay to synchronize wavefront arrival, improving coherence in the crossover region.
Linkwitz-Riley crossover topologies inherently include allpass characteristics in their summation, ensuring phase-coherent reconstruction when the outputs are combined acoustically.
Phaser Effects
The classic phaser effect exploits the allpass filter’s phase-shifting property directly. By placing several allpass stages in series and mixing their output with the dry signal, frequency-dependent comb filtering occurs. As the allpass center frequencies are modulated (typically by an LFO), the comb filter notches sweep through the spectrum, creating the characteristic “swooshing” sound.
First-order allpass stages create gentler, more subtle phasing, while second-order stages with moderate to high Q produce more pronounced, vocal-like resonances. The number of stages determines the density of notches: a 4-stage phaser creates 2 notches, a 6-stage creates 3, and so on.
Reverb and Diffusion Networks
Allpass filters are fundamental building blocks in artificial reverb algorithms. Their unique property—unity gain with phase rotation—makes them ideal for creating dense, non-resonant reflections that approximate the diffuse field of natural reverberation.
In the Schroeder reverberator (1962), allpass filters serve as diffusers, breaking up the regular spacing of early reflections that would otherwise cause metallic coloration. The nested allpass topology, where one allpass filter is embedded within the feedback path of another, creates even more complex delay structures with minimal perceivable repetition.
Modern reverb algorithms like those developed by Griesinger, Gardner, and Dattorro use networks of allpass filters with carefully chosen delay times (often based on mutually prime numbers) to maximize echo density while minimizing pattern perception. The frequency-dependent decay times in natural spaces can be approximated by embedding tone-shaping filters within allpass feedback loops.
Dispersion and Special Effects
Allpass filters create frequency-dependent group delay, meaning different frequencies emerge from the filter at different times. This “dispersion” property can be exploited creatively:
- String modeling: Stiff strings exhibit dispersion, with high frequencies propagating slightly faster than lows. Allpass filters in physical modeling synthesis accurately reproduce this behavior.
- Tape/analog emulation: The phase distortion introduced by transformer coupling, tape head gaps, and magnetic saturation can be approximated with carefully tuned allpass networks.
- Spatial effects: Cascaded allpass filters with slowly modulated parameters create subtle pitch shifting and detuning effects useful for widening and dimension.
Hilbert Transformers and Single-Sideband Processing
A specialized application: a network of allpass filters with 90° phase offset between two parallel paths creates a Hilbert transformer. This enables single-sideband modulation, frequency shifting, and analytical signal generation—essential for advanced spectral processing techniques.
Cascaded Allpass Behavior
When allpass filters are cascaded (placed in series), their phase responses add. This seemingly simple fact leads to profound consequences:
- Dense, non-periodic delay structures emerge from even modest numbers of stages
- Group delay accumulation can reach milliseconds with sufficient stages
- Frequency-dependent density varies with the distribution of center frequencies
- Complementary filtering occurs naturally when spreading stages across the spectrum
The interaction between cascade count, frequency spread patterns (linear, exponential, logarithmic, etc.), and individual stage Q factors creates a vast design space for diffusion, reverberation, and creative phase manipulation.
Stability Considerations
Allpass filters remain unconditionally stable as long as feedback coefficients remain within proper bounds (|g| < 1 for first-order; poles inside the unit circle for higher orders). However, aggressive modulation of parameters, particularly at audio rates, can produce aliasing and require careful implementation with oversampling or other anti-aliasing techniques.
Summary
The allpass filter represents a unique class of signal processing element where the absence of amplitude response IS the feature. By manipulating phase alone, allpass filters enable precise control over timing, coherence, and spatial characteristics while maintaining spectral integrity. Their applications span the entire audio processing domain, from corrective (crossover time alignment) to creative (phasing, reverb, dispersion), making them indispensable tools in modern audio engineering.