owoevan-dev/music-skill
Sobre
An Agent Skill that writes original instrumental music as editable notes, then performs, mixes and masters it on free sampled instruments (CC0 or free for any use) and synthesizers. MIDI, stems and game loops; no audio-generation model.
Design e mídiaCrescimento medido de estrelas
- em 24 h
- +6
- em 7 dias
- +25
- em 15 dias
- +66
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Original
English · 繁體中文 · 简体中文 · 日本語 · 한국어
Don't generate it. Compose it.
music-skill is an Agent Skill for writing original instrumental music the way a composer and a small studio would. The agent writes every note. The skill checks the score, plays it on sampled instruments, mixes it and masters it.
No audio-generation model is involved. Besides the MP3 and WAV you get the MIDI, a stem per part, and a project file in which any note can be changed and rendered again.
Each piece starts from twelve words drawn at random. The agent links them with your request into one scene, and the scene decides what you left open, so two pieces from one request come out less alike. You can give your own words, or none.
https://github.com/user-attachments/assets/c3ed1032-8239-42ee-82c1-b0ed69fa7651
Listen
Nine pieces by Claude Opus 5.5 at xhigh effort. Each was made in one take from one message, an opening that is the same for all nine and a brief of a few sentences: the agent chose the title, the form and the sounds, wrote every note, and reviewed and revised its own work. Nobody replied to it while it worked, and nobody edited the notes it wrote. Each brief was run once, and all nine are here. Each page shows the twelve words the piece drew and the scene the agent made of them.
![]() Noon Comes Down the Canyon indie rock and folk-pop, for a band, 2:36 how it was made |
![]() Raft of Lace a virtuoso solo piano, in the manner of an anime theme, 3:14 how it was made |
![]() Neon Cloverleaf synthwave, an evening drive, 2:37 how it was made |
![]() Heron Hour a lo-fi beat for studying, which loops, 2:05 how it was made |
![]() Below the Bungalow melodic house, 3:12 how it was made |
![]() A Braid of Three Roads a fantasy adventure theme, Celtic in colour, 2:41 how it was made |
The Haystack Beacons an epic trailer cue, for full orchestra, 2:30 how it was made |
![]() The Florist Rows Home a relaxed swing tune, for a jazz quartet, 2:34 how it was made |
![]() Halftime at Dusk a gentle solo piano, 2:33 how it was made |
Compositions and recordings are CC0; the recordings are MP3 files on the release examples-6. The six examples of 0.7.0, by six models, are on the release examples-5. Before and after changes one note of a short piece, and compare shows everything in the render that changed with it: the part, its bus, the reverb's tail and the master.
Quick start
Install the skill. In Claude Code:
/plugin marketplace add owoevan-dev/music-skill /plugin install music-skill@music-skillIn the Codex CLI:
codex plugin marketplace add owoevan-dev/music-skill, thencodex plugin add music-skill@music-skill. Other agents:npx skills add owoevan-dev/music-skill.Ask your agent to set up the renderer and the sound banks. It runs the commands under Install: about 3.7 GB of downloads, then about five minutes on our test machine.
Ask for a piece in plain words:
Write a one-minute looping town theme for my RPG: recorder, harp and light strings.
You get an MP3 and a WAV, the MIDI, a stem per part, the buses and reverb returns that add up to the mix, and the project file.
Making a game? sfx-skill designs its sound effects the same way: every sound is built from editable layers, with no audio-generation model, and exports to Godot, Unity, Unreal, Roblox and the web.
Why not just generate it?
| A text-to-music model | music-skill | |
|---|---|---|
| Changing one note | regenerate the piece or a section | edit the note; the parts it does not affect come from the cache |
| What you get | an audio file | audio, MIDI, a stem per part and the project |
| Where the sounds come from | inside the model | recorded instruments and synthesizers, each named with its licence |
| Fitting a scene or a level | roughly | to the bar: loop points, hit points, exact lengths |
| The same piece again | a new take | the same audio from the same project (Surge XT parts aside) |
If Claude or another agent is already cutting your video or building your game, it knows what the music has to fit: how long each scene runs, where the cuts land, when the narration starts, how a level loops. It can write to those numbers, with a swell that peaks on the reveal, a quieter bed under the voice, a loop as long as the level, and when the edit changes, rewrite just the bars that moved.
How it works
The six steps in detail
- Write. The agent settles what the request asks, then draws twelve words at random for the piece and links the request and all twelve into one whole, a scene or a story, which decides what the request left open: the title, the form, the sounds. It writes a plan (what identifies the piece, where its high point is and by what means, what each section commits to), then the project file. Every note's pitch and length go in the score; how it is played (velocity, timing, release) is kept separately. A longer piece is usually written by a short Python script the agent creates, so voicings, bass lines and drum patterns stay readable.
studio.py startwrites its first version: the sections and parts named, each part's instrument found in the installed banks, and a small builder that keeps the books (stable note ids, how each note is played, every note checked against the keys its instrument has samples for). The score can change meter from section to section, and, for most styles, a writing vocabulary (studio.py vocabulary) lists progressions, cadences, textures and rhythms that published sources document, for the agent to start from or vary. - Check the score.
reviewopens with three tables counted from the score (the parts that sound in each section, how often the chord changes, the melody's rhythm) and reads the score against the plan, asking where they differ. It lists sustained minor seconds and ninths between parts; names every note outside the written chords as a passing note, a suspension or another embellishing tone, asking about those not resolved by step; and lists parallel fifths and octaves between independent parts and close intervals too low in the register. Every question has an identifier, and a written decision that begins with it answers it: each one becomes a decision instead of an accident. - Perform. A performance model adds the kind of deviation players produce: a slow wander in timing and loudness for each player, a laid-back bass, phrase arches, chords whose notes are not struck or released together. Sampled leads can slur and bend. A new piece is also rendered with performance defaults, each of which can be switched off: one tempo line for every part, easing at the ends of phrases, before each section and into the close; swells on sustained instruments; a piano pedalled with the harmony and its melody brought out; strummed guitar chords; a drum backbeat a hair late. The render records what it applied.
- Render. FluidSynth plays each sampled part on its own instrument from licensed SoundFont banks. Electronic parts play on built-in synthesizers and drum machines, or on presets of the Surge XT synthesizer. An electric guitar or bass can be played string by string, with palm mutes and dead strokes, through an amplifier with five guitar voices and a bass voice.
- Mix and master. Parts go through drum, bass, rhythm, ensemble and lead buses and four generated reverbs, then a master chain to the project's loudness target (−16 LUFS by default, −14 for streaming) with the true peak at or below −1 dBTP. With the mix's newer rules the lead stays close to where you write it and the master ends in a true-peak limiter, and an orchestral piece can say how near it is heard, from among the players to a seat in the hall. Each part can have its own EQ, compressor, noise gate and effects, among them Surge XT's reverbs, chorus, flanger, phaser, rotary speaker, distortion, delay, tape, granular, ring-modulation and frequency-shifting effects and the 75 Airwindows algorithms inside them, and after a Surge XT chain the part comes back to the level it went in at. Before the first round the agent checks every part, settles which parts carry the low end, and decides each part's treatment once, by its role and style, from a catalog that says what each tool does and what the style's published sources document (
studio.py effects). Orchestral and organ music can skip the compressors and keep their full dynamics; electronic music can add sidechain ducking, tempo-synced delays, filter sweeps and a loud club master. A part can move across the stereo image, and a mix can also come as a headphone version with each part at a direction around your head. - Measure.
analyzereports each section's level, spectrum and stereo image, how far the melody sits above the accompaniment, and how the master's tonal balance compares with published measurements of commercial recordings or with a reference in its genre. The numbers point at problems; they do not replace listening.
Changing a note synthesizes its part again. A part plays its processed stem from the cache, as a DAW plays a frozen track, while nothing it depends on has changed, including its notes, performance and mix, the tempo as played and any part that its ducking follows. In a piece with the performance defaults, an edit that moves the shared tempo line (one melody note can) has the other parts synthesized again too. Every render mixes all the parts again, so the shared reverbs, their tails and the master follow the change. Each revision is one round: it checks the score, renders a draft (the same audio, without the files only delivery needs), measures it and compares it with the previous round, with a short summary of each. compare shows what changed between two renders: which parts were synthesized again, and which stems, buses and reverb returns changed, where and by how much.
For a game, a project can loop. The render folds the reverb tail back into the loop start and writes the loop points into a WAV and an Ogg file, in the forms Godot and RPG Maker look for, with a cue point at every section. It can also split the loop into layers that add up to the mix, for music that builds as play heats up.
To show a piece, studio.py video turns a render into a scrolling piano roll with the master as its sound: every note as it was played, each part named in a legend that lights while it plays (in a large ensemble, the names that do not fit are counted as "+N more"), under 10 MB by default (the size GitHub takes for a video). studio.py still draws one moment of it as a picture.
More
Install
Where it runs. On your own computer, through an agent that runs commands there: it is tested in Claude Code and Codex. The setup needs internet access once and keeps its folder for later sessions, from about 1 GB to about 12 GB with every bank. In claude.ai chat and Cowork it has not been tested; a sandbox that is offline or reset between conversations cannot keep the setup.
Claude Code
/plugin marketplace add owoevan-dev/music-skill
/plugin install music-skill@music-skill
To update: in /plugin, open it on the Installed tab and choose Update now, or run claude plugin update music-skill@music-skill in a shell. A third-party marketplace does not update by itself unless you turn that on for it (the Marketplaces tab in /plugin).
Codex CLI
codex plugin marketplace add owoevan-dev/music-skill
codex plugin add music-skill@music-skill
To update: codex plugin marketplace upgrade music-skill, then codex plugin add music-skill@music-skill again.
Other agents
npx skills add owoevan-dev/music-skill
To update: npx skills update.
Or copy skills/music-production into your agent's skills folder.
The renderer, once per machine. Your agent can run these for you. In the commands, <folder> is a folder you choose outside the skill's own folder; the setup stays there.
Python 3.10 or newer with NumPy. On Linux and macOS a virtual environment keeps NumPy apart from the system's Python and makes python the command below (Debian and Ubuntu need sudo apt install python3-venv first):
python3 -m venv .venv && . .venv/bin/activate # Windows: py -m venv .venv, then .venv\Scripts\activate
python -m pip install -r skills/music-production/requirements.txt
The piano-roll video and picture also need Pillow, which the setup leaves to you: python -m pip install pillow.
Windows x64 downloads pinned portable builds of FluidSynth and FFmpeg, and the Surge XT synthesizer and its effects (Surge XT Effects, from the same archive) with the plugin host that runs them (about 55 MB) and its 3,008 patches (about 217 MB); leave the patches out with --no-surge-catalog, or all of Surge with --no-surge:
python skills/music-production/scripts/bootstrap.py --runtime <folder>/.runtime --config <folder>/local-config.json
Linux (Ubuntu 24.04, Debian 13 or newer) and macOS use the system packages; Surge XT and its patches are downloaded as on Windows (on Linux, for x86-64):
sudo apt install fluidsynth ffmpeg libarchive-tools # macOS: brew install fluid-synth ffmpeg
python skills/music-production/scripts/bootstrap.py --system --runtime <folder>/.runtime --config <folder>/local-config.json
On macOS, Homebrew's ffmpeg cannot write a game loop's Ogg copy (loop.ogg). For it, run brew install ffmpeg-full and add --ffmpeg "$(brew --prefix ffmpeg-full)/bin/ffmpeg" to the bootstrap.
Then the sound banks, as this project built them: all thirty-one are about 3.6 GB to download and 8 GB installed, and the downloads stay in the runtime folder unless you add --delete-sources, so keep about 12 GB free. --only orchestra, band, world or examples (the banks the examples use) installs a group, or name the banks (--only vcsl,rusty); a project that needs a bank you haven't installed stops with the command that adds it. --from-source builds the banks from their publishers' samples instead.
python skills/music-production/scripts/fetch_soundbanks.py --config <folder>/local-config.json --runtime <folder>/.runtime --output <folder>/local-config.studio.json
No GPU, no account, no audio model. Every download comes from its publisher or this project's own release and is checked against a pinned SHA-256.
What it runs, fetches and sends. The skill runs its Python scripts, FluidSynth, FFmpeg and, if installed, Surge XT, all on your computer, and renders offline. Its own downloaders fetch tools and sound banks only from github.com and GitHub's download hosts (api.github.com, raw.githubusercontent.com, objects.githubusercontent.com, release-assets.githubusercontent.com), the pedalboard wheel for Surge XT from PyPI's file host (files.pythonhosted.org) and, when a bank is built from its sources, from the University of Iowa's theremin.music.uiowa.edu, and they refuse a redirect to any other host. The setup checks the pedalboard wheel against its pinned size and SHA-256 and has pip install that file without going online; NumPy comes through pip, from PyPI unless you have set pip to use another package index. It sends nothing: no telemetry, no account, no uploads (PRIVACY.md).
Using it
Ask your agent in plain words:
Write a 90-second instrumental for the title screen of my puzzle game: warm, a little melancholic, piano and strings.
Make an anime-opening-style track in TV size: a guitar band with a piano melody.
Write a looping cue for a sad scene in my visual novel: soft piano and cello, quiet enough to read over.
Write two minutes for full orchestra: a sunrise, from a quiet horn solo to the whole orchestra.
Make a synthwave cue for a night drive in my racing game: 100 BPM, a gated snare and a gliding lead.
Write a bossa nova for a rainy café scene: nylon guitar, flute and a soft kit.
Start from these words instead of random ones: lighthouse, ferry, frost.
No random words for this one.
Make a piano-roll video of the finished piece for my project page.
Build an instrument from my own samples in ~/samples/kalimba (files named like kalimba_C4.wav) and use it for the melody.
The chorus melody in bar 33 is too busy. Simplify it and render again.
What changed from the last version? Let me hear the difference.
Send me the MIDI and the stems too.
Sound banks
| Instruments | Banks | Licence |
|---|---|---|
| Pianos and keyboards | Steinway B, a Kawai grand, upright pianos, harpsichords, Yamaha TX81Z FM voices and a pipe organ from VCSL, by Versilian Studios; the Osiris Piano, recorded with and without the sustain pedal, by Karoryfer Samples | CC0 |
| Orchestra | Strings (also by section, tremolo and pizzicato), brass, trombone, tuba, double bass, woodwinds, piccolo and glockenspiel from VSCO 2 Community Edition, by Versilian Studios; harp, mallets, tubular bells, timpani and orchestral percussion from VCSL; horn, bass trombone, clarinets, flutes, solo strings and percussion from the University of Iowa Electronic Music Studios | CC0; Iowa: free for any use without restrictions |
| Band | FreePats FSBS electric guitars (two distorted, one clean); Bass YR, picked and finger, samples by Andrea Biasior; from Karoryfer Samples, Big Rusty Drums, a five-string bass, a pizzicato double bass, an archtop guitar, a baritone sax and a tuba; a solo cello by Karoryfer Lecolds and bigcat instruments; a nylon-string classical guitar from the University of Iowa Electronic Music Studios | CC0; Iowa: free for any use without restrictions |
| Solo and world | Tenor sax, saxello, recorders, ocarina, harmonicas, folk harp, dan tranh, psaltery, kalimbas, balafon and world percussion from VCSL; an erhu; a tenor steel pan; a sung "ah" | CC0; steel pan: Unlicense |
| Synthesizers | Built-in synthesizers and drum machines; Surge XT with its 3,008 factory and third-party patches, fifty of them curated, and Surge XT Effects; optional and installed by default | built in: MIT; Surge XT and Surge XT Effects: GPL-3.0-or-later, run by separate GPL programs |
| Everything else | MuseScore MS Basic | MIT |
Every recorded bank is CC0, free for any use without restrictions (the Iowa recordings) or dedicated to the public domain (the steel pan), so what you make with them needs no credit. Surge XT and Surge XT Effects are GPL-3.0-or-later and run only inside separate GPL programs of this project (surge_host.py, surgefx_host.py); the GPL covers the programs, not the music they play. MS Basic, the General MIDI bank that other parts fall back to, is MIT: its notices go with copies and adaptations of the bank, and music played on it needs no credit either. THIRD_PARTY.md lists the sources and how we read each licence.
How well it works
selfcheck.py runs 264 checks (211 without a renderer configuration), from MIDI round trips and archive safety to real renders. In its test piece, a one-note revision synthesizes one part again, and compare finds the change from that note on, in every file it reached and nowhere else. The older single-room mix reproduces an earlier release bit for bit. The loudness meter reads −3.01 LUFS for the BS.1770 reference tone. CI runs every check, renders included, on Ubuntu with FluidSynth 2.3 and FFmpeg 6.1, on macOS with FluidSynth 2.6 and FFmpeg 9.0, and on Windows with the pinned FluidSynth 2.6.3 and FFmpeg 9.0.2 and with Surge XT.
Whether the music is good is another matter, and only listening can tell. The pieces above are the best evidence this repository has.
Questions
Can I use the music in a video, a game or a commercial release? The skill and the sound banks it installs ask nothing of what you make with them. No sound bank asks for a credit: the optional ones are CC0 or free for any use, and MS Basic's MIT licence asks nothing of music played on it. The GPL programs (FFmpeg, Surge XT, Surge XT Effects) cover the programs, not the music that passes through them. Whether you hold a copyright in music an agent wrote for you depends on your country's law and on how much of it you shaped.
Which agents can use it? Any agent that loads Agent Skills and can run Python: Claude Code and the Codex CLI as a plugin, and others through npx skills.
Does it need the internet or a GPU? The internet only for setup; rendering runs offline on the CPU. Your project files reach no one except through your agent, which sends what it reads to its own model.
Can I use my own instruments? Any SF2 bank: studio.py add-soundfont adds it to your configuration and a part names it (soundbanks.md). A bank you add keeps its own licence, so check it before you publish music made with it. From your own recordings, soundbank.py folder builds a bank in one command, reading each sample's pitch from its file name, and soundbank.py sfz builds one from an SFZ instrument, naming whatever of it the bank cannot hold (soundbank-building.md).
Limits
- It doesn't sing or write lyrics. Of plugins it runs only Surge XT and Surge XT Effects; your own VST plugins are not supported yet.
- An SFZ instrument is read as a subset: its crossfades become splits, and its controllers, filters and effects are listed as not used.
- The sound is only as good as the free banks. The YR basses have one velocity layer, the section strings speak slowly, marimba, xylophone and piccolo are sampled sparsely, and a sampled guitar bend shifts the whole sample instead of changing the string's tone.
- No bank yet covers steel-string acoustic guitars, a choir or East Asian instruments beyond an erhu and a dan tranh; such parts fall back to MS Basic's sparse General MIDI samples.
- Surge XT starts its oscillators at random phases, so a Surge part is a slightly different take each time it is synthesized; the render cache keeps a take until one of its synthesis inputs changes. Its tempo-synced delays and LFOs follow one tempo per part, the written tempo most of its notes start under, so a pickup or a ritardando does not set it and a later tempo change does not move it. Everything else renders the same every time.
- The agent cannot listen.
reviewandanalyzelocate problems; a person has to hear the result, and the skill tells the agent never to claim it listened. - A long piece with many synthesizer or effect parts needs memory, up to about 2 GB for each part rendered at once; the renderer runs fewer parts at a time when free memory is short, and
--jobssets the number. - Linux and macOS use the system FluidSynth and FFmpeg, so their samples can differ slightly from the pinned Windows builds.
Documentation
| SKILL.md | The workflow the agent follows, and every command |
| schema.md | The project file: score, performance and mix |
| arrangement.md | Form, melody, voicing and the jobs of the parts |
| performance-and-mix.md | Performance and the bus chain |
| measuring.md | Reading analyze and compare |
| soundbanks.md | The sound banks and adding your own; their presets, measured quirks and building a bank in the files it links |
| outputs.md | What each command writes, key by key |
| Genre guides | Electronic music and techno, hip-hop beats and trap, jazz, blues, bossa nova and funk, rock and metal, pop and ballads, film scores and horror, anime openings, game and scene music, orchestra, baroque, organ, piano and chamber music |
| setup.md | Installing the renderer on Windows, Linux and macOS |
| sources-and-rights.md | Using outside scores, MIDI and samples |
Contributing
Bug reports, listening notes and sound bank suggestions are welcome as issues. Questions and ideas go to Discussions, where you can also share music you made with the skill. Pull requests to the documents and translations are welcome; CONTRIBUTING.md says what is open for now and how a pull request goes.
Licence
MIT for this project's own code and documentation, except the two plugin hosts named below; third-party data, measurements of it and quoted excerpts keep their own terms, listed in THIRD_PARTY.md. The example recordings and compositions are dedicated to the public domain under CC0 1.0. Third-party tools and sound banks keep their own licences and are not in this repository: the tools come from their publishers and all thirty-one banks from this project's release, twenty-five built from the publishers' samples and six repacked unchanged from FreePats. skills/music-production/scripts/surge_host.py and surgefx_host.py are GPL-3.0-or-later, the licence of the Surge XT and Surge XT Effects they run; pedalboard, which loads them, is GPL-3.0. The pictures of the examples are drawn by code from their project files, their lettering in Noto Sans TC (SIL Open Font License), and the logo's lettering is Noto Serif TC (SIL Open Font License) turned into outlines.
Explore projetos relacionados
Carregando…







