Skip to content

Installation

There is nothing to install to use barline — it runs in the browser. You only need a local setup if you want to hack on the engine itself.

Open barline.dev. A song loads, you press play, you hear techno. The full example you’ll see is Nebelwand — a 192-bar hard-techno track that is also a single TypeScript file.

  • View / listen to any public song without an account.
  • Sign in to create your own songs and publish them. Your personal org doubles as your artist page at barline.dev/<you>.
  • Connect an AI collaborator over MCP — see MCP setup.

No download, no DAW, no plugins. A modern browser with Web Audio is the whole requirement (Web MIDI, used for hardware control and “pro mode” MIDI-out, is Chromium-only today).

barline is a pnpm + Turborepo monorepo. You need Node ≥ 24 and pnpm 10.

Terminal window
git clone https://github.com/jungdotdev/barline
cd barline
pnpm install # workspace install
pnpm build # turbo build — packages first (core → runtime → studio-lib)

Run the studio with its API worker embedded in one dev process:

Terminal window
pnpm --filter studio dev # studio + embedded api worker on :3000

Open http://localhost:3000. Edits to the song hot-reload and land at the next bar boundary.

The API worker (per-song Durable Object, song index, MCP server) can also run standalone:

Terminal window
pnpm --filter @barline/api dev # api worker alone on :8799
Terminal window
pnpm test # vitest across packages
pnpm typecheck # tsc across packages
@barline/core types, AST, pattern primitives — zero dependencies, public
@barline/runtime Tone.js wrapper, scheduler, bar clock — public
studio-lib patterns/effects/sounds/ai/analyze/midi/persist/ui — private
apps/studio the TanStack Start app (Cloudflare Workers)
services/api the Hono worker — health, song CRUD, MCP server

The dependency direction is law: studio → studio-lib → runtime → core, never up or sideways. A song file imports only @barline/core (primitives) and the Song type from @barline/runtime.