Repository navigation
2.1
Clefs, octaves and stems, as abcm2ps draws them.
A minor release. Notes are placed for the clef in force, clef changes part way through a
voice are drawn, octave= takes effect, and stems and beams follow abcm2ps's rules. The
model gains Event.clefChange. See Upgrading.
Clefs and octaves
- Notes follow the clef (#222). Every notehead, stem, ledger line, accidental, tie and
slur used to be placed at its treble-clef position whatever clef the staff carried. Staff
position is now counted from the clef's bottom line (ClefSpec.staffPosition(of:)). An
octave clef (treble-8) moves nothing, as in abcm2ps. octave=onK:andV:(#224) shiftsNote.pitchin the semantic pass, scoped as
abcm2ps scopes it: a headerK:covers every voice, a bodyK:or aV:its own voice,
and each lasts until anotheroctave=replaces it.Transposition.statesOctavelets
octave=0reset it.- A
K:with a clef and no key (#223).K:bass,K:clef=bassand[K:clef=bass]are
read as options only (§3.1.14, §4.6) instead of being rejected.KeySignaturerecords
what was stated (statesKey,statesClef); what was left unsaid carries on from what is
in force, soK:GafterK:bassstays in the bass clef. An unreadableK:still warns,
and now changes nothing. - Clef changes are drawn (#223). A clef change part way through a voice is a new
Event.clefChangewhere the field was written. A change against a bar line is a small
clef before that bar (a courtesy clef at the end of a line, with the new clef full size
at the head of the next); a change mid-bar is a small clef between the notes; a clef
change alone draws no key signature.Measure.keyis set only by aK:that names a key.
Stems and beams
- Only notes shorter than a quarter are beamed (#217), whatever the meter (§4.7). In
6/8, 2/2 and 3/2, quarter notes were beamed to their neighbours. - One stem direction per beam group (#218). Each group's direction is decided before
any of it is drawn: down where the highest note is farther above the middle line than the
lowest is below, up in the opposite case, and a group as far above as below follows the
part's previous stem (up if none). Every stem in the group is placed for that direction. - A middle-line note follows the stem before it (#221) in an
.autovoice, across bar
lines and rests, and stems up where there is none.stem=, pipe format and a shared
staff's opposition still decide outright.
What's Changed
- Fix #217 — don't beam notes too long to carry a flag by @sbeitzel in #219
- Fix #218 — one stem direction per beam group, every stem placed for it by @sbeitzel in #220
- Fix #222, #224 — place notes for the clef in force; apply octave= by @sbeitzel in #225
- Fix #221 — stem a middle-line note the way the stem before it went by @sbeitzel in #226
- Fix #223 — accept a K: that names a clef but no key, and draw clef changes by @sbeitzel in #227
- Release 2.1.0 by @sbeitzel in #228
Full Changelog: v2.0.0...v2.1.0
Upgrading
Event has a new case, clefChange(ClefSpec). An exhaustive switch over Event needs a
branch for it; everything else is source-compatible with 2.0.0. The new KeySignature and
Transposition initializer parameters have defaults.
Engraved output changes for tunes in a clef other than treble, tunes using octave=, beamed
quarter notes in compound meter, and some stem directions on beam groups and middle-line
notes. Each now matches abcm2ps 8.14 -g.