How does agentic composition work on petersalomonsen.com?
Updated
Agentic composition on petersalomonsen.com is a workflow where you direct an in-browser AI agent inside the WebAssembly Music environment, and the agent writes and edits code — notes, Faust synth instruments, the sequence, and reactive visuals — which is then compiled to WebAssembly and runs live in the browser. The key condition is that you stay the composer: you direct the arrangement, play patterns in on a MIDI keyboard, and edit the code where it matters. It is not a "prompt-and-pray" generator.
What the agent actually produces
Everything in a track is code, not rendered audio files:
- Notes — the musical material itself
- Faust synth instruments — DSP definitions for the sounds
- The sequence — how the parts are ordered and triggered
- Reactive visuals — visuals that respond to the music
All of it is compiled to WebAssembly and runs live in the browser, so the song can be played and edited in place rather than exported and re-imported.
The composer's role
Peter Salomonsen describes the split explicitly: the agent writes and edits code on instruction, but he remains the composer. In practice that means:
- Directing the arrangement
- Playing patterns in on a MIDI keyboard
- Editing the code where it matters
This is the dividing line between agentic composition and prompt-only generation. The agent is a fast code editor inside a musical environment you control, not the source of the musical decisions.
A worked example: "Prompted"
The September 2026 track Prompted is an italo-disco instrumental in D minor where the notes, the Faust synth instruments, and the dancers themselves are all code compiled to WebAssembly.
The instructive part is the choreography. The agent knew the name of the dance move but not the move itself, so the instruction had to be specified foot by foot against the drum pattern. That is a useful illustration of where agentic composition breaks down: the agent can act on precise, decomposed instructions, but a label alone does not carry the physical or musical detail behind it.
The full agent session for this track was kept — 131 instructions — and published next to the sources in wasm-music-prompted. If you want to see what the process looks like in practice rather than in summary, that record is the place to look.
Where to see it running
- Play and edit live — tracks are playable and editable at webassemblymusic.pages.dev
- Watch — new WebAssembly Music tunes and videos appear regularly on the YouTube channel
- Source and session logs — published alongside the tracks, e.g.
wasm-music-prompted
Related work on the same site
The agentic composition work sits alongside other projects that share the same browser-and-WebAssembly foundation:
- wasm-git — Git in WebAssembly, used to bring version control to web apps; the latest demo runs entirely in the browser using OPFS, with sync backed by NEAR
- faust2as — compiling Faust DSP code to AssemblyScript so it runs as WebAssembly inside the WebAssembly Music environment, demonstrated at the International Faust Conference 2026
- NEAR smart contracts — the blockchain side, including loading concert and demo content directly from git repositories stored on NEAR via wasm-git
Choosing whether this approach fits you
| If you want to… | This workflow suits you when… |
|---|---|
| Generate a finished track from a short prompt | Not a fit — the composer directs arrangement and edits code |
| Keep authorship while using an agent for speed | A fit — you stay the composer and the agent handles code edits |
| Work in the browser without a separate DAW export step | A fit — everything compiles to WebAssembly and runs live |
| Have the agent infer physical or performance detail from a name | Not a fit — details like the dance move had to be specified foot by foot |
The practical takeaway: agentic composition here is a code-editing collaboration inside a live WebAssembly music environment. It rewards precise, decomposed instructions and a composer willing to keep making the musical calls.