Skip to content
m4bwav edited this page Nov 11, 2026 · 12 revisions

musicwright

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.

Pages

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).

How the examples on these pages were made

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

Clone this wiki locally