BeatScript docs
BeatScript is a small, total, deterministic language for writing whole music tracks as text. These are the pages that teach it. Every page has a raw markdown file for models and scripts.
- Cheat sheetThe language on one page: the compact grammar, the same text the compose prompt uses. Read this first. markdown
- Language referenceGrammar (EBNF), mini-notation, control lines, evolve, canonical form and share links. markdown
- Arrange mutations`arrange { }`: mutations between sections that rewrite patterns as the song goes, deterministic and seeded by the program's CID. markdown
- API referenceEvery HTTP route, sign-in and tokens, compose, render streaming, sessions and the MCP tools, with examples. markdown
#More
- Instruments: the voices a program may name (JSON)
- Examples: the public example programs (JSON); open one from the editor's examples menu
- Grammar: every production of the language as a railroad diagram, generated from grammar.ebnf
- Forms: arrange shapes from classical music (quodlibet, passacaglia, canon, rondo, fugue, theme and variations), each a template built from public-domain themes
- Theme library: melodies, basses and figures composed and published before 1929, CC0, as BeatScript bars in a stated key, to borrow and morph
- Found phrases: borrowing public-domain text for its shape: a line chosen for its meter, matched to the groove, buried and spotlit. The technique behind the phrasebook and the phrase templates
- Radio: stations: endless, deterministic stations, each one small program: position N is always the same track, and a knob turned moves you to a neighbouring station at the same position
- Polish a mix: the listen loop: check, listen, change one line, listen again with compare; what listen measures, the delivery targets, the order of fixes and the lines that make them
- Drafts and marks: what you built and the spots you marked while listening, shared by the web editor and the Android app through your account; a mark opens the editor at its bar
- Embed a program: one embed config for every surface: the player and the studio (the editor as an MCP server inside a Claude artifact or any page), iframe, the <beatscript-player> element, oEmbed, link previews that play, a README card, Jupyter, VS Code, plain audio
- Build your own: what you can build on and how each part is versioned: the player and embed, the MCP server, the engine crates (and the FFI the apps use) and the language service outside the studio
- Authorship and rights: who authored a program and what rights it has, in plain language
- Phrasebook: lines of verse, scripture, speech and work song first published before 1929, CC0, each with its meter as a step pattern, to sing by id
- llms.txt: this site, indexed for a language model
- Ontology: the BeatScript ontology, the vocabulary behind BeatScript (genres, grooves, rhythms, sections, the engine, the language's own terms), as Turtle, JSON-LD, SPARQL and MCP. Derived from the bitwrap ontology 0.2.0, it evolves on its own
- The editor