01
What it is
Calamo reads a page image or a PDF of printed music and writes it as
Lily# text — a .lys you edit, play and engrave like any other. It does not
pretend to read perfectly: the places it is unsure of are marked in the text with
@todo, each with a note on what to check, and the
scanned page opens beside the score so you can compare the two bar by bar.
It is a separate extension by the same author, Calamo Sheet Music Scanner, that carries the reader; the commands that run it are Lily# Studio's, and it shows nothing without Lily# Studio. It is in beta, free and open source (Apache License 2.0). It runs on Windows (x64) only, and needs Lily# Studio, the editor for Lily#.
02
Install it
Two ways, and both end the same:
- Let Lily# Studio offer it. On Windows, choose File › New File… → Lily# Score (.lys)… → Scan (PDF, image)…, or run Convert Image/PDF to Lily# (.lys)… from the command palette (Ctrl+Shift+P). When the reader is not installed, it offers Install Calamo first; accept, and VS Code installs it from the Marketplace. Choose it again and it reads.
- From the Extensions view. Ctrl+Shift+X, search for Calamo and install Calamo Sheet Music Scanner — or open its Marketplace page.
VS Code keeps it up to date as it keeps every extension. When Lily# Studio needs a newer reader than the one installed — a command, a field, a fixed reading it is written for — it offers Update Calamo before it reads; decline, and it reads with the one you have. Not installed Lily# Studio yet? Get started walks through it.
03
Read a scan
- Pick the pages
Choose File › New File… → Lily# Score (.lys)… → Scan (PDF,
image)… and choose the files — or right-click an image (
.png,.jpg,.bmp,.tif) or a PDF in the Explorer and choose Convert Image/PDF to Lily# (.lys)…. For a piece scanned page by page, pick its pages in order; a PDF brings its pages with it. - Wait for the reader It runs on your computer, page by page. A notice at the bottom right says what it is doing — finding the staves, reading page 3 of 6, checking the reading against the pages — with the time so far, counted every second, and about how long the step has left once the pages have a pace. Cancel stops it.
- The score opens
The
.lysis written beside the image and opens with the preview. Two files land beside it:NAME.omr.json, where each bar is on the page, andNAME.omr-pNN.png, the pages with the marked places boxed. Lily# Studio reads the first to show the scan beside the score; neither is needed to compile the music.
What the reader writes is ordinary Lily#: parts for the staves, a section for the piece (one per rehearsal mark where the page has them), absolute octaves, the title, composer, tempo and key and time signatures it found. A place it was unsure of carries a mark with a short note — what it suspects, not where, since the mark already stands on the note:
<a d'>8@todo(b11 "a quarter short of 2/4: a note or rest missed, or a duration misread?") d'8 |
Fix the bar, delete the mark, and the red goes. A bar with no mark can still be wrong — the marks say where the reader doubted itself, not where it was right.
04
Check what it read
The marks show in red in the preview, as every @todo does; click one and the
editor goes to it. To check against the page itself, open Show Original Scan — the
picture button in the editor's title bar, or the palette. It opens the scanned pages in a
pane beside the score, and the two work as one:
- The same red frames on both. Each mark is framed with a dashed red line on the scan and in the preview, around the same bar of the same part on each side — heavier on the scan where the reader was less sure.
- Click to go. A click on a bar of the scan puts the caret in that bar's music; the caret, wherever you move it, lights the bar it is in on the scan.
- They scroll together. With Scroll with the preview ticked, scrolling either pane scrolls the other to the same bar, cut at the same height — the top of one is the top of the other. Drag the page to scroll it, Ctrl+wheel to zoom, right-click for Fit Width and Reset Zoom (1:1), as in the preview.
- Marks below… The slider hides the marks the reader was surer of than its setting (its confidence, 0 to 1; the default shows those under 0.8), so you can take the doubtful ones first and widen the net after.
Once you have corrected a bar, you may want to know whether it now matches the page. With
the setting lilysharp.scans.verifyOnSave on, saving has the reader engrave the
corrected score again and compare it with the scan, bar by bar: the marks that still differ
stay, the rest go. It is on by default; only a save you make checks, not an auto save.
The commands themselves, one by one, are on Lily# Studio commands; the setting is in the settings table.
05
Fix the marks — with AI, or by hand
Fix OMR Marks with AI… has the AI rewrite the bars the reader marked, one request a bar, only when you run it. Run it from the palette or the editor's menu, or on one bar from a mark's lightbulb (Fix this bar with AI…). A list lets you pick the bars, the least sure first.
- The model sees the page. Each request carries the scan's picture of the bar, beside its text and the reader's note; the page decides, and the meter is only a check. The picture is cut from the reader's box for the bar, which can hold two bars when the reader missed a barline: the AI matches the text to the bars it shows — one of them, or all of them written as separate bars on the line — and is told when the box is twice as wide as its neighbours.
- Each proposal passes three gates before it counts as ready: it compiles with no new error, it fills its bar, and the reader compares it with the scan (verify). A proposal the scan contradicts is shown with verify ✗ and its reason.
- You review them in the Bar fixes panel, one row a bar: Now (the bar as it is), Scan (the page) and Draft (the proposal) side by side, the notes that change coloured alike in the pictures and the text under them compared piece by piece. The AI answers row by row in the background, and the other rows can be read and decided meanwhile.
- Accept writes a row into the
.lysat once (its own Ctrl+Z), Discard drops it; Accept All (N) writes the ready rows as one edit. keep @todo beside Accept writes the bar and keeps it marked, with the words you type as its memo — for a proposal that is better but not right yet. - A draft can be edited where it stands: click its text and type, and its picture
and gates follow. Over the draft's picture, original (the bar as it stands),
your edit and AI proposal switch the draft between the three — those the row
has, the one shown in bold; your edit is kept, never lost, while another is shown.
Ask AI starts from the line the draft shows, and its answer takes the draft. The
field completes as the editor does, from the file around the bar: typing a word,
@or\opens the list (Ctrl+Space too), Enter or Tab puts the item in, Escape closes the list.
Edit Bars Beside the Scan opens the same panel without the AI, for the bars on the selected lines (or the caret's): each bar beside its scan, to put right by hand with the same pictures and gates — on a bar with no mark, add @todo marks it as you accept. Edit N Bars Beside the Scan… in the scan view's head opens the bars of the marks its slider shows; a row's Ask AI asks the AI about that bar.
Every picture in the panel zooms with Ctrl+wheel about the pointer and scrolls with a drag, its bar always in the frame: zoomed out, the bar stays whole in view; zoomed in, the view stays on the bar. A line that holds two bars shows both, in the scan and in the draft.
A missed barline. When the reader misses a barline, two bars come out as one, and
Lily# reports a bar line that looks to be missing (the length is a whole number of bars). The
lightbulb's Write the missing bar line, and the row's write the missing bar line
in the panel, write | where each bar of the meter ends — unless a note is held
across one.
The model is the one Lily#: Select AI Model… names for Ask AI
(lilysharp.ai.editModel). More than 25 bars at once asks first.
06
What it reads, and not yet
Printed (engraved) music: staves, clefs, key and time signatures, notes and chords,
rests, dots, accidentals, beams, tuplets, ties and slurs, grace notes, several voices on a
staff, piano systems and groups of staves (the braces and brackets that join them), multi-bar
rests, percent repeats, octave lines, guitar and bass TAB, drums; dynamics, hairpins, pedal
marks, articulations and ornaments, trill lines (“tr” and a wave), arpeggios, glissandi;
common words of expression in italic (“dolce”, “rit.”, “a tempo”, “sempre p”) and “rit.” or
“accel.” with a dashed line; repeat bar lines, the endings with their numbers, segno and coda,
“To Coda”, “Fine”, “D.C. al Fine”, “D.S. al Coda” and the like, written as the file's
form; the tempo marking, the title, subtitle, composer and poet over the first
system, and the rehearsal marks in boxes over the staff, which become the sections of the file.
Lyrics are read verse by verse and written as lyrics lines under the music.
Best results come from clean digital pages (PDF or image exports of LilyPond, MuseScore, Dorico,
Finale) and good black-and-white scans at about 300 dpi; older prints scanned small are read
too, with more marks to check.
Not yet, while in beta:
- Chord names are passed over — not misread as notes, but not written.
- Lyrics: on clean pages about 95 syllables in a hundred come out right; on old prints scanned small about a quarter are wrong or missing, so check them against the page.
- A “D.S.” or “D.C.” standing alone, and a “Fine” among other words, are not read as part of the form.
- Words of expression are written only when they are among the common ones the reader knows (“dolce”, “espress.”, “rit.”, “pizz.”, “sempre legato” and the like) and printed in italic; others (“tenderly”, “sul G”) are passed over. A “rit.” with a dashed line too short to show a dash is written as plain text.
- A rehearsal mark of a single letter in a box becomes a nameless section; section names printed without a box are not read.
- Lead sheets: the melody, its header and marks are read over the chord diagrams and verses, and the one-line rhythm staff under the melody is written as slashes; the chord names and diagrams are passed over. Parts laid out in columns are read poorly.
- Handwritten music is not read. Colour or low-contrast scans, and pages saved small (under about 100 dpi), read worse than black-and-white scans at 300 dpi.
- Words — title, tempo, rehearsal marks — are read with the text recognition built into Windows, in the languages installed for it, so a Latin title on a Japanese-only PC may come out with a wrong letter or two.
Check what it reads: a mark says where it was unsure, but a bar with no mark can still be wrong. The reader's own page on the Marketplace keeps this list current; where it and this page disagree, it is right.
07
Privacy and terms
Everything runs on your computer: a small learnt symbol detector, the rules of notation and Windows' own text recognition read the page. No image or result is sent anywhere, and the extension keeps no account or key.
Only if you run Fix OMR Marks with AI… do the marked bars — their text and their picture from the scan — go to the language model you choose in VS Code, as with any chat.
Calamo is free and open source under the Apache License 2.0 (its repository, where misread pages can be reported too). It is a separate program from Lily# Studio — GPL-3.0 or later — which runs it as a child process; a Lily# Studio without it loses the scan commands and nothing else. The third-party notices are in the extension.