Tombstone
melody
Dec 2014 โ Nov 2016 ยท age 32โ34
What it was
Four days over Christmas 2014 teaching Java to read sheet music, plus a reformat the next autumn and a last commit labelled "not sure". It opened compressed MusicXML, followed the container's manifest to the real score, and walked the document one note at a time, carrying duration and staff forward from the previous note the way the format quietly expects. It drew two staves into an image and placed each note with the Unicode musical symbols of the Bravura font, so a professional engraving font did the drawing. Because no font API would say how tall a note head is, it rendered a whole note into a scratch image and scanned the pixels to find out. It stopped, on purpose, after six measures of a single-part piano score. A second entry point began a piano-roll model and did nothing with it.
Wins, for the age
- At thirty-two, on a holiday break, Jeff asked the rasterizer directly when the metrics refused to answer: draw the glyph, then overdraw a stemless one in white so only the stem survives, and measure what is left. Ugly, effective, font-independent. A primate squinting at pixels until the font confessed.
- Used SMuFL and Bravura, standardised only a year earlier, exactly as designed, building the astral-plane surrogate pairs by hand.
- Refactored the document walk into abstract hooks for measures, notes and backups, the event-stream shape SAX had found in 1998, so one walk could feed an engraver or a piano roll.
- Saw inside four days that engraving was the wrong first product and a piano roll the easier, more useful one.
What it taught
- MusicXML is a stateful stream pretending to be a document. Backups, chords, inherited staves and beam levels make sense only if you carry the previous note with you. Treated as a tree, the walker was awkward; treated as events, it was clean.
- Container formats hide the real payload. Follow the manifest rather than guess a name.
- When an API refuses a question, the raw output often answers it.
- Debug scaffolding is not a stop condition. The run ended by throwing a bare exception after measure five, and the copied walker was never deleted.
Genealogy
Ancestors: none on record. A holiday experiment outside the main lines. Descendants: none on record. What survived was domain knowledge, not code.
Epitaph
Here lies melody, which drew six measures and stopped on purpose, having learned that sheet music is a stream, not a tree, and that a font can be measured by looking at it.