I haven't gone any farther down the Lomse investigation path yet. Synthesia has been a bit of lumbering beast to get back up and running as a project now that I'm back from my nearly one-year hiatus. At this point most of the fires have been put out, I'm as caught up on email as I'm going to get, and I'm back to mostly-regular development.
In terms of missing underlying drawing "technology" in Synthesia's own sheet renderer before it could be on par with what Lomse is able to generate, I count three things:
- Text in arbitrary fonts.
- Beams that span more than two notes.
- Nice, swoopy generated ties/slurs.
For #1, Synthesia can draw text just fine. The "hard" part here is actually finding the font on the device. If the MusicXML file says to write something in italics... which font is that on macOS 10.12? What about on an Android 6.0 tablet? Or Android 11? Where is that file located? The last thing I want to have to do is ship a handful of full Unicode fonts with the app. Lomse's own support for this today seems
a bit ad hoc and would need to be extended to the platforms that Synthesia supports that Lomse doesn't yet. The right answer is probably something closer to using
fontconfig.
#2 is a smallish one. It has less to do with drawing beams (which is already specialized to be ultra-fast with nice anti-aliasing) and more to do with lengthening stems to match those beams. Really, I'm not too worried about this but it's in the list for completeness.
Progress Update!
#3
was a large technology hurdle. Until it wasn't!
This has been one of my bigger projects since I've been back. I learned about splines, curvature, curve
continuity, and all sorts of other fun math bits. This slur was generated by Synthesia's own sheet renderer and manually placed by hand as a tech demo:
- slurTest.png (33.71 KiB) Viewed 7054 times
I think it looks quite nice.
Since then I've been working to get the MIDI-to-sheet engine to finally generate the extra note heads for notes that last longer than the remaining duration of a measure. This tie was generated completely automatically from a MIDI file and simply screen-grabbed from the app:
- firstRealTie.png (21.75 KiB) Viewed 7054 times
There is still some work to be done before I can say the sheet music supports ties in general (notably for ties that continue to the next line), but the majority of the hard part is complete.
#3 was the big, scary one of the three. And now... it's not. So the value proposition of incorporating Lomse has become a little weaker. It's still an open question but Synthesia's own sheet music renderer is now also one step closer to "just working".