Sheetmusic4J 0.0.2

2026-07-29 by Frank Delporte

Two New Formats and a Lot of Improvements

A week after the first 0.0.1 release, Sheetmusic4J 0.0.2 is out. The 0.0.1 release was really a question: is there interest in a native Java(FX) sheet music library? After sharing this library on LinkedIn, I immediately got the question if ABC Notation and Guitar Pro files could also be supported. As a result, this 0.0.2 release adds support for both formats, alongside a broad round of engraving and testing improvements.

ABC Notation, In and Out

Requested by Peter De Coninck.

The headline of 0.0.2 is ABC notation support: core can now both read and write .abc files.

If you’ve spent time around folk and traditional music, you know ABC: it’s the compact, text-based format where a whole tune is a few lines you can paste into an email or a forum post. It’s the opposite of MusicXML, terse and human-writable where MusicXML is verbose and tool-oriented, and there are decades of freely shared ABC tunes out there.

The new AbcReader and AbcWriter parse into and generate from the same Score model as everything else, so once a tune is loaded the engraving, JavaFX rendering, and MIDI export all just work. Coverage already goes well beyond the basics: keys and modes, unit note length, meter, tuplets, ties and slurs, grace notes, decorations like staccato and rolls, barline styles, repeats and 1st/2nd endings, guitar chord symbols, lyrics, and multi-line titles, all with round-trip tests. As with everything at this stage, ABC is a big enough format that not every corner is covered yet, so real-world tunes that don’t render correctly are exactly the kind of bug report I want.

Guitar Pro: An Experiment

Requested by Soheil Rahsaz.

The second new format is more of an experiment. Sheetmusic4J can now do basic import of Guitar Pro 7/8 files (.gp, load only).

I want to be upfront about what this is. Guitar Pro is not an open format, there’s no published specification, and this importer is built on the community’s documented reverse-engineering of the modern GPIF format (the XML document tucked inside the .gp ZIP). It reads that with the JDK only, no extra dependency. Older binary formats (.gp3/.gp4/.gp5/.gpx) are not handled, and there’s no saving back.

I added it deliberately early, because I genuinely don’t know yet how people would want to use Guitar Pro files here: is standard-notation rendering enough, or is tablature-specific rendering the point? That’s the kind of thing I’d rather learn from real use than guess at. If you have a use case or a file that doesn’t import cleanly, let me know on GitHub.

Better-Looking Engraving

A lot of this release is “behind the scenes”: making the notation look right. Some of the improvements:

  • Grace notes now render as proper small flagged/beamed notes with a connecting curve, and their beam follows the pitch contour of the run. Still not perfect, but a lot better than in the first release.
  • Distinct flag glyphs for 32nd/64th/128th notes, and a real double-whole (breve) notehead.
  • Ties and slurs sit on the opposite side of the stem by default, and the tuplet bracket disappears when the run already beams cleanly.
  • Barline styles, repeat dots and voltas; articulations that hug the notehead; chord symbols closer to the staff; and better spacing around titles and accidentals.

There’s also a new NoteBackgroundStyle in the FX viewer, so you can configure the highlight box drawn behind a note (handy for play-along views), and a fix for a crash on very large scores by rendering through a windowed canvas rather than one oversized texture.

Under the Hood

The demo app got reorganized and gained a standalone strip play-along demo, the library now logs through SLF4J, the MusicXML reader correctly merges multiple <attributes> blocks per part, and MIDI import produces fewer spurious rests.

The full list is in the release notes, and the code examples show how to get started. If you try it, issues and feedback on GitHub are, as always, very welcome, they’re what shapes where this goes next.