01
Where the commands are
Every command is in the command palette (Ctrl+Shift+P, Cmd+Shift+P on
macOS) under Lily#: — type lily to list them. The ones that work on the
file you are editing are also on the editor's right-click menu, and a few live where their
subject is: on a file in the Explorer, or in the preview.
| Where | What is there |
|---|---|
Right-click in a .lys editor | At the top, what acts on the thing under the caret: Split Section Here (on a bar line or a break) · Join Sections (on a section's head or a selection across sections) · the chord conversions (on a chord). Then Ask AI in Chat… · Go to the Same Bar in Another Part…, and five submenus — Sections: Join Sections · Split Section Here · Split Sections to Match a Part · Extract Phrase from Section · Regroup; Parts & Tracks: Add Chord Track… · Write a Harmony Part… · Write a Singer's Notes Out as a Part · Write Repeat Signs in Every Part · Keep Repeat Signs in One Part; Notation: Convert Octaves to Absolute / to Relative · Respell Notes to Key… · Guess Section Key…; Clean Up (when the file has any): Resolve All TODOs · Remove All @or · Remove All String Numbers · Remove Unused Mixes; Scan (in a score read from a scan): Fix OMR Marks with AI… · Edit Bars Beside the Scan · Show Original Scan |
| Right-click a file in the Explorer | on a .lys: the Lily#: Export submenu · on a .xml / .musicxml / .mxl / .mid / .abc: Import MusicXML, MIDI or ABC… · on a scan or PDF: Convert Image/PDF to Lily# (.lys)… (when the reader is installed) · on a recording (MP3, WAV, …): Convert Audio to Lily# (.lys)… · Attach Audio… |
| Right-click in the preview | Ask AI in Chat… with the note or bar under the pointer as its hint · Select Chord (on a note of a chord: the caret just after its >) · Split Section Here (on a bar line inside a section) · Join Sections Here (on the bar line between two sections: the left half of a section's first bar, the right half of its last) · Resolve This TODO · This Section as A-B · Stop Playback (while it plays) · Fit Width · Reset Zoom (100%) — and, in a score read from a scan, Edit Bars Beside the Scan on the bar |
| The editor's title bar | Open Preview to Side · the lock that keeps the preview on one file |
| File → New File… | Lily# Score (.lys) |
| Keys | Ctrl+Shift+V preview · Ctrl+K V preview to the side · Alt+P play note · Alt+M play measure · Ctrl+Shift+Up/Down step to the next note of the key (or a tempo, key, clef, dynamic, time…) · Ctrl+Shift+PageUp/PageDown step an octave · Ctrl+I Ask AI in Chat |
To give a command a key of your own, open Keyboard Shortcuts
(Ctrl+K Ctrl+S) and search for lilysharp..
02
What every rewrite promises
The commands that rewrite the file — everything under Reshaping the file and Harmony and key — share three rules:
- The result is checked before you get it. A rewrite that should not change the music (Regroup, Split Sections, Convert Octaves, Extract Phrase, Respell Notes) is compiled and compared with the file as it was, note by note or by its MIDI, and is refused — with the reason, and nothing changed — if anything would sound different.
- One undo. Each command is applied as a single edit, so Ctrl+Z once puts the file back.
- Errors first. A file with syntax errors is left alone; fix the red squiggles and run the command again.
03
New Score
Opens a new, untitled .lys from a template — one part, a section, a form and a
score — with the title selected so you can type over it, and the preview beside it. It is
also File → New File… → Lily# Score (.lys). In the new file, type lesson
and Ctrl+Space for the lessons.
The template is yours to change: Edit New Score Template opens it — a copy of the
built-in one the first time — to give it your paper size (paper { size letter }),
your name as the composer, the parts you always write; every New Score starts from it after
that. Reset New Score Template goes back to the built-in one.
04
Import MusicXML, MIDI or ABC…
Turns a MusicXML file — .xml, .musicxml or the compressed
.mxl — into Lily#. From the command palette it asks for the file and opens the
result as a new untitled .lys; from the Explorer's right-click menu it writes
NAME.lys beside the file. Either way the preview opens beside it.
An import is a faithful starting point, not a byte-for-byte copy: what Lily# writes
differently or leaves out is listed in a warning when it is done. Sections come from the
rehearsal marks, or — with none — from each change of key, time or clef. The notes are
written with absolute octaves (c', d''); Convert Octaves to
Relative rewrites them as relative ones. The command line does the same:
lysc import score.musicxml.
A MIDI file (.mid) is imported by the same command. It is a performance, not a
page, so more is Lily#'s reading: the notes are brought to sixteenths and triplet eighths (a
played file is quantized), a part is read as two voices at most, and the spelling, the clefs
and — where the file states none — the key are worked out. The tracks' names, sounds, words
and tempos are kept, drums come back as a drum part, and the result is one section.
ABC notation (.abc) is imported by the same command too, with its repeats and
endings, chord names, words (w:) and voices (V:, a staff each). A file
of several tunes becomes a .lys per tune, in a folder named after the file
(reels.abc → reels/001-speed-the-plough.lys, …), and the first tune
opens. What it leaves out — the order of the parts (P:),
words after the tune (W:), macros, voice overlays — is listed in the warning.
File > New File… → Lily# Score (.lys)… asks where the piece starts: Blank or Compose with AI…, or from music you have — a recording, a scan, or MusicXML, MIDI or ABC.
05
Convert Image/PDF to Lily# (.lys)… · Show Original Scan
Reads printed music from a scan (.png, .jpg, .bmp, .tif)
or a PDF with an optical music reader and opens the .lys it writes, with the
preview. The reader is a separate extension (Windows x64, Beta), not part of Lily# Studio: on Windows
the command is in the palette and offers to install it when it is missing; once it is
installed, scans and PDFs also get the command on their right-click menu.
Show Original Scan opens the scanned pages beside a .lys read this way —
from the picture button in the editor's title bar, or the palette — with the marks the reader was unsure of boxed in red. Click a box to go to its music; the
caret lights the box of what it is on. The doubtful notes are also marked
@todo in the source, so they show in red in the
preview until you have checked them. With lilysharp.scans.verifyOnSave, saving
has the reader engrave the file again and compare it with the scan, bar by bar. The reader
itself — installing it, what it reads and does not yet, its terms — has
a page of its own.
06
Regroup (by part ⇄ by section)
A Lily# file can be written two ways round: by part, each part holding its sections, or by section, each section holding every part's music. The first suits a part copied in one go (a bass line, a drum part); the second suits writing a song section by section. Regroup rewrites the whole file into the other way, music unchanged.
// by part // by section
part melody { clef treble part melody { clef treble }
section A { c'4 d' e' f' | } part bass { clef bass }
section B { g'1 | }
} section A {
part bass { clef bass melody { c'4 d' e' f' | }
section A { c1 | } bass { c1 | }
section B { g,1 | } }
} section B {
melody { g'1 | }
bass { g,1 | }
}
Run it again to go back. More on the two layouts: Parts and sections.
07
Split Sections to Match a Part
In a file grouped by part, one part may cut a section into several (A of 16
bars and B of 121) while the others still write it whole. The editor warns that
the section is not the same length everywhere. This command cuts the other parts — and the
section's chord rows and lyrics — at the same bars, and makes every form play
A B where it played A.
- Run it with the caret anywhere, or from the warning's lightbulb (Ctrl+.), which names the section.
- If the parts cut the section differently, it asks which part to follow. One confirmation then shows the whole plan before anything changes.
- Every cut part must sound and count exactly as before. A slur, tie or hairpin running across a cut is carried into the new section. A beam, a pedal or another span across a cut, or a cut in the middle of a bar, is reported instead, and nothing changes.
08
Convert Octaves to Absolute / to Relative
Rewrites the whole file into the other octave mode. In relative mode (the default) a
note without marks lands nearest the note before it; in absolute mode
(octave absolute) a bare c is always the same C. Every note keeps the
pitch it sounds — only its ' and , marks and the
octave lines change — and the result is compared with the file note by note.
| Relative | Absolute |
|---|---|
| c'4 e g c | b1 | | c'4 e' g' c'' | b'1 | |
A note that no score plays has no octave to keep, so the command names it and stops: play
it in a form, or remove it. Absolute octaves are the safer mode for music an AI writes, since
one wrong mark cannot shift every note after it. The command line:
lysc octave --absolute song.lys.
09
Extract Phrase from Section
Lifts music out of a section into a named phrase at the top level and writes
the name where it was, so other parts and sections can use the same music
(theme, or theme' an octave up). With the caret in a section's music
it takes that music; with a selection, the whole bars the selection touches. It asks for the
name, then checks that the file still sounds exactly the same, or changes nothing.
// before // after
section A { melody { c''4 d' e' f' | g'1 | } } phrase theme { c''4 d' e' f' | g'1 | }
section A { melody { theme } }
More on phrases: Phrases.
10
Remove All String Numbers
Removes every string number — \1 … \9 after a note — from the
file, so the tab chooses each note's string itself. It is for a book brought over from
LilyPond, which needed most of them written; Lily#'s tab picks playable strings on its own,
and a string number is then kept for the few notes you want on a particular string. One
Ctrl+Z puts them all back.
11
Add Chord Track…
Reads the chords the music plays and writes them as a chords track. It reads the score
the preview shows — only the parts that score has — so a score made for it chooses what the
chords are read from: score harmony { staff rh staff lh } reads the piano and not
the voice, and score tune { staff melody } harmonizes the melody alone, the
accompaniment unread. Pick that score in the preview's Score menu first.
It reads the notes sounding together, beat by beat: the chord they fit (sevenths, diminished and suspended chords, slash chords from the lowest note), a note struck inside a beat counting less than one on it. A chord may change on any beat, but only where that fits clearly better — at a bar line most easily, the middle of a bar next — so a passing note or a walking bass does not make a chord of its own.
Where only a melody sounds, a chord is chosen for it, one a bar: the key's chords first, and one outside the key where the notes spell it (B♭ D F under C major is B♭); a seventh chord — IIm7, IIIm7, V7, Imaj7 … — where its seventh is played (D F A C is Dm7; G B D is G). A low line is read as a bass line: its note on the bar's first beat is the root, and a note that steps into the next bar (the B of C G A B | C) leads there rather than making a seventh.
Chords chosen for a line are chosen with their neighbours: a move whose root falls a fifth (V → I, ii → V, vi → ii) is preferred, so a bar its notes leave open — a D alone before a G7 — takes the chord that leads on (Dm). Chords heard in the parts lean on this only in a close call. The one pick is how rich the chosen chords are (the one picked last is selected):
- Plain — triads only.
- Standard (the first time) — sevenths where they are played, and the V resolving a fifth down as V7 even where its seventh is not played (G → C as G7 → C; a secondary dominant too, A → Dm as A7 → Dm). A V ending a section is taken to lead home.
- Rich — Standard, and the ii of a ii–V as a minor seventh (Dm → G7 as Dm7 → G7).
The track is placed in that score above its top staff, a row of its own
(chords harmony on the line before staff rh). For the degrees
(I, vi, V7 …), write as roman after it, or place the track twice to show both. A bar is written in as few slots as its changes need:
| Am Dm | for a change at the middle, | C G . | in 3/4. A bar where
nothing sounds is r (N.C.).
The file keeps its layout: a file grouped by section gets a chords block in each section;
one grouped by part gets one top-level track with a section per section. A second reading — of
another score, or at another richness — is a track of its own (harmony2), so the two
can be compared. It is a starting point to edit, and Ctrl+Z takes it back. The degrees
are against the file's key; set the right one first
(Guess Section Key helps). The command line
lysc harmonize song.lys harmonizes the melody, one diatonic chord a bar.
12
Guess Section Key…
For music written down before its key was known — transcribed by ear, or played in.
Put the caret in a section (or select several sections, or put it on a section's name in a
form) and run the command. It reads the section's notes in every part and
lists the keys they fit, best first:
Lily#: key of section A (no key stated at its start) key c major C major · score 1.03 · best guess key c minor C minor · score 0.76
Only the likely keys are listed: those scoring within 0.3 of the best, at most five. The
score compares how long each pitch sounds with the pattern a major or minor key gives its
notes; the key whose tonic the section ends on gets a small extra. The tonic is spelled the
way the notes are written — fis major when the music writes sharps,
ges major when it writes flats.
Picking a key writes it as the key the section starts in: a key already
there is rewritten; otherwise it goes in the section's header
(section A { key d major … }), and in a file grouped by part with no top-level
section A, a line section A { key d major } is added. Every part
playing the section takes the key, and the next section starts again from the file's own.
Then the command offers to respell the notes for the new key.
Esc at either step changes nothing.
A guess, not a verdict: a short or modal section can fit two keys equally well, and the parallel or relative key is often a close second. Listen, and pick.
fis become ges.13
Respell Notes to Key…
Notes written before the key was known often come out spelled the wrong way round —
fis where G♭ major wants ges, b where it wants
ces, or fis and ges both in one section. They sound
right but print wrong: accidentals against the key signature. This command respells the
section at the caret (or every section a selection touches) for the key it starts in. If no
key is stated there, it uses the guessed key and tells you so.
It lists what it would change, all checked; uncheck any you want to keep as written, and Enter applies the rest:
Lily#: respell section A for ges major (G♭ major) ☑ fis → ges 3 notes ☑ ais → bes 1 note ☑ b → ces 1 note ☑ cis → des 1 note ☑ dis → ees 1 note ☑ gis → aes 1 note
// before, in G♭ major fis'4 gis' ais' b' | cis''4 dis'' f'' fis'' | fis'1 | // after: every note sounds as before ges'4 aes' bes' ces'' | des''4 ees'' f'' ges'' | ges'1 |
- A note in the key's scale takes the scale's spelling.
- A note outside the scale is left alone when the section writes it one way — a
written
aesin C major is your choice. When the section writes it several ways, it is unified to the spelling written most; a tie goes to the key's way (the raised sixth and seventh in a minor key,gisin A minor; otherwise sharps in a sharp key, flats in a flat key). - Notes after a
keychange inside the section are left alone. - Every note keeps its pitch. In relative mode a new letter changes where the next
note lands, and
b⇄cescrosses the octave, so the octave marks are recomputed; the result is checked note by note, or nothing changes.
14
Play, step and sound
| Command | Does |
|---|---|
| Play Note at Cursor — Alt+P | sounds the note or chord under the caret for as long as the key is held |
| Play Current Measure — Alt+M | plays the bar the caret is in |
| Step Up / Down in the Key — Ctrl+Shift+Up/Down | moves the note to the next note of the key, a chord name to its next shape, a tempo by 1, a key a fifth round the circle, a clef to the next (bass, tenor, alto, treble), a dynamic a level (or a hairpin to cresc / decresc), an articulation along its group (downBow → upBow, pullOff → hammerOn …), a time's beats, a part's octave, a transpose a semitone, a midiInstrument or a sound to the next sound, or a mix's volume by 1 dB and pan by 1 —Stepping |
| Step Up / Down an Octave — Ctrl+Shift+PageUp/PageDown | moves the note an octave mark, a chord name to its next shape, a tempo by 10, a key to its parallel (PageUp) / relative (PageDown) key, a treble or bass clef an octave, a dynamic a level, a time to the next common meter, a part's octave by 1, a transpose to a pitch an octave, a transpose by a number a semitone, a midiInstrument to the next family, a sound eight sounds on, or a mix's volume by 6 dB and pan by 10 —Stepping |
| Choose Sound Font… | picks what the preview plays with: the default (the General MIDI bank your computer already has) or an .sf2 / .sf3 / .dls of yours — three free ones, and how |
| Choose MIDI Output… | picks a MIDI output port of the machine to play through instead of the preview's synth — Windows' own synth, or a loopMIDI / IAC bus into a DAW or a VST host — how |
The sound comes from the preview, so with no preview open the first Alt+P opens one; press again to play. As you edit, the notes you land on and type sound too — Audition. The preview's ▶ plays the score or the bars selected on it, and its practice menu slows it, loops it, adds a metronome and silences parts — Playback and practice.
16
Export
The pages: Export as PDF, PNG and SVG. The sound and the video:
MP3 and WAV (the score as the preview plays it — its synth and its sound font,
.sf2, .sf3 or .dls, or your VST3 instruments where
Suonatore plays the file; the MP3 at 192 kbps) and MP4 Video
(the pages, each note lit orange while it sounds, with that sound). The words and the singing:
LRC lyrics (the words a line a line, each with the second it is sung —
Export the song) and VOCALOID sequence (.vsqx). For other
programs: MIDI, MusicXML and LilyPond (.ly). The preview's Export dialog lists
them in that order.
They are in the command palette, in the
preview, and in the Lily#: Export submenu when you right-click .lys files in
the Explorer — select several to export every score of every file into one folder. From the
preview, the export is the score the preview shows, under that score's own form. Whichever
way, the pictures and files are the ones lysc writes from the command line; the
sound and the video are the editor's own.
MP4 Video needs ffmpeg, which Lily# Studio does not bundle: install it (Windows
winget install Gyan.FFmpeg, a Mac brew install ffmpeg, Linux its
package manager) or name the program in lilysharp.export.videoEncoder. The first
page shows until the music reaches a note printed on the next; then the picture turns to
that page.
WAV, MP3 and MP4 Video play as the preview's practice menu is set — its tempo, the parts switched off, the metronome and the count-in — so a slower take with a click for practising is one export away. The loop is not exported: the file plays the piece once. The message after the export says what the menu changed; a file no preview shows plays as written. Where Suonatore or a DAW plays the file, the sound is the one it records, the notes as written: the practice menu does not apply.
17
Ask AI, and fixing a scan's marks
Ask AI in Chat (Ctrl+I, ✨ in the preview, and both right-click menus) opens Copilot's chat with the file — a selection, or the note or bar right-clicked, as a hint of where to look; the chat's change goes into the score at once, as one edit Ctrl+Z undoes, with an AI changed: strip to play it or see the score before. Rewrite with AI… in the command palette asks without the chat and shows the answer engraved beside the score, what changed in green, before anything is written. Compose with AI… (also File › New File… → Lily# Score (.lys)… → Compose with AI…) hands a description — the instruments, the length, the character — to Copilot's chat, which writes the new piece into a new score. Select AI Model… chooses the model Lily# Studio's own AI features use; the chat's model is chosen in the chat. All are described in Ask AI and the AI features.
For a score read from a scan, Fix OMR Marks with AI… proposes a fix for each marked bar, checked against the scan, and Edit Bars Beside the Scan opens the bars beside the scan to fix by hand — Calamo.