Loading…
Loading…
Rule
Gradus GE-147 · cite this code — it is permanent. Rule id accidental-redundant-vs-key-signature
Once a key signature raises or lowers a pitch class, individual notes of that pitch class do NOT carry a redundant accidental unless a courtesy accidental is deliberately used (e.g. after a chromatic alteration earlier in the bar, or by house-style choice). VexFlow itself ships a `KeyManager` specifically to suppress this redundancy, and Gradus does not use it.
`pitchToVexKey` (line 114) derives `acc` purely from whether the pitch STRING contains `#`/`b`, with no reference to `keySignature`, and lines 1009-1011 unconditionally add an `Accidental` modifier whenever `vk.acc` is truthy. In G major (`keySignature="G"`), authoring `F#4` — the diatonic 7th degree — still renders a redundant sharp on every F#, because the renderer never checks whether the accidental is already implied by the key signature in effect.
Gould, Behind Bars, accidentals chapter (accidentals apply only within the bar and are not repeated when already implied by the key signature); Read, Music Notation (courtesy-accidental conventions).
This rule can be decided from pitches, durations and voices — no layout required. A validator can check it before anything is drawn.
Gradus GE-147 — An accidental already implied by the key signature must not be re-drawn (and must not reserve extra width). Gradus Engraving Rulebook v1.0. https://gradusmusic.com/engraving/rule/accidental-redundant-vs-key-signature
Rulebook v1.0 · text licensed CC-BY-4.0 · machine-readable at /api/v1/engraving/rules/accidental-redundant-vs-key-signature