Audio as Code presents

Describe the music your video, game or slides need. Your agent writes the score. Audio as Code brings the band.

Give it to your agent
Tempo
– BPM
Voices
–
Notes
–
Seed
–

An open-source music framework for creative agents. Compose with {{PLAYABLE}} instruments synthesized from code, take the WAV into your project, and keep every note editable. No recorded samples.

Writing it yourself? Developer quickstart · Get the source. Version {{VERSION}} · Python 3.10+.

Give it to your agent

Give your project a soundtrack. A tiny dragon's boss fight. A quarterly report with a villain arc. A launch video with a pulse. Describe the scene; your agent composes the music and delivers a WAV you can use. You can change the score whenever the scene changes.

  1. {{HANDOFF_NOTE}}

  2. Copy the prompt

    Prompt for your coding agent
    Use Audio as Code to create the music in the brief below.
    1. Read the skill at skills/audio-as-code/SKILL.md and the guide index at llms.txt on the Audio as Code website.
    2. If you don't already have an Audio as Code checkout, download {{ARCHIVE}} from the same website and extract it into a new project folder. Then follow its bundled skills/audio-as-code/SKILL.md.
    3. Install its Python dependencies, compose an original score (Audio as Code makes instrumental music and cues, not speech or sound effects), then validate and render it locally.
    4. Deliver the WAV, the MIDI file, the editable score JSON, the Python source you wrote and the render report. If I'm working in a video, game or presentation project, put the WAV where that project expects audio and keep the score and source beside it for revisions. Then tell me what you would try next.
    
    Music brief:
    A tiny dragon thinks this is the final boss fight. A 16-second battle cue for my game: timpani and drums, low brass stabs and a frantic string ostinato at about 150 BPM, then a separate 2-second victory sting. Deliver each cue as its own WAV for the game's audio folder, and keep the editable scores.

  3. Paste it in, then listen

    Your agent writes and renders the music, then places the WAV in your creative project. Keep the whole composition for the next revision:

    • WAV ready for your project
    • MIDI notes for your DAW
    • score.json the editable score
    • source the composition code
    • report duration and level checks

    Then ask for changes the way you'd talk to a musician:

    Keep the melody. Give it to the marimba, calm the drums down, and land the final note on the reveal.

Working in Hyperframes, Codex or Claude Code? The integrations guide has recipes for a video timeline, a game's audio folder and a slide deck.

{{PROGRAM_INTRO}}

Inside the score

      Follow the notes. Each instrument has its own color and pattern.

      Score credits

      {{CREDITS_NOTE}}

      {{CREDITS_LINKS}}

      Play streams a compressed preview. Download WAV for the full render, or MIDI to continue in a DAW with its own instrument sounds.

      The loop your agent runs

      A few lines become a score you can hear and change. Run this example yourself, or let your agent do the typing.

      1. It writes a score

        {{LOOP_CODE}}
      2. It renders, you listen

        Run it from a terminal:

        {{LOOP_CLI}}
      3. It measures, then revises

        {{LOOP_METERS}}

        Level checks catch silence and clipping. Your ears decide whether the music works.

      Keep the good bit. Change the rest.

      The melody, timing and instrumentation stay in an editable score. Your agent can make a precise change and render another take.

      Read the agent guide

      Take one

      {{PLAYABLE}} instruments, all synthesized

      Pluck a string, strike a bell, call in the brass. Every voice is generated from equations. These are playful, simplified instrument models; audition them to find the character your piece needs.

      Shape the timing, move parts across the stereo field, and give the ending room to ring. Explore tempo, movement and space.

      Open the instrument library

      {{CLIPS}} preview clips: a famous-music arrangement, a phrase, and a single note or hit for every voice.

      A small, opinionated orchestra

      Get the source