The Patchbay_

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 render

Notes & durations

c d e f g a bNote names (Dutch default)
c4 d8 e2 c1Quarter, eighth, half, whole
c4.Dotted (adds half again)
r4A quarter rest
c' c,Up / down an octave
cis 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 section

Dynamics & text

c\ff c\pDynamics attached to a note
c\< … c\!Crescendo hairpin to a stop
\addlyrics { … }Attach lyrics to a voice

LilyPond — Text-based music engraving. · LilyPond in the tool directory →

← All cheat sheets