audio-harness

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

An offline audio testing and measurement tool for Pulp processors. It runs repeatable render scenarios and checks signal facts such as volume, silence, clipping, and distortion without speakers or an audio device.

In plain words
What is it for?
Use it to test audio processing across sample rates and block sizes, inspect frequency response and total harmonic distortion, and run audio contracts, regression tests, and golden tests.
Why use it?
It replaces subjective questions like “does this sound right?” with repeatable evidence. Failures identify what went silent or violated a named audio expectation.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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-harness
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-harness

README.md
[![agentmods](https://agentmods.dev/badge/commands/generous-corp/pulp/audio-harness.svg)](https://agentmods.dev/commands/generous-corp/pulp/audio-harness)
Your own site
<a href="https://agentmods.dev/commands/generous-corp/pulp/audio-harness"><img src="https://agentmods.dev/badge/commands/generous-corp/pulp/audio-harness.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 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,414 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.1 $0.00042 $0.01414
Opus 5 $0.00021 $0.00707
Sonnet 5 $0.00008 $0.00283
Haiku 4.5 $0.00004 $0.00141

Measured yesterday against content hash b503c2497732, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

audio-harness 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 yesterday.

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-harness.md · 87 lines

How it starts

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

Turn "is there sound / does this sound right?" into deterministic signal evidence, offline — no audio device, no speakers. This wraps the audio-harness skill; read it (.agents/skills/audio-harness/SKILL.md) for the full vocabulary and the copy-this patterns.

Build Release (Debug mismeasures DSP levels/timing) and run the proofs:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(sysctl -n hw.ncpu) --target \
  pulp-test-audio-support pulp-test-render-scenario pulp-test-audio-contracts \
  pulp-test-audio-doctor pulp-test-golden pulp-test-audio-matrix pulp-test-audio-tone-regression
ctest --test-dir build -R 'audio|golden|render|contract|doctor' --output-on-failure

What you get:

  • Signal factsanalyze() + summarize(): peak/RMS/DC/NaN/clip/silence-run and a dominant-pitch estimate, so "no sound" becomes "which stage went silent".

  • Scenarios + contractsRenderScenario renders a processor deterministically across sample rates / block sizes; AudioContract states a named claim and a failure reads contract '<name>': expected … actual …, never a raw sample index.

  • Audio Doctor (offline)response_relative_to_input() for a magnitude / frequency-response curve (attenuation_db_at(hz)), measure_thd() for THD / THD+N + harmonic breakdown. Curves serialize to schema-versioned JSON.

  • pulp audio validate <verb> CLI — the same analyzers over captured audio files / audio-run/ bundles, no plugin instantiation:

    • pulp audio validate summarize out.wav [--json] — signal summary
    • pulp audio validate doctor out.wav --thd [--fundamental <hz>] / --response f1,f2,...
    • pulp audio validate compare a.wav b.wav [--mode null|spectral] [--tolerance <dbfs>]
    • pulp audio validate assert audio-run/assertions.json — re-check stored assertions, nonzero on failure
  • Third-party plugin interrogation — discover the host API, then render an explicit plugin through PluginSlot, no DAW or audio device:

    • pulp audio plugin-inspect --plugin <bundle> --format <format> (always JSON)
    • pulp audio render --plugin <bundle> --out out.wav --duration-ms 1000
    • both commands isolate vendor code behind a child-process timeout
    • drive renders with --input-signal, --input, repeatable --param, and repeatable --midi
    • use --warmup-ms, --initial-param, and --settle-ms before capture; use --tail-ms and --wav-format float32 for analysis-quality captures
    • --param <id>=<value>[@frame] values are the PLAIN native parameter domain, not normalized; @frame is sample-accurate (block-rate on LV2 by its control-port nature, and on any plugin that reads its params once per block)
    • exposed as pulp_audio_plugin_inspect and pulp_audio_render MCP tools (render takes single initial/automation/MIDI tokens; use the CLI for multiple)
  • Latency proof (--latency-report) — prove a plugin's latency_samples() against the delay actually in its rendered audio. The host slides the whole track by that number and nothing else checks it, so a wrong one comb-filters every parallel/multi-mic mix silently.

    # Needs a pass-through/dry mode (arrange with --param) and a broadband,
    # aperiodic stimulus — never silence or a sine.
    pulp audio render --plugin My.clap --input-signal noise --duration-frames 32768 \
        --param <dry-mix-id>=0 --out /tmp/o.wav --latency-report /tmp/lat.json
    

    It refuses rather than guesses: an unprovable claim exits nonzero exactly like a disproven one. Read null_depth_db / ambiguity_margin_db in the artifact — a pass with a small margin is a finding, not a clean bill of health. Add --latency-expect <n> to pin the value the plugin is supposed to have; without it the proof is self-consistency only, so a plugin whose true delay AND report both grew still passes. Same evidence over MCP via latency: true.

    Most plugins do not need this — of Pulp's 24 example plugins only two ever report nonzero latency. It is for convolution / FFT / lookahead / oversampling / neural DSP, where the number is derived and a refactor moves it. See docs/guides/latency-proof.md for when NOT to use it.

Read the full file on GitHub · 87 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. yesterday First seen · 87 lines · 42 tokens per session scan A b503c2497732

Subscribe to this mod's changes

audio-harness is a command published in the GitHub repository Generous-Corp/pulp (16 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 1,414 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.