Jump to content

Single-staff template with notes and chords: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
No edit summary
Line 32: Line 32:
[[Category:Chords]]
[[Category:Chords]]
[[Category:Really simple]]
[[Category:Really simple]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]][[Category:Snippet]]

Revision as of 23:00, 21 November 2025

Want to prepare a lead sheet with a melody and chords? Look no further!

\version "2.24"

melody = \relative c' {
  \clef treble
  \key c \major
  \time 4/4

  f4 e8[ c] d4 g
  a2 ~ a
}

harmonies = \chordmode {
  c4:m f:min7 g:maj c:aug
  d2:dim b4:5 e:sus
}

\score {
  <<
    \new ChordNames {
      \set chordChanges = ##t
      \harmonies
    }
    \new Staff \melody
  >>
  \layout{ }
  \midi { }
}