Loading…
Loading…
Rule
Gradus GE-286 · cite this code — it is permanent. Rule id chord-stem-direction-uses-furthest-note-not-highest
For a chord, stem direction is decided by whichever notehead — top or bottom — sits furthest from the middle line, not 'use the top note.' Wrong exactly when a chord straddles the middle line asymmetrically (a bass note far below the staff paired with a treble note only just above the middle line).
Gould, Behind Bars ('the note furthest from the middle line determines the stem direction'); Ross, The Art of Music Engraving, chord-stem section (same rule, 'the outer note'). Verified this is exactly VexFlow's own `calculateOptimalStemDirection` (stavenote.ts:559-569): `decider = (minLine+maxLine)/2` compared to `MIDDLE_LINE = 3` is algebraically identical to comparing `maxLine`'s distance from 3 against `minLine`'s distance from 3.
This rule can be decided from pitches, durations and voices — no layout required. A validator can check it before anything is drawn.
Gradus GE-286 — Chord stem direction follows the notehead furthest from the middle line, not simply the top note. Gradus Engraving Rulebook v1.0. https://gradusmusic.com/engraving/rule/chord-stem-direction-uses-furthest-note-not-highest
Rulebook v1.0 · text licensed CC-BY-4.0 · machine-readable at /api/v1/engraving/rules/chord-stem-direction-uses-furthest-note-not-highest