Audiveris

What Is Audiveris?

Audiveris is an open-source Java application for optical music recognition (OMR). You give it an image of a page of sheet music, such as a scan, a photo or an image-based PDF, and it recognizes the staves, notes and other symbols, and exports the result as MusicXML.

OMR is a hard problem, because the notation has to be rebuilt from pixels. That makes it a project of its own, and Audiveris is one of the few free options.

How It Relates to Sheetmusic4J

The two projects solve different problems and don’t depend on each other:

AudiverisSheetmusic4J
InputImages: scans, photos, image-based PDFsStructured scores: MusicXML, MIDI, ABC, LilyPond, Guitar Pro, engraved PDF
JobRecognize the notation in the imageParse, lay out, render and play a score
OutputMusicXMLA Score model, JavaFX or image rendering, MIDI
Does OMRYesNo

They fit together as a pipeline. Audiveris can turn a scan into MusicXML, and Sheetmusic4J can then load, render and play that file like any other:

// MusicXML exported by Audiveris from a scanned page
Score score = ScoreFile.load(Path.of("scanned-page.mxl"));

Which Route for Which PDF?

What you haveWhat to use
Scanned or photographed page, image-based PDFAn OMR tool such as Audiveris, then load the MusicXML in Sheetmusic4J
Engraved (vector) PDF, where the notes are font glyphsSheetmusic4J can read it directly, see Engraved PDF (under development)
MusicXML, MIDI, ABC, LilyPond, Guitar ProSheetmusic4J reads these directly

If you can’t tell which kind of PDF you have, try selecting a single note with the mouse in a PDF viewer. If you can, it’s engraved. If the whole page is selected as one image, it’s a scan.

More info: Audiveris on GitHub.