I am currently experimenting with microtonality in LilyPond. Mainly, I would like to switch to the Pythagorean tuning and lower or raise pitches by a syntotic comma, as in the this snippet. However, since the Pythagorean C is roughly 6ct below the equally-tempered one, I shifted the predefined scale by 6/200. Here is a minimal example (which only defines C, E↓, and G):
\version "2.24.1"
scalepitches = #`#(-6/200 198/200 402/200 492/200 696/200 900/200 1104/200)
#(ly:set-default-scale (ly:make-scale scalepitches))
#(define SYNTOTIC -22/200)
pitchnames = #`(
(c . ,(ly:make-pitch -1 0 0))
(eeh . ,(ly:make-pitch -1 2 SYNTOTIC))
(g . ,(ly:make-pitch -1 4 0))
)
#(ly:parser-set-note-names pitchnames)
arrowGlyphs = #`(
(,0 . "accidentals.natural")
(,SYNTOTIC . "accidentals.natural.arrowdown")
)
\score {
<< \new Staff \relative c' { \key c \major c eeh g c } >>
\layout {
\context {
\Score
\override KeySignature.alteration-glyph-name-alist = \arrowGlyphs
\override Accidental.alteration-glyph-name-alist = \arrowGlyphs
}
}
\midi{}
}
Now when compiling the example, LilyPond starts looking for an alteration sign for -3/100=-6/200
in order to print the key signature, and clearly does not find any. The alteration signs in front of each the notes are printed correctly (even though there are superfluous natural signs, probably caused by the false/missing key signatures). If, however, I replace -6/200
at the very beginning by 0/200
, then everything goes through without a problem (and the superfluous natural signs vanish). Similarly, if I leave out the pitchnames
-block (and, accordingly, do not use eeh
below), then again, there is no issue at all.
Why does this happen? I would have expected that the modification of the scale does not need any alteration signs—and if the vector starts with 0/200
, then, indeed, LilyPond will not ask for any other sign that e.g. indicates the shift of G by -4/200
. And why does this issue have anything to do with the pitchnames at all?
And: Is there a better way to implement the shift by 6ct that avoids this issue?
eeh
, see the arrowGlyphs.) For example, the global down-shift by 6ct I am aiming for should only effect the MIDI file, not the PDF.