Repository navigation
Home
musicwright lets an AI agent make music with you: generate takes with local or hosted AI models, judge takes it cannot hear, check a mix and compare takes at one loudness, finish them to a loudness target, cut seamless game loops, fit a score to a film cut, layer a part over a kept take, play notation and tabs and write recordings down, and remember what you liked. It is seven agent skills plus one command-line tool, mw.py, written in standard-library Python on top of ffmpeg, which prints one JSON object per command. It is not a music model, a DAW or an MCP server. The models run in your ComfyUI, the ACE-Step REST server or a hosted API, and you listen and decide.
The rule running through it: the agent cannot listen, so it reports what numbers and a picture show. Here measure reads two stand-in files: one went quiet for its last 6 seconds, the other was clipped flat at full scale.
python mw.py measure quiet_end.wav hot.wav{
"ok": true,
"files": [
{
"file": "quiet_end.wav",
"duration_s": 26.0,
"sample_rate": 48000,
"channels": 1,
"codec": "pcm_s16le",
"lufs_i": -21.8,
"lra": 1.8,
"true_peak_dbtp": -18.1,
"head_silence_s": 0.0,
"tail_silence_s": 6.0,
"gaps": [],
"sample_peak_db": -18.063921,
"flat_factor": 0.0,
"warnings": [
"6.0 s of silence at the end (render went quiet early: trim or re-roll)"
]
},
{
"file": "hot.wav",
"duration_s": 6.0,
"sample_rate": 48000,
"channels": 1,
"codec": "pcm_s16le",
"lufs_i": -2.2,
"lra": 0.0,
"true_peak_dbtp": 0.0,
"head_silence_s": 0.0,
"tail_silence_s": 0.0,
"gaps": [],
"sample_peak_db": 0.0,
"flat_factor": 29.303764,
"warnings": [
"clipping likely: peak at 0 dBFS with a high flat factor",
"true peak above -1 dBTP"
]
}
]
}
[exit 0]
The [exit 0] line is the exit code, added by the run that produced the output; mw.py prints only the JSON.
-
Getting started: install the plugin or the skills, what
mw.pyneeds,doctor, the first commands. - The skills, one page each: the hub, generate, compose, produce, game, score, curate.
-
Commands: all 26
mw.pycommands and their options with real output. - Recipes and loudness presets: the nine generation recipes, the eight loudness presets, overriding them.
-
The project contract and studio: the project folder,
music.json, the ledger and the private studio other plugins and later sessions read. - Workflows: a game loop, a film score under dialogue, a finished download and choosing between takes, end to end.
- Errors and edge cases: every error a run showed, exit codes, and the behaviour the README does not mention.
- FAQ: listening, licences, Suno and Udio, game loops in Unity, GPUs, privacy.
- Works with: the plugins it pairs with and why.
- Versions and upgrading: the releases, what changed in each, and what to check when you upgrade.
- Development: the checks, the tests, CI and how a release is made.
Elsewhere: the README, the CHANGELOG, the research notes and the issues. These pages describe release 0.1.17 (tag v0.1.17, commit 6eef41b, 2026-11-06).
The commands new since 0.1.17 were run on 2026-11-07 on Windows from v0.1.19, so outputs elsewhere still say 0.1.17. Every other command on these pages was run on 2026-11-06 from a fresh clone of the v0.1.17 tag (6eef41b), in an empty scratch folder, on Windows 11 (Python 3.14.6, ffmpeg 9.0.1, librosa 1.0.0) and on Linux (Ubuntu under WSL 2, Python 3.14.4, a static ffmpeg 7.0.2, no librosa). Apart from the versions doctor prints and the wording of one argparse message, the two runs printed the same output, with three exceptions: the path separators (\ on Windows), the commands that need librosa, and the quietest bands of mixcheck on files the 7.0.2 build has to pad (the flags are the same). On 0.1.1, mixcheck and compare stopped on that Linux ffmpeg for two files; 0.1.2 measures them there too, and since 0.1.6 their loudness, true peak, length and contour there match the Windows run (Errors). Most outputs come from the Linux run; the pages say where an output comes from the Windows run (doctor against a local ComfyUI, analyze and transcribe with librosa, mixcheck and compare). The audio is synthetic: the repository's test fixtures (tests/fixtures/: 8 kHz tones and two notation files) and stand-in takes made with ffmpeg, shown on Workflows. No take was generated with a model for these pages, and gen appears only with --dry-run, against a closed port, or (for --no-wait and --collect) against a small stand-in inside the verification program that serves one fixture as every take. render used its built-in synth (neither run was given FluidSynth). The scratch folder prints as <work>, the clone as <plugin>, and local timestamps as <now>.
This wiki describes musicwright 0.1.19 (tag v0.1.19, commit 3211a94) and was last updated on 2026-11-07. The plugin is MIT licensed. Report problems in the issues.
Using it
- Getting started
- Commands
- Recipes and loudness presets
- The project contract and studio
- Workflows
- Errors and edge cases
- FAQ
- Works with
The skills
- musicwright (hub)
- musicwright-generate
- musicwright-compose
- musicwright-produce
- musicwright-game
- musicwright-score
- musicwright-curate
The releases
Contributing
Elsewhere