Skip to main content
Glama
README.md
<p align="center"><img src="frontend/public/logo.svg" alt="medit logo" width="96"/></p>

<h1 align="center">medit โ€” open-source AI music editor you can drive with words (MCP)</h1>

<p align="center">
  <strong>A free DAW that an AI agent can use for you.</strong><br/>
  Tracks, clips, piano roll, built-in synths, FM keys, plucked strings and drum kits, effects,
  buses, automation, mixing and mastering to a loudness target โ€” and a music-theory engine that
  turns "a sad lo-fi song in A minor" into chords, beats, bass lines and melodies you can edit by hand.
</p>

> ๐Ÿ‡ฎ๐Ÿ‡น Italiano: [README.it.md](README.it.md) ยท Sister projects: [editorvideo-ai (vedit)](https://github.com/metiutek/editorvideo-ai),
> [editorimage-ai (pedit)](https://github.com/metiutek/editorimage-ai)

## Install

```bash
uv tool install medit-mcp
medit ui
```

The editor opens at <http://127.0.0.1:8780>. Let Claude Code write music with you:
`claude mcp add medit -- medit-mcp`. Something wrong? `medit doctor`.

## What it is

An ordinary DAW โ€” arrangement, piano roll, mixer, effects โ€” where **everything you can do with the
mouse, an AI can also do on command**. The buttons, the built-in assistant and any MCP agent call
the exact same operations. Nothing is AI-only, nothing is mouse-only, and nothing is destructive:
notes stay notes, effects stay editable, imported audio is never rewritten, every step undoes.

| | |
|---|---|
| **Writes real music** | Chords from symbols or roman numerals (`vi IV I V`, `ii7 V7 Imaj7`, `i bVI bIII bVII`) with keyboard-player voice leading; 10 chord styles, 9 bass styles, arpeggios, 14 drum genres with fills and swing; melodies in a text notation (`E5:1 D5:0.5 r:1 [C4 E4 G4]:2`). |
| **Sounds on its own** | 31 built-in sounds โ€” pianos, e-piano, pads, strings, supersaw, 808, reese, acid, guitars, harp, 5 drum kits โ€” rendered in numpy, levels calibrated in LUFS. Plus a sampler for your own files. |
| **The agent can't hear, so it looks and measures** | `preview` returns the arrangement, the piano roll or a spectrogram as an image; `analyze_mix` gives LUFS, true peak, band balance and stereo; `review_song` flags clipping, mud, harshness, notes out of key, bass in the wrong register, overlaps โ€” each with the tool that fixes it. |
| **Mixes and masters** | 21 effects (EQ, compressor, true-peak limiter, convolution reverb, tempo-synced delay, chorus, saturation, lo-fi, pumpโ€ฆ), buses and sends, automation, `balance_mix` gain staging, `auto_master` to -14 LUFS / -1 dBTP. |
| **Works with your files** | Import WAV, MP3, FLAC, OGG, AIFF (m4a and video audio with ffmpeg) with BPM and key detection; import and export MIDI; export mixdown and stems. |
| **Generative AI, local or with your key** | `generate_song` makes a whole sung song from a style and your lyrics (ACE-Step 1.5 in ComfyUI, or ElevenLabs Music); `generate_audio` makes loops and effects N bars long (Stable Audio, Replicate); `separate_stems` splits vocals/drums/bass (Demucs); `audio_to_midi` turns humming or beatbox into notes; `convert_voice` re-sings a vocal with **your own voice model** (Applio RVC). Everything lands on new tracks. |
| **Remembers you, and asks** | Shared memory across songs, clickable questions in the editor, versions you can compare, a chat saved next to each song. |

## Driving it from an agent (MCP)

```bash
claude mcp add --transport http medit-live http://127.0.0.1:8780/mcp/   # the song open in the browser
claude mcp add medit -- uvx medit-mcp                                      # stdio
```

```
project_create(bpm, key) โ†’ structure โ†’ add_drums / add_chords / add_bassline / add_melody
  โ†’ set_instrument / add_effect / add_bus + set_send โ†’ preview + analyze_mix
  โ†’ review_song โ†’ auto_master โ†’ export_audio (only when the user asks)
```

## Development

See [AGENTS.md](AGENTS.md). `pytest` (backend), `cd frontend && npm run build && npm test` (UI).

MIT license.

TDQS

C2.9/5.0

Scored across 92 tools

Disambiguation4/5

Most tools target a clearly distinct resource+action (add_chords vs add_bassline, list_effects vs apply_chain, preview vs analyze_mix vs review_song), and the long descriptions actively steer selection. A few boundaries still blur: set_notes vs add_notes vs edit_notes, add_audio vs import_audio, and structure vs add_section can be confused at a glance, though the descriptions disambiguate them.

Naming Consistency4/5

The dominant convention is consistent snake_case verb_noun (add_track, set_clip, remove_effect, export_stems), applied across nearly the whole surface. Deviations are noun-only or bare-verb names (preview, batch, transpose, quantize, structure, snapshot, undo/redo, memory), which are still readable and conventional but break the pattern.

Tool Count2/5

92 tools is far beyond what an agent can hold in working context, and the listing is long enough that discovery itself becomes a problem. The DAW domain is genuinely broad so few tools are outright redundant, but this surface should be split (editing, mixing/analysis, AI generation, project/versioning) or funnelled through batch.

Completeness5/5

Coverage is exceptional: project lifecycle, tracks/buses, clips, note editing, song sections, effects chains, automation, mixing analysis, AI generation/separation, import/export, snapshots/versioning, undo, UI and user memory. I struggled to find a real dead end โ€” even recovery (undo, restore_snapshot), guidance (review_song naming the fixing tool) and progressive disclosure (preview detail levels) are present.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues