relative accidentals
Is it possible to let lilypond print a sharp symbol when a flat in the key signature is canceled (and a flat to cancel a sharp) and a natural symbol othewise?
So for example in F major a B would be preceded by a sharp symbol, but from E-flat back to E it'd use a natural symbol. This was used in the 17th century and I can't find anything about it in the lilypond reference manuals.
1 Comments
Sorted by latest first Latest Oldest Best
Since playback is very low in Lilypond's priorities, the easiest way to do this is to actually create a "B sharp" in the score where you would conventionally see a "B natural". Presumably the only reason you want to do this is to reproduce exactly what was in some 17th century source, not for performance - either by computers or modern humans.
If you are creating a short musical example the simplest way would be just to enter the "B sharp" using the conventions of your chosen input language.
Alternatively, you could define a new language (or edit an existing one) in the file define-note-names.scm. For example, the definition of English note names in that file contains
...
(bflatflat . ,(ly:make-pitch -1 6 DOUBLE-FLAT))
(bflat . ,(ly:make-pitch -1 6 FLAT))
(b . ,(ly:make-pitch -1 6 NATURAL))
(bsharp . ,(ly:make-pitch -1 6 SHARP))
(bsharpsharp . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
...
It's should be fairly obvious how to change that to make "b" in the .ly input file create something that looks like a "B sharp" in the score.
If you define your own input language, you could get correct playback from the same .ly file by generating a MIDI file using the standard language definitions.
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.