audio-compare

audio-compare is a command for Claude Code from Generous-Corp/pulp. It costs 38 tokens per session (1,854 once invoked), scanned A, original, MIT.

An advisory command for judging an audio change by rendering two versions, comparing them, and explaining the result with evidence. DSP means digital signal processing, the code that changes or analyses sound.

In plain words
What is it for?
Use it to decide whether a DSP change improved or worsened audio, using reference and candidate WAV files and cited comparison evidence.
Why use it?
It provides an interpreted before-and-after assessment instead of only a numeric difference or pass/fail result, while leaving the build status unchanged.

Command for Claude Code

Part of the pulp plugin — 63 skills, 30 commands, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/generous-corp/pulp/audio-compare
Clone the repo
git clone --depth 1 https://github.com/Generous-Corp/pulp

Made for: Claude Code.

Or install pulp, the plugin that ships this one along with the rest of its 63 skills, 30 commands, 3 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for audio-compare

README.md
[![agentmods](https://agentmods.dev/badge/commands/generous-corp/pulp/audio-compare.svg)](https://agentmods.dev/commands/generous-corp/pulp/audio-compare)
Your own site
<a href="https://agentmods.dev/commands/generous-corp/pulp/audio-compare"><img src="https://agentmods.dev/badge/commands/generous-corp/pulp/audio-compare.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,854 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00038 $0.01854
Opus 5 $0.00019 $0.00927
Sonnet 5 $0.00008 $0.00371
Haiku 4.5 $0.00004 $0.00185

Measured today against content hash 43ddfd7c4dd9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

audio-compare scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/audio-compare.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use this when you (an agent) need to weigh in on a DSP change: render/capture the audio before and after, then get a defended judgment — "did this make it worse?" — with cited evidence, not a bare pass/fail. It wraps the Audio Quality Lab's compare surface (tools/audio/quality-lab/, opt-in Python; see the audio-harness skill for the full vocabulary and rationale). Advisory and off-gate: it never fails a build.

Not this — reach for the gate instead when you just want an exact/numeric/spectral before-after diff with a pass/fail exit: use pulp audio validate compare a.wav b.wav [--mode null|spectral] [--tolerance <dbfs>] (shipped, deterministic, gate-oriented). Use /audio-compare when you want an interpreted judgment an agent can act on.

One-time setup (opt-in deps)

pulp tool install audio-quality-lab      # managed venv under ~/.pulp/tools
# — or a plain checkout venv —
cd tools/audio/quality-lab && python3 -m venv .venv && . .venv/bin/activate && pip install -r requirements.txt

Run it

Invoke with two WAVs ($ARGUMENTS = <reference.wav> <candidate.wav> [extra flags]):

# Preferred — the shipped CLI verb (delegates to the managed tool; no venv juggling):
pulp audio compare $ARGUMENTS --profile tonal-balance --json /tmp/compare.json
# Equivalent lower-level forms:
#   pulp tool run audio-quality-lab -- compare $ARGUMENTS
#   python -m quality_lab.cli compare $ARGUMENTS
# Agents inside an MCP client can call the pulp_audio_compare tool for the report JSON directly.
  • --reference-role golden — declare the reference known-good and the candidate expected unchanged. This is the ONLY mode that can return regression_suspected.
  • default --reference-role peer — a neutral A/B; a changed candidate reads as material_change_detected, never "regression" (we don't assume which side is right).
  • --profile — the measurement axis. Six today:
    • tonal-balance — LTAS spectral-centroid shift; bad direction duller.
    • added-hf — band-relative ≥8 kHz fraction ratio (dB); bad direction added HF fizz.
    • noise-roughness — harmonic-to-noise ratio drop (dB); bad direction rougher/noisier (tonal material).
    • graininess — relative spectral-flux increase; bad direction grainier (tonal material).
    • stereo-width — RMS(side)/RMS(mid) width + interchannel correlation; bad direction narrower/collapsed, and an out-of-phase candidate is flagged (needs 2-channel input; mono → not_applicable).
    • transient-integrity — per-onset attack-smear deficit (onset-aligned); bad direction softer/smeared attacks. Needs onset-bearing (percussive) material (too few onsets → not_applicable); one-directional (a sharper candidate reads no change).
    • regression_suspected also requires the change to be in that axis's bad direction — a brighter candidate on tonal-balance, or an HF-reduced one on added-hf, stays a neutral material_change_detected. New axes auto-appear in --profile; time-warp axes are deferred.
  • --align <none|latency|varispeed:R|stretch:R|pitch:S|ratio:auto> — time-align first. latency trims a constant delay/offset before measuring, so a pure shift (delay plugin, tempo-sampler offset) reads as the tone change it is (corroborated) instead of a false not_corroborated; it refuses and measures unaligned when the difference isn't a reliable pure delay. Default none.
  • --threshold <t> — override the axis's own materiality default (per-axis unit/range; the tool validates it — a fraction for tonal-balance, dB for added-hf/noise-roughness, etc.).

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 106 lines · 38 tokens per session scan A 43ddfd7c4dd9

Subscribe to this mod's changes

audio-compare is a command published in the GitHub repository Generous-Corp/pulp (16 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 1,854 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.