{"slug": "a-claude-code-mod-plays-midi-music-when-it-works", "title": "A Claude Code mod plays MIDI music when it works", "summary": "An engineer released miod, a Claude Code plugin that generates live MIDI music reflecting what the AI coding agent is doing, requiring Claude Code 2.1.290 or newer on macOS. The mod assigns each task a flavour, key, scale, chord progression, tempo and sound, with 13 moods (thinking, reading, editing, running, failing and others) that each have 10 variants and change whenever the agent's activity changes or every 4 phrases. It is installed via the Claude Code plugin marketplace from delexw/miod and can be toggled with /miod on, /miod off and /miod wave commands.", "body_md": "Important\n\nOnly tested on macOS. Not sure yet how it behaves on Linux or Windows.\n\nI'm an engineer, but these days I solve the boring problems entirely by vibe coding. Somewhere along the way I felt I had lost the creativity and curiosity I used to have when writing code myself.\n\nSo I started thinking about how to make vibe coding fun again. miod is the first try: while the agent does the work, you get to hear it think, read, edit, fail and fix, with a little piece of music no one has heard before.\n\nFeel free to add more moods, flavours and styles. Each mood is one row in `hooks/moods.ts`, each flavour one row in `hooks/flavours.ts`, each sound style one entry in `hooks/styles.ts`, and each wave look one file in `hooks/waves/`.\n\nFeeling it's a bit too noisy? 🙉 No hard feelings. Just [turn it off](#usage) with `/miod off`.\n\nA Claude Code mod (MIDI + mod) that writes music on the spot while Claude works. No music files, no library, no AI model.\n\n- Every task picks its own flavour (lo-fi, chiptune, ambient, jazzy and 8 more), key, scale (16 of them), chord progression, tempo, sound and theme.\n- The mood follows what the agent is doing. Every mood has 10 variants, and a new one is picked as the task goes: whenever the activity changes, and every 4 phrases. The task's flavour bends it too, so editing in a lo-fi task sounds nothing like editing in a chiptune one.\n- The faster it spends tokens, the busier the music.\n- Above the prompt, one line shows the mood, flavour, key, tempo and energy, with a wave under it that scrolls with the music, coloured by mood:\n\n- Tasks flow into each other: the next task fades in, in a related key. If no new task comes, a closing chord fades out at the end of the phrase.\n\nNeeds Claude Code 2.1.290 or newer, on macOS.\n\n```\nclaude plugin marketplace add delexw/miod\nclaude plugin install miod@miod\n```\n\nThen start a new session.\n\n```\n/miod        is it on or off?\n/miod off    stop the music\n/miod on     play again from the next task\n/miod wave   list the wave looks: bars, line, mirror, dots, pulse\n/miod wave dots   switch the wave to the dots look\n```\n\nEach row below is the mood's first variant. All 10 are in `MOODS` in `hooks/moods.ts`.\n\n| The agent is… | When it uses… | Sounds | \n|---|---|---|\n| thinking | no tool | calm | \n| reading | Read, Grep, Glob, MCP tools | airy | \n| exploring | WebSearch, WebFetch | curious (lydian) | \n| planning | TodoWrite, plan mode | hopeful (major pentatonic) | \n| asking | AskUserQuestion | waiting, almost silent | \n| editing | Edit, Write | bright (major) | \n| running | Bash | driving beat | \n| installing | npm, bun, pip, brew… install | patient (minor pentatonic) | \n| testing | test, check, lint, tsc | focused (dorian), busy beat | \n| shipping | git commit, push, merge, gh pr | triumphant (mixolydian) | \n| deleting | rm -r, git reset --hard, git clean | ominous (phrygian), low drone | \n| delegating | Agent | one harmony voice per subagent | \n| failing | a Bash command that failed | tense (minor), until a command passes | \n\nWhen several happen in one 8-beat phrase, the one higher in `STRONGEST_FIRST` (`hooks/activity.ts`) wins. A filling context window lifts the melody and, past 80%, adds a low drone.\n\nThe scales follow how musicians describe each mode ([musical-u](https://www.musical-u.com/learn/the-many-moods-of-musical-modes/), [Jiang et al. 2024](https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2024.1414014/full)).\n\n- **Mood variant:** add a row to that mood's list in`MOODS` in`hooks/moods.ts` .\n- **New mood:** add the name to`Activity` and`STRONGEST_FIRST` in`hooks/activity.ts` , map tools or commands to it there, and give it a list of at least 10 variants in`MOODS` .\n- **Flavour:** add a row to`FLAVOURS` in`hooks/flavours.ts` . Each field nudges every mood: brighter or darker scale, busier or calmer, drums up or down, swing, bass line.\n- **Scale or chords:** add to`SCALES` or`PROGRESSIONS` in`hooks/theory.ts` .\n- **Wave look:** add a file to`hooks/waves/` that exports a`WaveLook` (how many rows, and a`draw` function), then list it in`WAVES` in`hooks/waves/index.ts` .\n- **Style:** add a wave function to`STYLES` in`hooks/styles.ts` . It must return values between -1 and 1.\n\nThen check it:\n\n```\nclaude plugin validate .\nclaude plugin test .\n```\n\nRun a checkout without installing it with `claude --plugin-dir <path to this repo>`.\n\n- Only tested on macOS, where Claude Code plays the audio through `afplay` .\n- The sound is simple chiptune-style tones.\n- miod only hears the session it's loaded in.", "url": "https://wpnews.pro/news/a-claude-code-mod-plays-midi-music-when-it-works", "canonical_source": "https://github.com/delexw/miod", "published_at": "2026-10-07 23:06:24+00:00", "updated_at": "2026-10-07 23:18:56.749544+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "generative-ai"], "entities": ["Claude Code", "miod", "delexw", "macOS", "Linux", "Windows"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/a-claude-code-mod-plays-midi-music-when-it-works", "markdown": "https://wpnews.pro/news/a-claude-code-mod-plays-midi-music-when-it-works.md", "text": "https://wpnews.pro/news/a-claude-code-mod-plays-midi-music-when-it-works.txt", "jsonld": "https://wpnews.pro/news/a-claude-code-mod-plays-midi-music-when-it-works.jsonld"}}