Loading…
Loading…
Rule
Gradus GE-161 · cite this code — it is permanent. Rule id spacing-uniform-system-width-vs-variable-density
When a system is justified to a fixed width, real engraving keeps NOTE DENSITY (space per beat) roughly consistent across systems and lets total measure count per system vary accordingly — it does NOT take the densest system's ideal width and stretch every OTHER system out to that same absolute width. LilyPond and Dorico both compute spacing per line independently; they never force two lines with different beat totals to the identical rendered width using the per-beat multiplier chosen for a different, denser line.
`maxBeats` and `maxNoteCount` (lines 759-787, verified: `Math.max(...voiceSlices.flatMap(...))`) are computed as the MAXIMUM across ALL systems in the block, and the resulting single `beatW`/`staveW` (lines 806-831) is applied via `new Stave(LEFT_MARGIN, y + yOffset, staveW)` (line 887) IDENTICALLY to every system, including ones with fewer bars/beats than the max. If `barsPerSystem=4` but the trailing system only has 1 leftover bar, that final system's Stave is constructed at the SAME `staveW` computed for a 4-bar system, and `fmt.formatToStave`/`fmt.format` (lines 1141, 1143) will spread that one bar's notes across the FULL width meant for four bars — producing a system whose notes are dramatically sparser than every other system in the same block.
Gould, Behind Bars, general system-layout principles (density consistency across a page); Ross, The Art of Music Engraving (justification should preserve consistent spacing density across systems, achieved by varying bar count per system).
This rule can be decided from pitches, durations and voices — no layout required. A validator can check it before anything is drawn.
Gradus GE-161 — Every system in a wrapped block must NOT be forced to the identical total width when systems hold different amounts of content. Gradus Engraving Rulebook v1.0. https://gradusmusic.com/engraving/rule/spacing-uniform-system-width-vs-variable-density
Rulebook v1.0 · text licensed CC-BY-4.0 · machine-readable at /api/v1/engraving/rules/spacing-uniform-system-width-vs-variable-density