Offline, deterministic, terminal-first MIDI DAW (TUI + headless scripts)
Offline, deterministic, terminal-first MIDI DAW. Drive it from a TUI or from headless scripts, export WAV/MP3/MIDI, and keep projects Git-friendly.
Important: claw-daw is the workstation. When a user prompts an agent, the agent should use claw-daw like a producer uses a DAW: write/edit scripts, iterate on arrangement/groove/sound choices, and export artifacts. The user is prompting the agent, not claw-daw.
claw-daw quality ...).export_package examples to use <name> prefix form.claw-daw pack ... --render.curl -fsSL https://www.clawdaw.com/install.sh -o /tmp/clawdaw-install.sh
bash /tmp/clawdaw-install.sh
curl -fsSL https://www.clawdaw.com/install_mac.sh -o /tmp/clawdaw-install.sh
bash /tmp/clawdaw-install.sh
iwr https://www.clawdaw.com/install_win.ps1 -UseBasicParsing -OutFile $env:TEMP\clawdaw-install.ps1
& $env:TEMP\clawdaw-install.ps1
Run in Administrator PowerShell to install system deps (Chocolatey).
If claw-daw is not found after install, run pipx ensurepath and restart your terminal.
claw-daw --version
claw-daw doctor
claw-daw paths --soundfont
# Render a headless script
claw-daw --headless \
--soundfont /path/to/your.sf2 \
--script tools/<unique_name>.txt
Tip: set CLAW_DAW_SOUNDFONT=/path/to/your.sf2 to make renders less verbose.
claw-daw exports are file-based. If you reuse the same <name> / --out prefix, you will overwrite:
out/<name>.mp3out/<name>.midout/<name>.jsonout/<name>.report.json (stylepacks)Rule: every new beat/song must use a unique output prefix.
Recommended naming convention:
<yyyy-mm-dd>_<genre>_<bpm>_v<nn> (example: 2026-02-02_trap_150_v1)When revising the same song: increment the version (_v2, _v3) and keep prior files.
Agent requirement: before rendering, the agent must check whether any of these files already exist for the chosen prefix and, if so, pick a new prefix (or ask the user).
When tasked to make a beat/song with claw-daw, agents should follow this workflow.
Best practice (recommended): for best musical results, spawn music-only subagents (isolated sessions) and run them in a pipeline. If your environment does not support subagents, proceed as a single agent and follow the same steps.
drum_kit on melodic tracks; minimal bass reverb).Gain stages + basic FX balance; exports master + stems; ensures drums/bass translate.
Isolation reduces cross-contamination from prior tasks and tends to produce more genre-faithful creative decisions.
The main agent coordinates handoffs (files + constraints) and handles packaging (exports, naming, docs/posting) + revisions.
When tasked to make a beat/song with claw-daw, agents should follow this workflow:
YYYY-MM-DD_<genre>_<bpm>_v1out/<name>.* already exists, bump to _v2, _v3, …tools/<name>.txt with patterns + clipsclaw-daw pack <trap|house|boom_bap> --out <name> [--seed <n>] --attempts 6out/<name>.report.json.claw-daw stylepack <trap_2020s|boom_bap|house> --out <name> --soundfont <sf2> [--seed <n>] --attempts 6Seed behavior for generators:
--seed on claw-daw prompt, claw-daw pack, or claw-daw stylepack to auto-pick a fresh seed for that run.--seed <n> to replay the same generation deterministically.apply_palette <style> to set better GM programs + mixer defaults per rolegen_drum_macros <track> <base_pattern> ... to create 4/8-bar variations + fillsgen_bass_follow <track> <pattern> <length> roots=... to lock bass/808 to harmonyarrange-spec <spec.yaml> ... to place sections + dropouts/fills deterministicallyout/<name>.report.json is producedpython3 tools/mix_prepare.py out/<name>.json --preset edm_streaming --mix-out tools/<name>.mix.jsonpython3 tools/section_gain.py out/<name>.jsonpython3 tools/mix_spec_validate.py out/<name>.json tools/<name>.mix.jsonpython3 tools/preview_gate.py out/<name>.json tools/<name>.mix.json <name> --preset edm_streamingexport_package <name> preset=clean mix=tools/<name>.mix.json stems=1 busses=1 meter=1python3 tools/mix_gate.py out/<name>.meter.json --preset edm_streamingpython3 tools/mix_gate_stems.py out/<name>_stems --bus-dir out/<name>_busses --preset edm_streaming --lufs-guidanceclaw-daw doctor --audio out/<name>.mp3claw-daw quality out/<name>.json --out <name> --preset edm_streaming --section-gainWhen a user prompts an agent, the agent can use claw-daw for fast “one-shot” generation and revisions:
list_drum_kitsset_drum_kit <track_index> <trap_hard|house_clean|boombap_dusty|gm_basic>add_note_pat ... <pitch|role> ... where role can be:
kick|snare|clap|rim|hh|oh|ph|tom_low|tom_mid|tom_high|crash|ride|perc|shakerhh/oh/ph are aliases for hat_closed/hat_open/hat_pedal)list_instrumentsset_instrument <track_index> <instrument_id> preset=<name> seed=<n> <param>=<value>...scan_sample_pack <path> id=<pack_id> include=*.wavlist_sample_packsset_sample_pack <track_index> <pack_id|path> seed=<n> gain_db=<db>convert_sample_pack_to_sf2 <pack_id|path> <out.sf2> tool=sfz2sf2If drums sound like crackling/noise or “not drums”, it’s almost always one of these:
perc_low / perc_high.perc, shaker, or tom_*.9).set_sampler <drum_track> drums + set_drum_kit ...) are opt-in and may crackle on some setups.export_preview_mp3) and listen specifically for: kick/snare clarity + hats not crackling.Agents should assume the user wants a clean export unless they explicitly ask for lofi, hiss, vinyl, tape, dusty noise, crackle, grit, saturation-heavy textures, or other intentional artifacts.
preset=cleanBefore sending a beat/song, the agent should be able to say all of these are true:
claw-daw doctor --audio out/<name>.mp3 shows no serious mix sanity warningsIf bass notes exist but you can’t hear bass, check:
drum_kit on melodic tracksdrum_kit is for role-based drum mapping. Don’t set it on bass/keys/lead tracks.synth_bass_1) or layer some mid harmonics.Before stems/final export: listen to the first 10–20 seconds on small speakers/headphones.
808 presets + glide:
set_808 <track_index> <preset>set_glide <track_index> <ticks|bar:beat>Genre Packs v1 (from-scratch, no templates):
claw-daw pack <trap|house|boom_bap> --out <name> [--seed <n>] --attempts <n> --max-similarity <0..1>claw-daw pack <trap|house|boom_bap> --out <name> [--seed <n>] --attempts <n> --max-similarity <0..1> --render --soundfont <sf2> --quality-preset edm_streaming --section-gainNovelty control for prompt→script iteration:
claw-daw prompt ... [--seed <n>] --iters N --max-similarity 0.85–0.95Stylepacks v1 (opt-in / explicit request): BeatSpec → compile → score → iterate → gated export → report
claw-daw stylepack <trap_2020s|boom_bap|house> --out <name> --soundfont <sf2> [--seed <n>] --attempts 6 --score-threshold 0.60out/<name>.report.jsonMix sanity gate (audio-level) is included in stylepacks scoring and will retry deterministically when it detects obvious issues.
Sound engineering (MANDATORY for agents):
export_package <name> preset=clean mix=tools/<name>.mix.json stems=1 busses=1 meter=1tools/mix_presets.json, tools/mix_gate.py, tools/mix_gate_stems.pyMetering (post-export QA):
meter_audio out/<name>.mp3 out/<name>.meter.json (LUFS integrated+short-term, true-peak, crest/DC offset, stereo correlation+balance, spectral tilt)Artifact QA (post-export QA):
claw-daw doctor --audio out/<name>.mp3 (adds mix sanity warnings for hiss, rumble, hot/clipped transients, and DC offset)Bus stems (quick deliverables):
export_busses out/busses_<name>Drum variations + fills macro:
gen_drum_macros <track> <base_pattern> out_prefix=drums seed=0 make=both|4|8Bass follower:
gen_bass_follow <track> <pattern> <length> roots=... seed=... gap_prob=... glide_prob=...Palette presets:
apply_palette <style> [mood=...] (uses track names to infer roles)Section-aware arrangement compiler:
claw-daw arrange-spec <spec.yaml> --in <project.json> --out <project_out.json>Acceptance tests (agent workflow): per-genre mini-gates in https://www.clawdaw.com/AGENT_PLAYBOOK.md
Quality workflow command: claw-daw quality out/<name>.json --out <name> --preset edm_streaming --section-gain
When the user requests a beat/song in a specific genre and/or era (e.g., “2020s trap”, “90s boom-bap”, “2010s progressive house”), the agent must do this before writing the script:
Research typical song structure for that style using reputable internet sources.
Output a concise structure blueprint that includes:
Cite sources used:
Save the structure template into the working plan (the agent’s plan / scratchpad) so downstream steps (loop generation, arrangement, export) follow it.
Acceptance criteria:
If you’re building an agent that uses claw-daw, start here:
These are hosted for convenience:
skill.md (this file): https://www.clawdaw.com/skill.mdheartbeat.md: https://www.clawdaw.com/heartbeat.mdskill.json: https://www.clawdaw.com/skill.jsonAdditional docs: