Lily#

Lily#

Publication-quality sheet music from plain text — engraved by a LilyPond port, edited in Lily# Studio, an editor that keeps up with your keystrokes.

The source and the engraving, side by side. The preview follows your keystrokes — it does not wait for a save.

Install

Install it, and write your first score

Two free downloads and a few minutes. Nothing else to set up — no programming, no command line.

  1. Get Visual Studio Code — free Lily# runs inside Visual Studio Code, a free editor from Microsoft (“VS Code”). You don't need to know programming to use it: here it is simply the window you write music in. On its website, click the download button for your computer — Windows, Mac or Linux — open the file that downloads, and accept the installer's suggestions.
  2. Add Lily# Studio to it Lily# Studio is the editor for Lily#, an extension of VS Code. Start VS Code. On its left edge, click the Extensions icon — four small squares, one coming loose — or press Ctrl+Shift+X (Cmd+Shift+X on a Mac). Type Lily# in the search box at the top, and click Install next to Lily# Studio by yotsuda. Everything it needs comes with it, the music fonts included; there is nothing else to download.
  3. Start a score In the menu, choose File → New File… and pick Lily# Score (.lys). A short tune appears on the left, and its printed score on the right. Change a note on the left and the score changes as you type. Save it with File → Save, under a name that ends in .lys (my-song.lys).
  4. Hear it Click the score once, then press ▶ at its top: it plays, and each note lights as it sounds. (A computer lets a page make sound only after you have clicked in it — that first click is what it waits for.) Out of the box it uses the instrument sounds your computer already has; for fuller ones, install a free sound font — a download and a few clicks.
  5. Learn the rest as you go On an empty line at the end of the file, type lesson and press Ctrl+Space: a list of twelve short lessons appears. Pick lesson-01-completion to begin — it takes the place of the tune (VS Code asks first) and shows you one thing at a time. The same lessons are on the Learn pages.

Stuck? Get started goes through it again with a first score, step by step.

Why Lily#

Six things it is built to do

Most are shown further down, with the evidence.

01

LilyPond's engraving

Beam quanting, slur and tie scoring, skylines, springs and page breaking are transliterated from LilyPond's own source — not approximated from its output.

02

A grammar you can read

One canonical form per idea, no backslash constructs, and octaves that can be absolute so a mistake never cascades.

03

Preview that keeps up

A keystroke reparses incrementally and reuses the systems it did not disturb, so the score redraws in milliseconds. It plays too: the bars you select, round and round, slower or faster, with a metronome and the parts you choose — and it shows each part's range. Practice playback →

04

AI that compiles first

Ask in words, and every candidate is compiled and repaired before you see it, engraved with what changed in green. A candidate that adds errors is never shown. It uses the models VS Code offers you, such as GitHub Copilot's.

05

Lily# Studio knows the grammar

Completion offers what can actually come next — after singer sings NAME it proposes on, then the part names that exist in your file. Rename a part and every reference to it moves with it. Hover a chord and it names itself — symbol, degree and pitches. An octave mark or a duration typed anywhere on a note lands in its slot, Ctrl+Shift+Up/Down steps to the next note of the key (PageUp/PageDown an octave) or a chord shape — and on a tempo, key, clef, dynamic, articulation, time, octave, transpose or shift changes it, no typing — and the note you land on sounds. Everything Lily# Studio does →

06

One source, every score

A file can carry more than one score and more than one form. The full score, the separate parts, a staff-less chord grid and a practice excerpt all come out of the same notes — so they cannot drift apart. Write a progression once and print it both above the melody and as its own chart. Chord diagrams follow the score, not the file: chordTuning guitar or ukulele, chordDiagrams none or all, and a chord list at the head turn the same progression into a guitar book, a ukulele book and a piano score; the capo and the shapes are the piece's own. Chords and chord diagrams →

01 — Engraving

What comes out

Six pages, one engine. Each is a plain .lys file rendered with lysc svg; the source is under every one.

02 — Grammar

Explicit, and only one way to say it

  • No backslashes. \relative, \new Staff and << … \\ … >> are rejected outright, with a diagnostic that names the Lily# spelling instead of failing quietly.
  • Octaves can be absolute. octave absolute anchors a bare c to C4 (or to the part's octave N), so a wrong octave stays one wrong note instead of cascading.
  • Repeats go where order is written. |: and :| live in the form, because a repeat changes the playing order.
// one canonical form per idea
time 6/8
key a minor

part gt { clef treble_8 tuning guitar }

section Verse {
  gt     { a8 e' a c a e | }   // each note: the octave nearest the last
  chords prog { Am | }
}

form { |: Verse :| }  // the repeat lives here

score {
  chords prog              // a row above ...
  staff  gt                // ... the staff it belongs to
  tab    gt                // and its tablature
}

The three ideas the whole language follows are in How to read this; every construct, with the corners spelled out, is in the reference.

03 — AI

It compiles the answer before showing it to you

Press Ctrl+I (Cmd+I on macOS) or ✨ in the preview, and ask in words — "add a bass line", "harmonise this in thirds", "transpose up a fourth". What comes back is not a text diff to squint at: it is a rendered score, what changed in green, and it has already been compiled.

flowchart LR
    sel["the score, and where you point"] --> ask["your request"]
    ask --> model["language model"]
    model --> chk{"compiles?"}
    chk -- "no" --> repair["feed the diagnostics back<br/>up to 2 rounds"]
    repair --> model
    chk -- "yes" --> draw["render the candidate score<br/>what changed in green"]
    draw --> you{"accept?"}
    you -- "ask again" --> model
    you -- "yes" --> apply["one WorkspaceEdit<br/>one Ctrl+Z undoes it"]
  • Broken candidates never reach you. Each one is compiled in-process; its own diagnostics go back to the model for up to two repair rounds.
  • You judge on the notation. The candidate renders beside the original with an After/Before toggle, the notes the AI changed in green and its own word on what it did; ▶ plays it before you decide.
  • Nothing is touched until you accept. One WorkspaceEdit, and one Ctrl+Z undoes it.
  • The model always has the grammar. docs/GRAMMAR_FOR_LLM.md is copied into Lily# Studio at build time, so the canon ships with it and cannot drift. It reads the whole file, and answers with edits.
  • Point at the bars. Select them in the text or on the score (Shift-click), or right-click a note or a bar: the place is a hint of where to look, and the whole score stays open to change — a new part brings its score row with it.
  • Your model, no telemetry. It runs on the language models VS Code offers you — GitHub Copilot's, or another provider's — and outcomes go to an output channel on your machine. More on the AI features →