Lilypond Cheatsheet
Total Page:16
File Type:pdf, Size:1020Kb
LilyPond-MusicTypesetting Basic usage - LilyPond Version 2.14 and above Cheatsheet by R. Kainhofer, Edition Kainhofer, http://www.edition-kainhofer.com/ Command-line usage General Syntax lilypond [-l LOGLEVEL] [-dSCMOPTIONS] [-o OUTPUT] [-V] FILE.ly [FILE2.ly] \xxxx function or variable { ... } Code grouping Common options: var = {...} Variable assignment --pdf, --png, --ps Output file format -dpreview Cropped “preview” image \version "2.14.0" LilyPond version -dbackend=eps Use different backend -dlog-file=FILE Create .log file % dots Comment -l LOGLEVEL ERR/WARN/PROG/DEBUG -dno-point-and-click No Point & Click info %{ ... %} Block comment -o OUTDIR Name of output dir/file -djob-count=NR Process files in parallel c\... Postfix-notation (notes) -V Verbose output -dpixmap-format=pngalpha Transparent PNG #'(..), ##t, #'sym Scheme list, true, symb. -dhelp Help on options -dno-delete-intermediate-files Keep .ps files x-.., x^.., x_.. Directions Basic Notation Creating Staves, Voices and Groups \version "2.15.0" c d e f g a b Note names (Dutch) SMusic = \relative c'' { c1\p } Alterations: -is/-es for sharp/flat, SLyrics = \lyricmode { Oh! } cis bes as cisis beses b b! b? -isis/-eses for double, ! forces, AMusic = \relative c' { e1 } ? shows cautionary accidental \relative c' {c f d' c,} Relative mode (change less than a \score { fifth), raise/lower one octave \new ChoirStaff << \new Staff { g1 g2 g4 g8 g16 g4. g4.. durations (1, 2, 4, 8, 16, ...); append “.” for dotted note \new Voice = "Sop" { \dynamicUp \SMusic g8 g8 g8[ g g] g8[ g16 g16] Automatic and manual beaming } } r r2 r4 r4.. r16 s4 r4 (like a note name) \new Lyrics = "SLyrics" rests: s for invisible rests \lyricsto "Sop" \SLyrics \clef "treble" \clef "bass" \new Staff { \clef "tenor" \clef "treble_8" Clefs 8 \new Voice = "Alto" { \time 4/4 \time 2/2 \dynamicUp \AMusic 3 3 Time signature 4 8 \time 3/4 \time 3/8 } } \key c \minor \key b \dorian \key c \major Key >> } p <c e g>4 <f c'> q2 Chords, repeated chord Oh! c4~ c c2~ c4 <c a f>~ c Tie c( a) c\( b( a) g f\) Slur / Phrasing slur Useful Contexts g\p\< a b c\f\cresc d e\! Dynamics, hairpins, text crescendo Score The whole score p f cresc. << ... >> Staves in parallel Text StaffGroup c4-> c-. c^| c^-_+ c\trill Staffgroup with bracket c\marcato c^"Text" Articulations and text markup GrandStaff Staffgroup with brace ChoirStaff Staffgroup with bracket \partial 8 c8 | c1 | c Partial measure, bar line check, PianoStaff Staffgroup with brace \bar"||" c \bar"|." bar lines Staff One single staff 3 4 Full-/Multimeasure rests: R (with Voice A voice inside a staff 3 R1 | R1*3 | \time 3/4 R2.*4 4 exact duration) CueVoice Smaller voice for cues 1. 2. Lyrics c1 \repeat volta 2 { d } Repeats (with alternative endings; Lyrics inside staff/voice ChordNames Chords (lead sheet) \alternative {{e} {f}} g can be left out) Devnull No output Adagio ( = 60) A X \tempo "Adagio" 4=60 c1 c c Tempo indications, text marks Also: Dynamics, FiguredBass, Tab(Staff|Voice), \mark \default c \mark "X" Drum(Staff|Voice), RhythmicStaff, FretBoards, ... \grace d8 c4\appoggiatura d8 c4\acciaccatura d8 c4 Grace notes \times 2/3 {c8 d e} \times 4/5 {c d e d c} Triplet, tuplets 3 5 <<{a2 c4 a}\\{f4 g4 f2>> Parallel music Adding Lyrics Writing text and markup Links << \markup { LilyPond Homepage: \new Voice = "m" { \justify { http://www.lilypond.org/ A \underline justified \bold paragraph, c4 c8[( b]) a8[( b]) | c4 c4~ c4 | LilyPond Snippet Repository (LSR): } \fontsize #-2 automatically line-broken. http://lsr.dsi.unimi.it/ Some symbols: \dynamic ff \eyeglasses \new Lyrics \lyricsto "m" { \rounded-box text, \with-color #red Text Sim -- ple e -- xam -- ple __ User Mailing list: } [email protected] } } A justified paragraph, automatically >> line-broken. Some symbols: ff text, Text Cheatsheet by R. Kainhofer, License: Sim ple e xam ple Creative Commons Attribution-NonCommercial 3.0.