Make your first song
For agents
Give your agent this page’s Markdown link, or choose a collection.
- Documentation indexFind a guide and its Markdown link.
- Full documentationRead all curated guides in one text file.
- Machine manifestFind page metadata, Markdown URLs and checksums.
This exercise makes an eight-bar song with drums, bass and piano, then writes a WAV, a MIDI file and a score preview. It uses the dawn command in Terminal.
Install DAWN
Section titled “Install DAWN”On a Mac, download DAWN. The app needs macOS 13 or newer on a Mac with Apple Silicon, and the dawn command comes inside it:
- Open the downloaded ZIP and move DAWN to your Applications folder.
- Open DAWN and choose Install dawn command. It links
~/.local/bin/dawnto the command inside the app. - In Terminal, check it:
dawn --versionThe app keeps itself up to date. Composing, checking and rendering work offline and need no account; the demo songs download the first time you open them.
Linux, or the command alone
Section titled “Linux, or the command alone”A script installs dawn without the app, on Linux or macOS with Bun 1.3.14 or newer. It needs the GitHub CLI logged in to an account with read access to hraness/dawn, which is a private repository. Check that access:
gh repo view hraness/dawn --json nameThe installer is attached to the repository’s releases. Read it before running it:
gh release download --repo hraness/dawn --pattern install.sh -O install-dawn.shless install-dawn.shsh install-dawn.shdawn --versionIt verifies the release archive against its checksums and build attestation, then installs DAWN under your local application directory.
Create a project
Section titled “Create a project”mkdir first-lightcd first-lightdawn initOpen the generated song.ts and replace its contents with this complete score:
import { pattern, progression, seq, song, track } from "dawn";
export default song({ tempo: 120, meter: [4, 4], bars: 8, key: "A minor", sections: [ { name: "Verse", startBar: 0, bars: 4 }, { name: "Chorus", startBar: 4, bars: 4 }, ], tracks: [ track({ name: "Drums", instrument: "kit", rhythm: pattern("house") }), track({ name: "Bass", instrument: "bass", notes: seq("A1 . A1 . F1 . G1 . A1 . A1 . F1 . G1 .", { step: 2, len: 0.7, }), }), track({ name: "Keys", instrument: "piano", notes: progression("i VI III VII i VI III VII", { key: "A minor" }), }), ],});The score uses beats for note positions and zero-based bars for section starts. A period in seq() is a rest.
Check and render
Section titled “Check and render”dawn checkdawn render first-light.wav --measuredawn render first-light.middawn render first-light.score.json --title "First light" --artist "DAWN"A successful check reports the track and note counts. The WAV command prints the output file and measured loudness. Open first-light.wav in an audio player, import the MIDI file into another music tool, or read the score JSON to inspect the notes and sections in seconds.
If checking reports a file and line, fix that source location and run dawn check again. A failed check leaves the authored files in place.
Try changing the bass notes or tempo, then repeat the check and render. The SDK reference explains the builders; the agent guide describes the same loop for a coding agent.
Documentation drafted with AI and checked against the product source.