| name | dsp-algorithm-guide |
| description | Implementation guide for common DSP algorithms. Use when the user asks "implement a lowpass filter", "how do I write a compressor", "reverb algorithm", "FFT convolution", "pitch shifter", or "oscillator with no aliasing". Trigger on phrases like "biquad filter", "state variable filter", "feedback delay network", "phase vocoder", "overlap-add", "PolyBLEP", or any request to implement a specific DSP processing block.
|
DSP Algorithm Guide
Three steps: pick the right algorithm family, address implementation concerns, then verify correctness.
Step 1 — Identify the algorithm family
| User request | Algorithm family | Recommended starting point |
|---|
| Lowpass / highpass / bandpass / notch | Biquad (IIR) | Direct Form II transposed |
| High-quality parametric EQ, resonant filter | Biquad cascade or SVF | State Variable Filter (SVF) |
| Shelving / high-shelf / low-shelf | Biquad (Audio EQ Cookbook) | Peaking EQ or shelf coefficients |
| Reverb (algorithmic) | FDN or Schroeder/Moorer | Feedback Delay Network (FDN) |
| Reverb (convolution / IR) | OLA / OLS | Overlap-Add with FFT |
| Compressor / limiter / expander / gate | Level detector + gain computer | RMS or peak detector + knee curve |
| Pitch shift / time stretch | Phase vocoder or granular | Phase vocoder for tonal material |
| Anti-aliased oscillator | BLIT / PolyBLEP / wavetable | PolyBLEP for simple waveforms |
| Spectral processing / analysis | STFT pipeline | Overlap-Add / Overlap-Save |
| Waveshaper / saturation | Memoryless nonlinearity | Soft-clip with oversampling |
Step 2 — Implementation concerns
Work through this checklist before writing any DSP code:
Step 3 — Test the implementation
See references/algorithm-cookbook.md for difference equations, stability conditions, coefficient mappings, and numerical tips for each family.