Loading…
Loading…
Rule
Gradus GE-057 · cite this code — it is permanent. Rule id ledger-line-count-formula
The number of ledger lines a note needs equals the number of complete thirds (2 diatonic steps) its notehead sits beyond the nearest staff edge line, rounded down. A note in the first space beyond the staff needs zero ledger lines; a note a third beyond the staff needs one; a note a fifth beyond needs two, and so on. This is the arithmetic every engraving program (VexFlow, Verovio/MEI, LilyPond, Finale) implements identically because it falls directly out of the 5-line staff's own line/space alternation — it is not a matter of house style.
An audit engine that estimates ledger count from screen pixels or from a hand-rolled octave-only heuristic (e.g. 'more than an octave from the staff = ledgers') mis-fires on any clef other than treble, and mis-fires on chords where only one notehead is ledgered.
Read, Music Notation ch. 1 (staff and ledger-line construction); Ross, The Art of Music Engraving, Leger Lines section (states the same line/space continuation rule); Gould, Behind Bars states the qualitative version ('leger lines continue the stave lines and spaces'). All three agree.
This rule can be decided from pitches, durations and voices — no layout required. A validator can check it before anything is drawn.
Gradus GE-057 — Ledger-line count is a deterministic function of pitch and clef. Gradus Engraving Rulebook v1.0. https://gradusmusic.com/engraving/rule/ledger-line-count-formula
Rulebook v1.0 · text licensed CC-BY-4.0 · machine-readable at /api/v1/engraving/rules/ledger-line-count-formula