Loading…
Loading…
Rule
Gradus GE-169 · cite this code — it is permanent. Rule id repeat-clef-key-signature-per-system-regression-guard
A clef and key signature are drawn at the start of every system (a reader who jumps to any line mid-piece must be able to read it without scrolling back); the time signature, by contrast, is drawn only once, at the true beginning of the piece, and is understood to persist. Courtesy clef/key-signature marks at the END of a system (warning of an upcoming CHANGE) are a distinct, separate convention that only applies when the clef/key actually changes mid-piece.
This is a POSITIVE finding, included as a regression guard rather than a defect: Gradus's own code comment states the correct behavior explicitly (lines 869-871, 'Every system repeats the clef and key signature, as engraved music does; the time signature and an opening repeat appear only on the first, the closing repeat only on the last') and the implementation matches: `stave.addClef(...)` and `stave.addKeySignature(keySignature)` run unconditionally per system (lines 888, 890), while `stave.addTimeSignature(timeSignature)` is gated `if (timeSignature && isFirst)` (line 889) and `setBegBarType`/`setEndBarType` for repeats are gated on `isFirst`/`isLast` respectively (lines 892-893). No violation exists today; the risk is a future refactor (e.g. the per-system width rewrite recommended elsewhere in this chapter) silently breaking this correct behavior while restructuring the system-building loop.
Gould, Behind Bars (clef and key signature repeated every system; Read, Music Notation (same); Ross, The Art of Music Engraving (same) — universal agreement.
This rule can be decided from pitches, durations and voices — no layout required. A validator can check it before anything is drawn.
Gradus GE-169 — Every system must repeat its clef and key signature; the time signature and an opening repeat sign appear only on the first system, the closing repeat only on the last — this is currently CORRECT and must not regress. Gradus Engraving Rulebook v1.0. https://gradusmusic.com/engraving/rule/repeat-clef-key-signature-per-system-regression-guard
Rulebook v1.0 · text licensed CC-BY-4.0 · machine-readable at /api/v1/engraving/rules/repeat-clef-key-signature-per-system-regression-guard