Key signatures

Music Glossary: key signature, major, minor.

The key signature is set with the command \key followed by a pitch and \major or \minor.

\relative {
  \key d \major
  d'4 fis a c |
  \bar "||" \key c \minor
  c,4 ees g b |
}

[image of music]

LilyPond 学习手册 v2.25.14 (开发分支).