GNU Lilypond
Table of Contents
- Music Engraving Tool by GNU project
It was originally part of the TeX
1. Control
1.1. Notes
Notes are surrounded by curly braces { NOTES }.
Curly braces create an object containing a sequence of notes.
\relative { NOTES } means the raising and lowering an octave
is relative to the previous note.
- Pitch:
atog. withcbeing the middle C. Notes must be in lowercase.- Accidental:
is,esafter the name. (e.g.ais) rrestn'to raise an octaven,to lower an octave.
- Length:
1-16for Nth notes..to add the dot. - Articulation:
-^,->,-.,--,-_after the name. - Beaming:
[ <notes> ]after a note - Slur:
( <notes> ) - Tie:
~, only the length needs to be specified. - Chord: surround the notes with angle brackets
< NOTES > - Simultaneous Expression:
<< SEQUENCES >>. Multiple sequences are stacked. - Tuplet:
\tuplet FRACTION { NOTES }- e.g.
\tuplet 3/2 { b4 4 4 }
- e.g.
1.2. Measures
\clef treble|alto|tenor|bass|...\key A \major|\minor\time N/N\tempo "DESC" N = NNN\repeat volta|segno|unfold|... N { NOTES }\bar "FORMAT"|is used for the compiler to check the bar length mismatch
1.3. Macros
Variables can be defined in normal way
VAR = EXPR
Expression can be a staff, note sequences
% starts a comment
1.4. Structure
\book {
\score {
\new Staff {
\new Voice {
\relative {
c''4 a b c
}
}
}
\header {
title = "TITLE"
composer = "COMPOSER"
}
\layout { }
\midi { }
}
}
Any missing structure is implicitly created.
1.4.1. Staff
Staff can be manually generated by \new Staff [\with { CONFIG }] { SUBSTRUCTURE } commands.
Otherwise the default staff is used.
\numericTimeSignature\omit SYMBOLClef\override StaffSymbol.line-count = #N\clef treble|alto|tenor|bass|...\time FRACTION\tempo "DESC" N = NNNOBJECT.stencil = ##fremove the symbolinstrumentName = "NAME"set the instrument name of the staff\break: new line
Multiple staffs can be combined with << STAFFS >>.
\new here creates new notation context in which
all environments are reset.
1.5. Options
#(ly:set-option 'SYM #t)sets the-dSYMflag
1.6. Paper
1.6.1. Notation Font
- Copy the font files into
/usr/share/lilypond/current/fonts/otf #(define fonts (set-global-fonts #:music "FONTNAME" #:brace "FONTNAME")- The default font is
Fetafrom theEmmentalerset
2. CLI
2.1. lilypond
.lyfile--format=FORMATchange the main output format--svg,--pngadditionally generate image files-dSYM--define-defaults[SYM[=VAL]|no-SYM]=previewto compile the first line, or in musical term, the first system.cropto crop the image to the contentresolutionpaper-sizebackend: Either'psor'svghelp
2.2. lilypond-book
.lytexfile- Compile a ./tex.html file containing
lilypondenvironment.