Skip to content
Development
Skill

/dsp-algorithm-guide

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

From plugin
sonic-skills
2418 skills

Claude Code

$ npx -y skills add kunitoki/sonic-skills --skill dsp-algorithm-guide --agent claude-code

SKILL.md

dsp-algorithm-guide.SKILL.md
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:

  • [ ] **Stability** — confirm the algorithm's stability condition and check it after every coefficient update (e.g., biquad poles inside unit circle).
  • [ ] **Coefficient precision** — use `double` for coefficient computation; cast to `float` for the inner loop only if profiling demands it.
  • [ ] **Denormal protection** — use `ScopedNoDenormals`/FTZ where available, or add explicit state clamps/noise around feedback paths.
  • [ ] **Latency reporting** — if the algorithm introduces latency (e.g., FFT block size), call `setLatencySamples()` so the host can compensate.
  • [ ] **Initialisation** — clear all delay-line and state memory in `prepareToPlay`; never assume zero-init across transport loops.
  • [ ] **Parameter smoothing** — ramp filter coefficients or gain values over a block; abrupt changes cause clicks and, for IIR filters, instability.
  • [ ] **Oversampling** — nonlinear stages (waveshapers, saturators) need at least 2x oversampling to suppress alias products.

Step 3 — Test the implementation

  • [ ] Frequency response: compare magnitude/phase against the reference formula at multiple frequencies (e.g., plot with Python or MATLAB).
  • [ ] Step response: feed a unit step; verify overshoot and decay match the algorithm's expected behaviour.
  • [ ] Silence-in → silence-out: verify the output reaches and stays at zero after silent input (no denormal crawl).
  • [ ] No NaN / Inf: run with extreme parameter values (fc = 1 Hz, fc = Nyquist − 1 Hz, gain = 0 dB, gain = +24 dB).
  • [ ] Impulse response (convolution / reverb): verify IR matches the target via inverse FFT.
  • [ ] CPU profiling: measure per-block worst case before shipping; compare against the buffer deadline on the target CPU instead of relying on fixed ns/sample budgets.

See `references/algorithm-cookbook.md` for difference equations, stability conditions, coefficient mappings, and numerical tips for each family.

Read more
@kunitoki
Ships withsonic-skills

Precision audio-engineering skills for AI agents. Sonic Skills is a curated pack of Markdown skills for reviewing, debugging, explaining, and implementing audio software.

Stars on GitHub

Momentum

stars in total
24
Star history of kunitoki/sonic-skills on GitHub, a chart by star-history.com

Other skills on sonic-skills.

au-review

au-review

Reviews AudioUnit v2/v3 plugin implementations for spec compliance, thread safety, and correctness. Use when the user asks to…

audio-dsp-review

audio-dsp-review

Reviews audio DSP and audio processing code for realtime safety violations. Use whenever the user asks to review, audit, or check…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about dsp-algorithm-guide.

Which coding agents can use dsp-algorithm-guide?
dsp-algorithm-guide installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.