Open-source music framework for AI agents. Compose, render and revise real music from code.

Joined October 2026
audio as code retweeted
I was tired of paying for Suno every month just to get background music for my videos. And the free route wasn't much better. Hours digging through "royalty-free" libraries, checking licences, hoping a track wouldn't get flagged three months later. So I built my own way out. @audioascode is an open source Python toolkit that lets AI agents write music. Your agent writes the music as code: notes, tracks, instruments. The library renders it into real audio on your machine. The agent can listen back, revise it, and drop it straight into a video, a game or a presentation. Every sound is synthesized from code. No samples, no recordings, nothing borrowed. There are 70 playable instruments today, from violin and timpani to marimba and drum machine. The film below is the test. I had an agent score Audio as Code's own launch video: an orchestral medley of public-domain classics (Strauss, Beethoven, Grieg and the Dies irae), arranged in code and played entirely by the library. 27 instruments, 1,775 notes, with every cut timed to the score. It won't replace a real orchestra. But for the music behind my videos, I don't need to rent it anymore.
Hello, world. We're Audio as Code 🎼 Music for videos shouldn't mean another AI subscription, or hours digging through "royalty-free" libraries hoping nothing gets flagged. Audio as Code is an open-source Python library that lets your AI agent compose music the way it writes code. Describe the vibe. Your agent (Claude Code, Codex, anything with a shell) writes an editable score, renders it on your machine, and keeps every note revisable. No samples. No subscriptions. No licence headaches. 🎻 70 instruments, all synthesized from code, from cello to 808s 🎧 Hear them: audioascode.com/instruments/ 🕺 Ode to Joy as techno, disco and drum & bass: audioascode.com/electronic/ ⭐ Code (MIT): github.com/joaoCarvalho1000/… 🌐 audioascode.com The music in this video was written by an agent using Audio as Code.
7
6
21
703