LilyPond Cheat Sheet
LilyPond turns plain text into publication-quality sheet music. The essentials: the file skeleton, how notes and durations are written, and the commands for time, key, chords and dynamics.
File skeleton
\version "2.24.0"State the LilyPond version\relative c' {
c d e f g a b c
}Notes relative to the previous pitch\header { title = "My Piece" }Title and other metadata\score { … }Wrap music + layout to renderNotes & durations
c d e f g a bNote names (Dutch default)c4 d8 e2 c1Quarter, eighth, half, wholec4.Dotted (adds half again)r4A quarter restc' c,Up / down an octavecis cesC sharp / C flat (-is / -es)Structure & marks
\time 3/4Time signature\key d \majorKey signature\clef bassChange clef\tempo 4 = 120Tempo mark<c e g>4A chord\repeat volta 2 { … }Repeated sectionDynamics & text
c\ff c\pDynamics attached to a notec\< … c\!Crescendo hairpin to a stop\addlyrics { … }Attach lyrics to a voiceLilyPond — Text-based music engraving. · LilyPond in the tool directory →