Repository avatar
Browser Automation
v0.3.3
active

tutticode

io.github.tuttidaw/tutticode

Write music as Strudel-compatible code; render WAV/FLAC/MP3 with stems and LUFS in your browser.

Documentation

TuttiDAW

TuttiCode for agents

English · 简体中文 · 繁體中文 · 日本語 · 한국어

npm End-to-end Licence: MIT

Your agent writes the music as code. You hear it, then open it in a DAW.

TuttiCode is a pattern language for music, a superset of Strudel, that plays on TuttiDAW's instruments and effects. This repository turns Claude Code, Codex, Copilot CLI and any MCP client into a composer and sound designer: the agent writes a short program, checks it, and renders it to WAV, FLAC or MP3 at an exact length, with stems, fades and a loudness target. It reads the render's numbers, revises, and hands you the file plus an editUrl that opens the program in TuttiDAW, a track per voice, to keep editing by hand.

Rendering happens in your own browser, on the same engine as tuttidaw.com/code. Nothing is rendered on a server, and it is free. No audio-generation model is involved.

TuttiCode: a program, its voices, and the Open in TuttiDAW button

For agents

If you are an AI agent asked to make music or sound with this repository, you do not need to install anything first:

  1. npx -y tutticode doctor checks Node 20+ and Chrome or Edge. No browser on Linux: install Chrome as a package (curl -fLO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install ./google-chrome-stable_current_amd64.deb); an unpacked or container Chrome also needs TUTTICODE_BROWSER_ARGS=--no-sandbox.
  2. Read the skill: skills/tutticode/SKILL.md (raw); for beds, loops and sound effects at a length and loudness, also skills/tutticode-sound-for-media/SKILL.md (raw).
  3. Write the program to a .tc file, then npx -y tutticode check song.tc until it is clean, and npx -y tutticode render song.tc -o song.mp3 --seconds 20 --lufs -14 --json. Give the user the file, its loudness and the editUrl.

Without sign-in a render is at most 60 s and one over 30 s carries a spoken tag: for longer pieces ask the user to run npx tutticode login (free). npx tutticode skills install keeps the skills for Claude Code, Copilot CLI and Codex.

Listen

Six pieces, each by a different model, made in one take from the same opening and a brief of one or two sentences. The agent chose the title and the sounds, wrote every line of code, rendered, read the numbers and revised. Nobody replied to it while it worked and nobody edited its code. Each page has the program, the agent's notes and a link that opens it in TuttiDAW.

Coming with the first release.

Quick start

  1. Install for your agent:

    AgentCommand
    Claude Code/plugin marketplace add tuttidaw/tutticode then /plugin install tutticode@tutticode
    Codex, Cursor and othersnpx skills add tuttidaw/tutticode
    Copilot CLIcopilot plugin marketplace add tuttidaw/tutticode then copilot plugin install tutticode@tutticode
    Any MCP clientnpx -y tutticode mcp as a stdio server, plus npx tutticode skills install

    You need Node 20+ and Google Chrome or Microsoft Edge. The plugin starts the MCP server from npm (tutticode); there is nothing else to set up.

  2. Ask in plain words:

    Make a 12-second lo-fi intro bed for my video, -16 LUFS, with a 1.5 s fade-out.

  3. Get the file, the report (length, bar grid in seconds, loudness, true peak, per-voice levels) and an editUrl. Open the link and you are in the TuttiCode editor with the program; Open in TuttiDAW turns it into a project with a track per voice.

Optional: npx tutticode login (a free account) lifts the limits below.

What it is good at

  • Music for things you are making. Beds and loops for videos, podcasts, apps and games, at an exact length in seconds, bars or loops, at a platform loudness (-14 LUFS web, -16 podcasts, -23 broadcast).
  • Sound effects. Risers, impacts, whooshes, UI clicks, confirms, errors and notifications, with tested recipes in the tutticode-sound-for-media skill.
  • Songs. A program can be a whole song of up to 128 bars: each track's sound once, each section in one block, the order in a form.
  • Revising. Change one line and render again. code_compare checks a render against goals (or a genre style) or against the previous render, so the agent can tell what moved.
  • Handing over to a person. Every result links to the editor and the DAW. The code is the project.

Why code instead of a text-to-music model?

A text-to-music modelTuttiCode
Changing one thingregenerate the piece or a sectionedit a line; render again
What you getan audio fileaudio, stems, the program and a DAW project
Fitting a cut or a levelroughlyto the bar or the second: exact lengths, loop points, the bar grid in seconds
Loudness for a platformwhatever comes outa LUFS target and a true-peak ceiling, reported
The same piece againa new takethe same program renders the same audio
Where it runsa GPU in the cloudyour browser, free

If your agent is already cutting your video or building your game, it knows how long the scene runs, where the cuts land and how the level loops. It can write to those numbers, and when the edit changes, rewrite only the bars that moved.

A taste of the language

setcpm(30)                                        // 30 bars a minute = 120 BPM in 4/4
drums: s("bd [~ bd] sd ~, hh*8").bank("tr909")
bass: note("<[c2 ~ c2 c3] [ab1 ~ ab1 ab2] [f1 ~ f1 f2] [g1 ~ g1 g2]>").s("sawtooth").lpf(700)
chords: chord("<Cm7 Ab^7 Fm7 G7>").voicing().s("gm_epiano1").fx("Reverb")
lead: note("<[g4 bb4 c5 eb5] [c5 eb5 g5 eb5] [ab4 c5 f5 c5] [b4 d5 f5 d5]>").s("triangle").gain(0.5)
master.fx("Limiter")

▶ Play this program in TuttiCode

Strudel code runs as is. TuttiCode adds TuttiDAW instruments and effects (.inst, .fx, .midifx), buses and groups, automation, sidechain, whole songs with sections, and melodies in do-re-mi. The skill teaches all of it to the agent; people can learn it at tuttidaw.com/code/learn.

How it works

agent ──MCP / CLI──▶ tutticode (Node, from npm) ──WebSocket 127.0.0.1──▶ tuttidaw.com/code/bridge (your browser)
  1. The first call starts a local server on 127.0.0.1 with a random port and a one-time token, and opens the TuttiCode bridge page in a headless Chrome or Edge with its own profile.
  2. The page renders the program with the TuttiCode engine and streams the audio back; tutticode checks everything it receives and writes your files.
  3. The bridge stays warm for 10 minutes, so later renders start at once.

The MCP tools are the same as TuttiDAW's web agent loop, so one skill teaches both:

toolwhat it does
code_checkcompile and plan, no audio: diagnostics, voices, mix warnings
code_renderrender to a file; returns the paths, statistics and editUrl
code_comparecompare a render with goals (or a style), or two renders
code_openopen a program in a visible TuttiCode tab
code_referencesearch the TuttiCode reference shipped in the package
code_accountsigned in or not, the limits and today's usage

The CLI does the same from a terminal or a script:

npx tutticode check song.tc
npx tutticode render song.tc -o bed.wav --seconds 12 --fade-out 1.5 --lufs -16 --json
npx tutticode render song.tc -o loop.flac --loops 4 --stems stems/

Full reference: the npm package README and TuttiCode for agents.

More

Limits and sign-in
Without sign-inFree account
Longest render60 s5 minutes
Spoken "register at TuttiDAW" tagmixed into renders over 30 snever
Formats, stems, loudnessallall

npx tutticode login opens your browser to approve; npx tutticode login --device prints a code to approve on any device (for SSH and servers). The sign-in can only render with TuttiCode: it cannot open your projects, account or billing. For CI, set TUTTICODE_TOKEN to an access token from your account page.

Privacy

Your program goes from the agent to the TuttiCode page in your own browser and nowhere else; no program code and no audio are sent to our servers, and tutticode sends no telemetry. The page loads from tuttidaw.com like any web page, with its instruments and samples, and counts each render's length, format and outcome. Details: PRIVACY.md.

Troubleshooting
  • npx tutticode doctor checks Node, the browser, the page, the connection and the sign-in, and says what to fix.
  • Chrome or Edge must be installed. Set TUTTICODE_BROWSER to its path if it is somewhere unusual.
  • In a container or CI without user namespaces, set TUTTICODE_BROWSER_ARGS=--no-sandbox.
  • An agent says a render failed with limit: the piece is longer than 60 s without sign-in. Run npx tutticode login.
What is in this repository
PathWhat
skills/tutticodeThe language: syntax, common mistakes, the check / render / compare loop, references for every function, sound and device
skills/tutticode-sound-for-mediaMusic beds, loops, stems and sound effects for videos, apps and games
.claude-plugin/, .codex-plugin/, .agents/Plugin and marketplace manifests
.mcp.jsonThe MCP server: npx -y tutticode@<version> mcp
examples/The pieces above: program, notes and render settings

The skills are copied from the published npm package, so they always match the pinned CLI version; a workflow keeps them in sync. The CLI itself is developed in TuttiDAW's main repository and published to npm.

Feedback

Bugs, sounds that come out wrong, and ideas: open an issue. Show us what you made in Discussions.

License

MIT, see LICENSE. Rendering uses the TuttiCode engine on tuttidaw.com under the TuttiDAW terms of use, which claim no ownership of what you make.

NPM
tutticode
Install Command
npm install tutticode