Phaser effect implementation in Matlab and on a DSP-board.
The full implementation onto the board is not given, since it was not created by me.
A phaser is a time-varying comb filter that moves across the frequency spectrum. It is implemented using a cascade of identical All Pass Filters (APFs) (source). Each APF is called a stage. The output of all stages is mixed with the original signal using a dry-wet mix. The processed signal can also be scaled with a depth parameter and fed back to the input.
The comb filtering effect occurs because the phase-shifted signal is combined with the original. At certain frequencies, signals cancel (out of phase), and at others, they reinforce (in phase). The APF coefficient is updated per sample using a Low Frequency Oscillator (LFO), creating the characteristic “swooshing” sound.
An APF passes all frequencies with constant amplitude, but alters the phase (source):
The Matlab implementation includes:
- A per-sample phaser process function
- LFO-based coefficient update
- Configurable number of stages
Tests performed:
- APF frequency response (impulse input, coeff = 0.5) → constant 0 dB magnitude, varying phase
- Phaser response with 8 stages, 50% mix, 80% depth, 0.5 Hz LFO → clear comb filtering
- Phaser with 30% feedback → increased resonance/distortion
- Q2.14 format used
- No floating-point operations
- Fixed-point sine (Q4.12) used for LFO (source)
Used to reduce the effective LFO frequency by updating the phase only every few samples.
- Separate LFO phase, decimator counter, and APF buffers per channel
- Maximum 5 stages in stereo due to processing limits
- More stages possible in mono
Runtime control:
- Button 1 → number of stages
- Button 2 → volume
- Both → LFO frequency
Parameters increase in fixed steps until maximum, then wrap to minimum. Values are shown on an OLED display.
Debouncing is implemented to detect simultaneous presses.
Volume range:
- −12 dB to +20 dB (0.5 dB steps)
- Register values: −24 to 40




