Declarative audio effects chain registry
Skill kjuhwa/skills-hub/skills/ml-ops/declarative-audio-effects-chain-registry
Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.
npx -y skills add kjuhwa/skills-hub --skill declarative-audio-effects-chain-registryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Describe DSP effect chains as JSON with a typed registry so they round-trip through DB, HTTP, and UI without per-effect branching.
SKILL.md
3.0 KB, 605 tokens by cl100k_base, as published. Nobody here has run it
Declarative audio effects chain registry
When to use
You want to let users stack DSP effects (chorus, reverb, compressor, pitch-shift, filters, gain) on generated audio, save those chains to a DB, ship them to a frontend for editing, and apply them on the backend — without a parallel dispatch tree per effect.
Steps
- Define one
EFFECT_REGISTRY: dict[str, {cls, label, description, params}]where each entry maps a JSON-safe type name ("chorus","reverb") to the DSP library class, a display label, and aparamssub-dict of{default, min, max, step, description}per parameter. This single structure feeds the schema, the UI, and the validator. - Represent a chain as a plain list of dicts:
[{"type": "chorus", "enabled": True, "params": {"rate_hz": 1.0, "depth": 0.5, ...}}, ...]. This is trivially serializable to DB TEXT / JSON / HTTP. - Expose
get_available_effects()that serializes the registry for the frontend (strip thecls). The UI auto-builds sliders from the param metadata — new effects light up with zero frontend changes. - Write one
validate_effects_chain(chain) -> Optional[str]that walks the chain and checks type exists, params are the right type, and values are inside their min/max. Reject unknown keys aggressively; silently ignoring a misspelled param is worse than a 400. - Provide
build_pedalboard(chain)that skips entries withenabled=False, merges defaults with provided params per entry, and constructs the DSP objects. Apply asPedalboard(plugins)(audio_2d, sample_rate)whereaudio_2dis(channels, samples). - Ship a small dict of built-in presets (
robotic,radio,echo_chamber,deep_voice) as chains of the same shape so users get useful starter points without a special preset type.
Counter / Caveats
- Never let the HTTP handler branch on effect type — the registry must be the only dispatch point, otherwise new effects require changes in three places.
- Keep the
clsout of the serialized schema the UI consumes, or you'll leak import-dependent details into the public API. - For effects whose DSP library expects 2-D
(channels, samples)input, normalize to 2-D inside the adapter and restore the caller's dimensionality on return. - If you add an effect with a non-numeric parameter (e.g. a mode enum), extend the validator schema before exposing it to the API, or the existing "must be a number" check will reject valid configs.
Source references: backend/utils/effects.py (the EFFECT_REGISTRY, presets, validator, and apply_effects).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.