2

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?

2
  • Are you trying to get it to generate a midi file with pitch bend or midi tuning messages without changing the printed output?
    – phoog
    Sep 2 at 13:41
  • Yes, that’s true. (Even though I would like to assign a certain accidental to the note 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.
    – FKranhold
    Sep 2 at 14:29

1 Answer 1

1

While I haven't investigated the full details of what is happening in your example, there is a much simpler way of doing what you're looking for.

\version "2.24.2"

\score {
  {
    \transposition #(ly:make-pitch 0 0 -6/200)
    c'1 dis'1
  }
  \midi { }
  \layout { }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.