Repository navigation
1.8
Chord symbols and annotations are drawn.
Two fixes, both to things the parser already understood but the renderer did not draw
correctly. Each adds a small amount of public API, which is why this is 1.8.0 and not 1.7.1.
Chord symbols and annotations (#171)
Chord symbols ("Am7", ABC v2.2 §4.18) and annotations ("^text", §4.19) were parsed onto
Note and Chord, and given room above the staff, but nothing drew them. They are now set
in the text face at twice the staff space, as outlines or <text> according to the
document's TextRendering.
| Written | Drawn |
|---|---|
"Am7" |
above the staff, on one line nearest it across the system |
"^text" |
above the staff, stacked over the chord symbol |
"_text" |
below the staff, above the lyrics |
"<text", ">text" |
beside the notehead, clear of its accidental or dot |
"@x,y text" |
offset from the notehead, in staff spaces |
The vertical layout reserves the lines each staff actually stacks. The first ^ annotation on
the first note of a variant ending, as in [2 "^repeat of part 2"A…, is set inside the
bracket just right of its number, which is where abcm2ps puts it.
Not done yet: the measure sizer does not widen a column for its text, annotations on rests and
bar lines attach to the next note, and chord symbols are printed as written (# and b are not
turned into ♯ and ♭). CONFORMANCE.md has the details.
ResolvedSystem.annotationFloors (new type AnnotationFloors) records where the layout
engine put the bands.
A variant ending that opens mid-measure (#172)
§4.10 ties only the end of an ending to a bar line, so a bare [2 may stand part way
through a bar, as a pickup that changes on the second time through usually is. CeolKit drew
the bracket from the bar line anyway. It now starts just ahead of the note that opens the
ending.
The model records the position as Measure.endingStartIndex, the index into events. It is
nil for an ending that opens at a bar line (|1, :|2, [1 written against a bar), and
those render exactly as before.
What's Changed
- Fix #171 — draw text annotations and chord symbols by @sbeitzel in #173
- Fix #172 — mid-measure variant ending bracketed from its note by @sbeitzel in #174
- Release 1.8.0 by @sbeitzel in #175
Full Changelog: v1.7.0...v1.8.0
Upgrading
Source-compatible with 1.7.0. The additions (Measure.endingStartIndex,
ResolvedSystem.annotationFloors, AnnotationFloors) are all behind defaulted initializer
parameters, and a Measure encoded by 1.7.0 decodes with endingStartIndex == nil.
Engraved output changes for any tune that has chord symbols or annotations, because they are
now drawn and the staff reserves room for them. It also changes for any tune with an ending
opened mid-measure. A snapshot test that pins such pages needs re-recording. Other tunes
are byte-identical to 1.7.0.