
Sheetmusic4J for Java & JavaFX
Parse and render sheet music in Java(FX).
No WebView required.
Latest release: v0.0.3 · 2026-07-30
Sheetmusic4J is an open-source Java library that parses MusicXML into Java objects and renders them as native JavaFX music sheet views: no WebView, no browser engine, no JavaScript bridge.
Quick start
Sheetmusic4J requires Java 21 or higher and is available from Maven Central. Add the fxviewer dependency (it includes the core library):
<dependency>
<groupId>com.sheetmusic4j</groupId>
<artifactId>fxviewer</artifactId>
<version>0.0.3</version>
</dependency>implementation("com.sheetmusic4j:fxviewer:0.0.3")implementation "com.sheetmusic4j:fxviewer:0.0.3"Then load a file and drop the view into your scene:
Score score = ScoreFile.load(Path.of("song.musicxml"));
SheetView sheetView = new SheetView();
sheetView.setScore(score);
stage.setScene(new Scene(new ScrollPane(sheetView), 900, 600));
stage.show();See the code examples for the full, runnable application, core-only (parse/generate) usage, and play-along cursor/highlighting.
Watch: an introduction to Sheetmusic4J — Render Interactive Sheet Music in JavaFX (MusicXML Library).
Why Sheetmusic4J
Canvas. No browser, no JS bridge. It’s just a Node.javafx.graphics. Fast startup, tiny jlink footprint, no network.Wondering about the standards behind it? Read what inspired Sheetmusic4J: MusicXML, OpenSheetMusicDisplay, MIDI, ABC notation, Guitar Pro, SMuFL, the Bravura music font, and the MusicXML.com test files. And check the sheetmusic terminology glossary to see which class/method draws which notation element.
The sources of this project are available on github.com/sheetmusic4j/sheetmusic4j.
Used By
MelodyMatrix is a cross-platform MIDI recording and visualization app (Java, Kotlin, JavaFX) that turns live keyboard performances into real-time visual displays, including piano roll, staff notation, guitar fretboard, and chord diagrams. It uses Sheetmusic4J for its staff notation view.
Building something with Sheetmusic4J? Let us know and we’ll add it here.
Current status
Sheetmusic4J is at release 0.0.3, still early and published to gauge interest in a native Java(FX) sheet music library before investing further. The module structure, domain model, layout engine, JavaFX rendering (including a play-along strip view with a moving cursor and per-note highlighting), and the demo app are all in place. On top of MusicXML and MIDI, it supports ABC notation import/export (now fully wired into the ScoreFile facade) and basic, experimental Guitar Pro 7/8 import; rendering fidelity and format coverage are still being expanded.
Latest updates:
Jul 30, 2026
A patch release wiring the .abc extension into the ScoreFile facade, so one-line load and save work for ABC files alongside MusicXML, MIDI and Guitar Pro.
Jul 29, 2026
ABC notation reading and writing, experimental Guitar Pro 7/8 import, and a round of engraving improvements to grace notes, ties, slurs and chord symbols.
Jul 24, 2026
The background behind Sheetmusic4J: a Learn section in MelodyMatrix needed sheet music that follows along with playback, and no JavaFX library could do it.
Jul 23, 2026
The first release of Sheetmusic4J: a Java(FX) library that parses MusicXML and MIDI into Java objects and renders them on a JavaFX Canvas, without a WebView.
Follow the progress in the status posts and check the release notes for the latest changes.
Related projects
Sheetmusic4J follows the same approach as Lottie4J: parse a standard file format into typed Java objects and render it natively in JavaFX, without a WebView. Lottie4J does it for Lottie animations, Sheetmusic4J for MusicXML scores, and both are built on Java 21 with the same minimal, javafx.graphics-only footprint. See also MelodyMatrix, the MIDI recording and visualization app that uses Sheetmusic4J for its staff notation view.
