OpenParable
Skip to content
← Back to skills

Procedural Instrument Synthesis

Documents

Procedural Instrument Synthesis is an Agent Skill for documents published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Generate instrument samples for ZX game music. **Spec-Driven Workflow (RECOMMENDED):** 1. Create `.spec.py` in `.studio/specs/instruments/` 2. Run `python .studio/generate.py --only instruments` **Load references when:** - Instrument specs → `procedural-sounds/references/sound-spec-format.md` - Example specs → `examples/bass.spec.py`, `examples/lead.spec.py` - Karplus-Strong → `references/karplus-strong.md` - FM synthesis → `references/fm-synthesis.md` - Drum examples → `references/drum-examples.py` **Before generating:** Check `.studio/sonic-identity.md` for audio specs.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/gaming/procedural-instruments/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/procedural-instrument-synthesis, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Procedural Instrument Synthesis

Generate production-quality instrument samples using a spec-driven workflow.

Spec-Driven Workflow

Step 1: Create Spec

# .studio/specs/instruments/bass.spec.py
INSTRUMENT = {
    "instrument": {
        "name": "bass",
        "base_note": "C2",
        "synthesis": {
            "type": "karplus_strong",
            "damping": 0.994,
            "brightness": 0.5
        },
        "envelope": {"attack": 0.01, "decay": 0.4, "sustain": 0.3, "release": 0.3},
        "output": {"duration": 1.5, "bit_depth": 16, "loop": True}
    }
}

Step 2: Run Generator

python .studio/generate.py --only instruments

See procedural-sounds/references/sound-spec-format.md for complete format.

Technique Selection

InstrumentTechniqueReference
Acoustic GuitarKarplus-Strongkarplus-strong.md
Electric PianoFM Synthesisfm-synthesis.md
BellsFM (inharmonic)fm-synthesis.md
OrganAdditiveadditive-synthesis.md
Strings/PadsWavetablewavetable-synthesis.md
Synth Lead/BassSubtractivesubtractive-synthesis.md
DrumsSee examplesdrum-examples.py

Why Basic Synthesis Sounds Chiptuney

ProblemWhy It Sounds Bad
Raw np.sin()Static timbre, no evolution
Simple ADSRReal instruments have complex envelopes
Instant attackReal instruments have transients
Single oscillatorReal instruments have multiple components

Quality Checklist

  • No clicks (attack/release ramps)
  • Pitch correct (verify frequency)
  • Timbre evolves (envelope on filter/index)
  • Attack has character (transient noise)
  • Sounds musical (test in context)

Related Skills

  • procedural-sounds - SFX synthesis
  • sound-design/sonic-style-language - Audio style specs
  • tracker-music/xm-format - XM writer