譜線の音程を変更する

音符の位置を変更するためには、staffLineLayoutFunction を使用します。このスニペットは、これを ly:pitch-semitones にセットし、半音が間隔 1 つ分になるクロマティック スケールを作り出しています。

scale = \relative c' {
  a4 ais b c
  cis4 d dis e
  f4 fis g gis
  a1
}

\new Staff \with {
  \remove "Accidental_engraver"
  staffLineLayoutFunction = #ly:pitch-semitones
}
{
  <<
    \scale
    \context NoteNames {
      \set printOctaveNames = ##f
      \scale
    }
  >>
}

[image of music]

LilyPond snippets v2.25.15 (開発版).