Loading…
Loading…
Rule
Gradus GE-151 · cite this code — it is permanent. Rule id spacing-grace-note-width
A grace note (or grace-note group) draws at reduced size immediately before its principal note and needs real horizontal room of its own — it does not compress the principal note's space, it ADDS width before it.
`n.graceNotes` (lines 1060-1071) builds a `GraceNoteGroup` and attaches it as a modifier on the main `StaveNote` — VexFlow's real Formatter reserves room for it at draw time, but the pre-render `formatW` (line 829) has zero term for grace notes. A note with a 2-3-note grace group can silently consume noticeably more width than the estimate assumed.
Gould, Behind Bars (grace-note spacing); Ross, The Art of Music Engraving (ornament and grace-note spacing tables); VexFlow's own `GraceNote.SCALE = 0.66` constant (`node_modules/vexflow/src/gracenote.ts` line 23) fixes the exact scale factor Gradus's renderer already uses.
This rule can be decided from pitches, durations and voices — no layout required. A validator can check it before anything is drawn.
Gradus GE-151 — Grace notes must reserve their own horizontal width ahead of the main note. Gradus Engraving Rulebook v1.0. https://gradusmusic.com/engraving/rule/spacing-grace-note-width
Rulebook v1.0 · text licensed CC-BY-4.0 · machine-readable at /api/v1/engraving/rules/spacing-grace-note-width