# Trickbeat: full documentation for agents > Trickbeat makes original music for videos, podcasts, streams and games from a style, a seed and up to seven choices. Change one layer at a time. The same input gives the same song. Songs are free to use, also commercially; credit is appreciated, not required. The code licence is separate and not yet decided. Site: https://trickbeat.org/ Agents page: https://trickbeat.org/agents/ Short index: https://trickbeat.org/llms.txt Recipes: https://trickbeat.org/agents/examples/ For people: https://trickbeat.org/make/ (make, listen and edit in the player) Credit line: Made with Trickbeat (trickbeat.org) ## Ways to make music 1. Public CLI, available now: Node 18+, no checkout. Download one file and render WAV, MIDI and stems. 2. HTTP render API for fetch-only agents: https://api.trickbeat.org. Send song JSON; get WAV, MIDI or stems. No API key. 3. MCP stdio, a local package that is not on npm yet: build a tarball with npm pack in a checkout, install it anywhere with Node 18+. Four tools for styles, options, WAV (or MIDI) and stems, with duration and lead like the CLI. 4. WebMCP: only in a browser that exposes navigator.modelContext, on https://trickbeat.org/make/. The recipes below return finished files with the length you ask for, from the public CLI or the HTTP API. No external trimming, fading or tiling is needed. ## How a song is described - style: one of twelve ids (list below). - seed: whole number from 1 to 999999. - picks: one letter A, B or C for each of seven steps, in order: beat, bass, chords, melody, tricks, arrange, mix. 1 to 7 letters, pattern ^[ABC]{1,7}$. Steps left out use A. - levels: volume per layer in percent, 0 to 150, for drums, bass, chords and lead. 100 is the default, 0 is off. - loop: true makes a short loop instead of the whole song. - duration: optional target length in seconds, 1 to 60 (CLI --duration, HTTP "duration"). Without it you get the native length. - lead: optional lead instrument id (CLI --lead, HTTP "lead"): lead, brass, epiano, bell, guitar, marimba, whistle or chipSquare. - format: wav (default), midi or stems. In the CLI use --format midi and --stems . The same style, seed, picks, levels, loop, duration and lead give the same audio. The fourth pick changes the melody hook; the lead option changes the lead instrument and keeps the melody. To lower drums, keep the other inputs and pass --levels drums=60 (HTTP API or local MCP: "levels":{"drums":60}). Levels are mix controls, not a promise of linear PCM amplitude. A share link opens the same song in the editor (/make/), not the rendered WAV. The CLI, the HTTP API (JSON link and X-Trickbeat-Link header) and local MCP all write the editor's own link: style, seed and picks, plus levels=drums.bass.chords.lead when a level is not 100 (for example, &levels=80.100.100.120), and inst=lead: when you asked for a lead (CLI, HTTP and MCP), dur= when you passed a duration and loop=1 when you asked for a loop (for example, &dur=24 or &dur=30&loop=1). A link without them opens the full song. The editor shows the length in one short line, for example "24 s version", with a button to switch to the full song, and keeps it while the person edits. It renders at 44.1 kHz, so the bytes match when you kept the default sample rate. A lead you ask for changes the melody the same way in your WAV and in the editor, so the link opens the song you heard. Save the original render inputs for an exact re-render. Example: https://trickbeat.org/make/?style=lofi&seed=7&picks=ABAAAAA ### Give the song to a person A person opens the share link at /make/ and presses "Download as WAV": the link carries your duration and loop, so the file is byte-identical to yours. ### If a call fails Every route names the bad field and the allowed values, so you can fix the call without these docs: - HTTP: status 400 with JSON error and hint, for example {"error":"Unknown field: tempo.","hint":"Allowed fields: style, seed, picks, levels, loop, format, duration, lead."}. Bad values read like "duration must be a number from 1 to 60 seconds." or "lead must be one of: lead, brass, epiano, bell, guitar, marimba, whistle, chipSquare." - CLI: {"error": ...} on stderr and exit code 1, with the same wording ("Valid flags: ..." for an unknown flag). - MCP: a tool error (code -32602) with the same wording, for example "Unknown field: tempo. Hint: allowed fields are style, seed, picks, levels, loop, duration, lead, format, out." ## Styles - organ-house: 90s organ house, 124 BPM - lofi: Lo-fi, 80 BPM - rat-beat: Rat beat, 120 BPM - dembow: Reggaeton, 94 BPM - techno: Techno, 130 BPM - bossa: Bossa nova, 136 BPM - cat-beat: Cat beat, 108 BPM - christmas: Christmas, 128 BPM - pedal-pop: Pedal pop, 105 BPM - odd-five: 5/4 groove, 140 BPM - border-dust: Desert, 104 BPM - 8-bit: 8-bit, 150 BPM ## HTTP render API Base URL: https://api.trickbeat.org. The hosted endpoint is free within the daily limits below. With a checkout, run npm run server from the repo root (Node only, no install) and swap the API origin for http://127.0.0.1:8787 (or the port set by TRICKBEAT_PORT). No account or API key is required. - GET /api/v1/styles lists style IDs and their tempos. - GET /api/v1/options?style=lofi&seed=7 lists the seven steps with their A/B/C choices. Add picks to see options based on choices already made. - POST /api/v1/render accepts application/json. Only style and seed are required. Defaults: picks AAAAAAA, levels 100 per layer, loop false, format wav, native length, default lead. Optional: duration (1 to 60 seconds) and lead (an instrument id). It is stateless: send all song settings per request and get a file directly, without a saved session or a job to poll. - format wav returns audio/wav (the mixed song), midi returns audio/midi (editable notes), and stems returns application/zip (separate WAV layers, with the same duration and lead). - GET /api/v1/health returns JSON with status and, on the worker server, queue_length (requests waiting for a slot) and global_remaining (unreserved renders left in the shared daily budget). - A successful render includes X-Trickbeat-Link (open the song in the editor) and X-Trickbeat-Credit, and X-Trickbeat-Seconds when you passed a duration. Keep the original JSON to reproduce the file exactly; the share link carries levels, lead, duration and loop too, so the editor opens the same file. ### Options: duration, lead, MIDI and stems (CLI, HTTP and MCP) - Duration: Use CLI `--duration ` or `"duration": ` in `POST /api/v1/render` (1–60 seconds); non-loop WAVs fit whole bars to the nearest sample by adjusting tempo and fade over the final 50 ms, while loops keep tempo and round to the nearest whole cycle count (at least one, ties round up); read the actual seconds in CLI JSON or `X-Trickbeat-Seconds`. - Lead instrument: Use CLI `--lead ` or `"lead": ""` in `POST /api/v1/render` (or `lead` in the MCP tools) to play the lead on another instrument: the melody is written for that instrument, as in the editor; valid ids are `lead`, `brass`, `epiano`, `bell`, `guitar`, `marimba`, `whistle`, and `chipSquare`. - MIDI: Use CLI `--format midi` to write a `.mid` instead of the default WAV, or send `"format": "midi"` to `POST /api/v1/render`; MIDI exports notes, tempo, and approximate General MIDI programs, not the synth audio. - Stems: Add CLI `--stems ` to a WAV or MIDI export to also write one aligned WAV per unmuted layer, or send `"format": "stems"` to `POST /api/v1/render` for a ZIP of those WAVs; neither route needs MCP. ### Limits - Two renders at once (TRICKBEAT_CONCURRENCY=2). Further requests wait up to 30 seconds for a slot, then receive 503 with Retry-After: 5. This is a queue timeout, not a render deadline. - 200 renders per client IP and 5,000 total per UTC day. The server uses the IP Cloudflare supplies, or the connection IP locally. Requests reserve quota before queueing. Rejected input and queue timeouts release it. In-memory counters reset at 00:00 UTC or on server restart. - Hitting either cap returns 429 with Retry-After in seconds until 00:00 UTC. Both 429 and queue 503 include JSON error and hint fields. Honor Retry-After when present; cross-origin browser scripts cannot read that header because the API does not expose it via CORS. - The render body limit is 2,048 bytes (413 if it reaches body validation). Other common errors are 400 for invalid input and 415 for the wrong content type. ### Copy-paste examples Health check: curl --fail --silent --show-error https://api.trickbeat.org/api/v1/health WAV mix: curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"lofi","seed":7,"picks":"ABAAAAA","loop":true,"format":"wav"}' \ -o song.wav MIDI for editing: curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"lofi","seed":7,"picks":"ABAAAAA","loop":true,"format":"midi"}' \ -o song.mid Stems as a ZIP: curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"lofi","seed":7,"picks":"ABAAAAA","loop":true,"format":"stems"}' \ -o song-stems.zip WAV with fetch (Node.js 18+): node --input-type=module <<'JS' import { writeFile } from 'node:fs/promises'; const response = await fetch('https://api.trickbeat.org/api/v1/render', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ style: 'lofi', seed: 7, picks: 'ABAAAAA', loop: true, format: 'wav' }), }); if (!response.ok) { const retryAfter = response.headers.get('Retry-After'); throw new Error(`HTTP ${response.status}${retryAfter ? `; retry after ${retryAfter} seconds` : ''}: ${await response.text()}`); } const bytes = new Uint8Array(await response.arrayBuffer()); await writeFile('song-fetch.wav', bytes); console.log(`HTTP ${response.status}: ${bytes.byteLength} bytes saved to song-fetch.wav`); JS Generated music is free to use, also commercially. Credit is appreciated: Made with Trickbeat (trickbeat.org). Code licence: to be decided. ## Public CLI Download https://trickbeat.org/make/app/trickbeat.mjs into your working folder. Node 18+, no checkout or install needed. It fetches the engine on first use and caches it for one day. It writes WAV by default, MIDI with --format midi, and one WAV per layer with --stems . Output is one line of JSON. Errors are JSON on stderr, exit code 1. curl -O https://trickbeat.org/make/app/trickbeat.mjs node trickbeat.mjs help --base https://trickbeat.org/make/app/ node trickbeat.mjs styles --base https://trickbeat.org/make/app/ node trickbeat.mjs options --style lofi --seed 7 --picks AAA --base https://trickbeat.org/make/app/ node trickbeat.mjs make --style lofi --seed 7 --picks ABAAAAA --levels drums=80,lead=120 --loop --out song.wav --base https://trickbeat.org/make/app/ node trickbeat.mjs make --style organ-house --seed 21 --picks AAAAABA --duration 24 --lead epiano --out intro-24s-epiano.wav --base https://trickbeat.org/make/app/ node trickbeat.mjs make --style 8-bit --seed 12 --picks AAAAAAA --loop --duration 30 --format midi --stems menu-stems --out menu-loop.mid --base https://trickbeat.org/make/app/ Commands: help, styles, options, make. Flags: --style, --seed, --picks, --levels (drums=80,lead=120 or 80.100.100.120), --loop, --duration (1 to 60 seconds), --lead (instrument id), --format (wav or midi), --stems (folder for one WAV per layer), --rate (sample rate, 8000 to 96000), --out, --base (URL or local folder, or env TRICKBEAT_BASE). Without --base the engine comes from https://trickbeat.org/make/app/. CLI options shows only the next step: pass --picks AAA for melody options. Seven picks return done: true. The local MCP tool trickbeat_get_options returns all seven steps. The make result includes the file path, duration, share link and credit. It also has review: warnings such as "lead buried under chords" are advice, and the file is still written. With --duration it also has requestedSeconds, seconds and, for loops, cycles; with --stems it lists the stem files. CLI and HTTP stems are drums.wav, bass.wav, chords.wav and lead.wav; they never include extras.wav. ## WebMCP (in the browser) On https://trickbeat.org/make/, when navigator.modelContext (WebMCP) exists, two tools are registered: - trickbeat_list_styles: no input. Returns the twelve styles with id, name, tag, label, bpm, key and scale. - trickbeat_make_song: input style, seed, picks, levels, loop. Makes the song in the page and downloads a WAV. Returns title, style, seed, picks, levels, bpm, key, scale, seconds, review, link, file, license and credit. The same functions are on window.trickbeat: styles(), options(input), make(input), download(input). ## MCP stdio (local package, not on npm yet) Page: https://trickbeat.org/agents/#mcp A local MCP server (stdio, Node 18+) that lets an agent make original music with the Trickbeat engine. It runs on your machine, needs no account, and writes WAV files. The package carries its own copy of the engine, so the installed server needs no checkout, and by default it makes no network call. The same input always gives the same file. There is no public npm package, source URL or remote MCP endpoint yet. Today you build the package once with npm pack in a checkout of the Trickbeat repo (not public yet), then install the tarball on any machine. Without a checkout, use the public CLI, or the HTTP API. Every song can be changed step by step: change one letter in picks (A, B or C for each of the 7 steps: beat, bass, chords, melody, tricks, arrangement, mix) or one layer level, render again, and repeat until the song feels exactly right. Tools: - trickbeat_list_styles: no input. The 12 styles with id, name, bpm and description. Read-only. - trickbeat_get_options: input style, seed, picks. The 7 steps with their A, B and C options, the concept and sources of each step, and the current picks, plus the share link, credit line and sources note. Read-only. - trickbeat_make_song: input style, seed, picks, levels, loop, duration, lead, format, out. Writes one WAV (or a MIDI file with format midi). duration (1 to 60 seconds) and lead (instrument id) work like the CLI flags; a field it does not know is an error that names the field. Returns path, duration_seconds, title, bpm, key, scale, share link, credit line, sources note and licence note. Overwrites the file at out if it exists. Works offline. - trickbeat_make_stems: input style, seed, picks, levels, loop, duration, lead, out_dir (the same as trickbeat_make_song, without format). Writes one WAV per layer: drums.wav, bass.wav, chords.wav and lead.wav, byte-identical to the CLI and the HTTP API for the same input. Overwrites files with the same names. Works offline. Inputs: - style: an id from trickbeat_list_styles (default organ-house). - seed: whole number 1 to 999999 (default 1). - picks: 1 to 7 letters from A, B, C, one per step. Missing steps use A. - levels: {"drums":0-150,"bass":0-150,"chords":0-150,"lead":0-150}. 100 is the default volume, 0 switches a layer off. - loop: true makes a short loop without a seam, false (default) a full song. - format: wav (default) or midi (trickbeat_make_song only). - out: file path, must end in .wav, or in .mid when format is midi. out_dir: stem folder. Use absolute paths; a relative path starts in the folder where the client launched the server. These are local files on the machine running the MCP client and server, not download URLs. Facts: - Offline: the engine is bundled and the server makes no network call, unless you set TRICKBEAT_API (see Remote mode below). - Deterministic: the same style, seed, picks, levels and loop give the same bytes every time. A different pick gives a different file. - Format: WAV, stereo, 16-bit, 44.1 kHz. A full song is about 65 to 125 seconds, depending on the style. A short version (6th pick B) is about 30 to 57 seconds. A loop is 6 to 12 seconds. - Stems are the layers before the final master limiter, with the same levels applied. - Errors come back as tool errors with a hint. The server does not crash on bad input. - The share link in a result carries levels, lead (inst=lead:), duration (dur=) and loop (loop=1) when you used them. - The MCP stdio tools take duration (1 to 60 seconds), lead (instrument id) and format midi like the CLI. A field they do not know is an error that names the field. For the same input, WAV, MIDI and stems are byte-identical to the CLI. Install from a checkout (the only route today; there is no public npm package). Build the tarball once. Replace /absolute/path/to/checkout with its local path. npm install is not needed for this step, and the tarball is git-ignored: cd /absolute/path/to/checkout/mcp npm pack This writes trickbeat-mcp-0.1.0.tgz (about 70 kB) in mcp/. On any machine with Node 18+, install it into a folder of your choice. The install downloads the MCP dependencies from the npm registry once; after that the server renders offline: mkdir ~/trickbeat-mcp && cd ~/trickbeat-mcp npm install /absolute/path/to/checkout/mcp/trickbeat-mcp-0.1.0.tgz echo "$(pwd)/node_modules/trickbeat-mcp/src/server.js" The configs need that absolute path. Replace /ABSOLUTE/PATH/TO/node_modules/trickbeat-mcp/src/server.js below with the output of the echo. To try the server inside a checkout without packing, run npm install in mcp/, then node "$PWD/src/server.js". To use another copy of the engine, set TRICKBEAT_APP=/path/to/app. To check the install without an MCP client, run this in the install folder. It sends three JSON-RPC lines to the server and writes the 24-second intro; the second output line is the result: printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"check","version":"1"}}}' '{"jsonrpc":"2.0","method":"notifications/initialized"}' '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"trickbeat_make_song","arguments":{"style":"organ-house","seed":21,"picks":"AAAAABA","duration":24,"lead":"bell","out":"/tmp/intro-24s-bell.wav"}}}' | node node_modules/trickbeat-mcp/src/server.js Claude Desktop: add to claude_desktop_config.json (Settings, Developer, Edit Config), then restart Claude Desktop: { "mcpServers": { "trickbeat": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/node_modules/trickbeat-mcp/src/server.js"] } } } Claude Code: claude mcp add trickbeat -- node /ABSOLUTE/PATH/TO/node_modules/trickbeat-mcp/src/server.js Codex: add to ~/.codex/config.toml: [mcp_servers.trickbeat] command = "node" args = ["/ABSOLUTE/PATH/TO/node_modules/trickbeat-mcp/src/server.js"] Cursor: add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project): { "mcpServers": { "trickbeat": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/node_modules/trickbeat-mcp/src/server.js"] } } } Remote mode (optional): set TRICKBEAT_API so trickbeat_make_song and trickbeat_make_stems ask a Trickbeat render API instead of rendering locally. It is unset by default. Set it to https://api.trickbeat.org for the hosted API, or run npm run server in a checkout and set TRICKBEAT_API=http://127.0.0.1:8787; in a config, add "env": {"TRICKBEAT_API": "http://127.0.0.1:8787"} next to args. The WAV, the MIDI and the four stem WAVs are byte-identical to the local ones, and duration, lead and format go to the API too. If the API cannot be reached, the tool error says so; unset TRICKBEAT_API to render locally. ## Recipes: finished files Use the public CLI or the HTTP API. For the CLI, download https://trickbeat.org/make/app/trickbeat.mjs first (Node 18+, no checkout). Every recipe below returns the finished length directly; no ffmpeg or other editor is needed. The CLI also writes MIDI and stems; over HTTP use "format":"midi" or "format":"stems". The MCP route takes duration and lead too. ### Podcast or stream intro Page: https://trickbeat.org/agents/examples/#podcast-intro Get a finished 24-second WAV: exactly 24 s, 1,058,400 frames at 44.1 kHz. The engine keeps whole bars and adjusts the tempo (here 124 to 120 BPM), and the last 50 ms fade to zero. Without duration the same song is 37.84 seconds. The call returns music only: no voice-over bed. curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"organ-house","seed":21,"picks":"AAAAABA","duration":24,"format":"wav"}' \ -o intro-24s.wav node trickbeat.mjs make --style organ-house --seed 21 --picks AAAAABA --duration 24 --out intro-24s.wav --base https://trickbeat.org/make/app/ The CLI JSON has requestedSeconds 24 and seconds 24; the HTTP response has X-Trickbeat-Seconds: 24. For a different lead instrument, add --lead epiano or "lead":"epiano". The melody, timing and other layers stay the same: node trickbeat.mjs make --style organ-house --seed 21 --picks AAAAABA --duration 24 --lead epiano --out intro-24s-epiano.wav --base https://trickbeat.org/make/app/ curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"organ-house","seed":21,"picks":"AAAAABA","duration":24,"lead":"epiano","format":"wav"}' \ -o intro-24s-epiano.wav Quieter drums and another lead instrument in one render: add --levels drums=60 (HTTP: "levels":{"drums":60}) next to --lead. node trickbeat.mjs make --style organ-house --seed 21 --picks AAAAABA --duration 24 --lead epiano --levels drums=60 --out intro-24s-edit.wav --base https://trickbeat.org/make/app/ curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"organ-house","seed":21,"picks":"AAAAABA","duration":24,"lead":"epiano","levels":{"drums":60},"format":"wav"}' \ -o intro-24s-edit.wav The file is still exactly 24 s. Only the drums and the lead change; bass and chords stay the same. Levels are mix controls, not a promise of linear PCM amplitude. Optional MCP stdio (local package): trickbeat_make_song takes the same duration and lead. Call it with: {"style":"organ-house","seed":21,"picks":"AAAAABA","duration":24,"lead":"epiano","out":"/absolute/path/intro-24s.wav"} ### Background music for a 60-second video Page: https://trickbeat.org/agents/examples/#youtube-background-music Get a finished 60-second lo-fi WAV with a quiet lead for use under speech: exactly 60 s, 2,646,000 frames. The engine keeps whole bars and slows the tempo (here 80 to 72 BPM) so the last bar ends at 60 s, and the last 50 ms fade to zero. Without duration the same song is 57 seconds at 80 BPM. The call returns music only: no voice-over. curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"lofi","seed":7,"picks":"AAAAABA","levels":{"drums":70,"bass":90,"chords":80,"lead":40},"duration":60,"format":"wav"}' \ -o video-60s.wav node trickbeat.mjs make --style lofi --seed 7 --picks AAAAABA --levels drums=70,bass=90,chords=80,lead=40 --duration 60 --out video-60s.wav --base https://trickbeat.org/make/app/ The CLI JSON shows review.ok false with the warning "lead buried under chords". That is expected: the recipe keeps the lead at 40 percent to leave room for speech. The file is complete. To keep the original tempo, add --loop (or "loop":true). The 12-second loop then repeats 5 whole cycles, exactly 60 s (the CLI JSON shows cycles 5): node trickbeat.mjs make --style lofi --seed 7 --picks AAAAABA --levels drums=70,bass=90,chords=80,lead=40 --loop --duration 60 --out video-loop-60s.wav --base https://trickbeat.org/make/app/ Change the fourth pick for another melody hook, or add --lead for another lead instrument. Optional MCP stdio (local package): trickbeat_make_song takes duration too. Call it with: {"style":"lofi","seed":7,"picks":"AAAAABA","levels":{"drums":70,"bass":90,"chords":80,"lead":40},"duration":60,"out":"/absolute/path/video-60s.wav"} ### Game menu loop (about 30 seconds) Page: https://trickbeat.org/agents/examples/#game-menu-loop Get a finished loop of about 30 seconds. Loops keep their tempo and round to whole cycles, so 30 s becomes 32 s: 5 cycles of 6.4 s, 1,411,200 frames. Loops are not faded, so the file repeats without a seam. Without duration you get one 6.4 s cycle to repeat in your game. Read the actual length in the CLI JSON (seconds, cycles) or in X-Trickbeat-Seconds. curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"8-bit","seed":12,"picks":"AAAAAAA","loop":true,"duration":30,"format":"wav"}' \ -o menu-loop.wav node trickbeat.mjs make --style 8-bit --seed 12 --picks AAAAAAA --loop --duration 30 --out menu-loop.wav --base https://trickbeat.org/make/app/ MIDI and stems from the CLI: --format midi writes a .mid instead of a WAV, and --stems also writes one WAV per layer (drums.wav, bass.wav, chords.wav and lead.wav; CLI and HTTP stems have no extras.wav), all 32 s and aligned with the MIDI: node trickbeat.mjs make --style 8-bit --seed 12 --picks AAAAAAA --loop --duration 30 --format midi --stems menu-stems --out menu-loop.mid --base https://trickbeat.org/make/app/ Over HTTP, send "format":"midi" for the MIDI, or "format":"stems" for a ZIP of the same WAVs plus a README.txt: curl --fail --silent --show-error https://api.trickbeat.org/api/v1/render \ -H 'Content-Type: application/json' \ -d '{"style":"8-bit","seed":12,"picks":"AAAAAAA","loop":true,"duration":30,"format":"stems"}' \ -o menu-stems.zip MIDI holds notes, tempo and approximate General MIDI programs, not the synth audio. Stems are the separate layers before the master limiter; their sum is not the finished mix, so keep the mix from the WAV above and match style, seed, picks, levels, loop and duration to it. Optional MCP stdio (local package): trickbeat_make_song takes the same fields for the WAV and, with "format":"midi" and an out that ends in .mid, for the MIDI. trickbeat_make_stems writes the same four WAVs. All three are byte-identical to the CLI files. Call the stems tool with: {"style":"8-bit","seed":12,"picks":"AAAAAAA","loop":true,"duration":30,"out_dir":"/absolute/path/menu-stems"} and the song tool with {"style":"8-bit","seed":12,"picks":"AAAAAAA","loop":true,"duration":30,"out":"/absolute/path/menu-loop.wav"}. Use absolute paths for local MCP out and out_dir. These are local files on the machine running the MCP client and server, not download URLs. ## Editing Songs are meant to be changed until they feel exactly right: change any step, then listen again. In the player, "New beat", "New bass", "New chords" and "New melody" swap one layer and keep the rest, and a volume slider per layer goes from 0 to 150 percent. Agents do the same by changing one letter in picks or one level and rendering again (HTTP API, MCP, CLI or WebMCP). The share link brings the song back in the editor for a person. ## Licence and credit Songs made with Trickbeat are free to use, including commercially in videos, podcasts, streams and games. Credit is appreciated, not required: Made with Trickbeat (trickbeat.org). The code licence is separate and not yet decided. ## Sources Tricks are common music-production techniques, described in our own words. The sources list gives the concept of each trick and links to lessons that explain it: https://trickbeat.org/sources/