# DAWN

DAWN is a TypeScript music SDK and CLI. Write a score, check it and render audio or MIDI locally.

DAWN is a Mac app with the `dawn` command inside it; a script installs the command alone on Linux or macOS and requires access to the private GitHub repository. The [first-song tutorial](/docs/first-song) takes you from installing to a rendered song.

## A song is a project

`song.ts` holds the tempo, meter, key, sections and track list. Larger projects put each track in `tracks/<slug>/track.ts`, with its samples beside it. The versioned TypeScript SDK lives in `.dawn/sdk/v1.ts`, so your editor and your coding agent read the same types and examples.

Checking a project evaluates its TypeScript in a child process. Treat a song’s source as code you run on your machine. A saved project’s ordinary render runs locally without an account or network access.

## From an idea to a file

| Work                                                         | DAWN interface                                                |
| ------------------------------------------------------------ | ------------------------------------------------------------- |
| Compose notes, grooves, chords and arrangements              | [TypeScript SDK](/docs/sdk)                                    |
| Choose instruments, effects, automation and a master chain   | [TypeScript SDK](/docs/sdk)                                    |
| Check types, musical structure and a mix                     | [CLI reference](/docs/cli)                                     |
| Export audio, MIDI or a score preview                        | [CLI reference](/docs/cli) and [score JSON](/docs/score-format) |
| Draft from a seed or an authored chart, or resume a song job | [Song workflows](/docs/workflows)                              |
| Prepare singing, references and audio                        | [Song workflows and media](/docs/workflows)                    |
| Edit through a coding agent                                  | [Agent guide](/docs/agents)                                    |
| Publish a track and manage its visibility                    | [Publishing guide](/docs/publishing)                         |

The web player previews an exported score alongside its audio. Composition uses the CLI and SDK.

## Desktop player

The repository also includes a source-built macOS player for `dawn.score/v1` and audio. It shows notes and lyrics, opens a song project through the installed CLI and exports video through FFmpeg. The [desktop build and usage guide](https://github.com/hraness/dawn/blob/main/desktop/README.md) describes its pinned Rust and Rune toolchain. Repository access is needed for that source build.

## Keep a project portable

Commit the song files, local assets and vendored SDK together. DAWN stores derived state under `.dawn/`. Updating DAWN keeps authored files; `dawn changes` explains SDK changes and `dawn migrate` previews format migrations before applying them.
