Loading…
Loading…
Rule
Gradus GE-022 · cite this code — it is permanent. Rule id spelling-diatonic-key-membership
For a pitch class with two plausible spellings, prefer whichever is diatonic to the current key; if neither/both are diatonic, prefer the key's sharp/flat accidental-preference side.
A note in F major spelled D#4 instead of the contextually-relevant Eb4 (e.g. a borrowed iv from F minor) -- the existing preferredSpelling() would already catch this specific diatonic-membership case correctly today.
Gould, general spelling-by-key-context guidance.
This rule can be decided from pitches, durations and voices — no layout required. A validator can check it before anything is drawn.
Gradus GE-022 — Baseline spelling rule: prefer the letter name diatonic to the current key. Gradus Engraving Rulebook v1.0. https://gradusmusic.com/engraving/rule/spelling-diatonic-key-membership
Rulebook v1.0 · text licensed CC-BY-4.0 · machine-readable at /api/v1/engraving/rules/spelling-diatonic-key-membership