From Young Composers
Jump to: navigation, search

What is Lilypond?

Young Composers Wiki users have the ability to create sheet music anywhere on an article through use of a music typesetter named Lilypond. The learning curve is fairly steep, but it is worth taking the time to get to grips with. The following sections will help you to understand the basic features our plugin has to offer. If you have any typesetting questions, feel free to contact James, chopin, or ParanoidFreak.

Inputting notes

As a quick template, this is what you need to do in order to create a simple scale using only eighth notes that are slurred. Notice how all notation is between two music tags:

c8 (d e f g a b c)

The above code produces the below notation, as follows:

<music> c8 (d e f g a b c) </music>

Notes automatically move by the smallest interval. This means that to achieve a fifth from C you must indicate that you specifically want G that is a fifth above rather than G that is only a fourth below.

  • If you want to raise a note if it is a 5th or more from the preceding note, use a tick mark like this: a'
  • To lower a notes by a fifth or more, use a comma: a,
  • Whether or not the fourth/fifth is augmented/diminished is irrelevant, the rule still applies.

c16 (g' c, g') c, (g c g) c (f c f) c (f, c' f,)

<music> c16 (g' c, g') c, (g c g) c (f c f) c (f, c' f,) </music>


To input a rest, type r instead of any note name.

Inputting rhythms

Rhythms are indicated by their American note values (i.e. a crotchet is called a quarter note, a quaver an eighth, and so on). These are input using simple numbers placed immediately after the note name or rest.

  • 1 for whole note
  • 2 for half note
  • 4 for quarter note
  • 8 for eighth note
  • 16 for sixteenth note... and so on and so fifth.<sic>
  • /breve for breves (double whole notes) instead of using a number
  • . after a number to dot any note value ("c8." means a dotted eighth note C)


\times fraction { tuplet }

  • Example 1: if you want quarter note triplets on C, there are three triplet notes in the time of two duples, so you would say each note is two-thirds times the value (value being a single quarter note). In this case you would put \times 2/3 { c4 c c }
    • Example 2: if you want quintuplet eighths on F, there are five quintuplet notes in the time of four duples, so you would put \times 4/5 { f8 f f f f }


Add these suffixes after the name of the pitch:
Sharp: -is
Flat: -es
Double sharps or flats: simply repeat the suffix twice.
Quarter sharp/half sharp: -ih
Quarter flat/half flat: -eh

A# would be ais, Bb would be bes

Cautionary accidentals: add a ? after the pitch.
Forced accidentals: add a ! after the pitch. <music>{\relative c' {\meterOff c8^\markup{all quartertones} cih cis cisih d deh des deseh cis^\markup{cautionary/forced} cis? cis cis! } } </music>

Bar lines

To turn off bar lines altogether, use \cadenzaOn
To insert a bar line at any point in the music, use \bar followed by the type of bar line in quotes.
  • Single barline: "|"
  • Double bar: "||"
  • Final barline "|."


Incase in angled brackets: <c e g>

<music>{\relative c' {\time 4/4 <c e g> } } </music>


Type: \clef name

Some available clef names include:

  • treble (G clef on the second line)
  • alto (C clef on the third line)
  • tenor (C clef on the fourth line)
  • bass (F clef on the fourth line)
  • french (G clef on the first line)
  • soprano (C clef on the first line)
  • mezzosoprano (C clef on the second line)
  • baritone (C clef on the fifth line)
  • varbaritone (F clef on the third line)
  • subbass (F clef on the fifth line)
  • percussion (percussion clef)
  • tab (tablature clef)
  • "G_8" (chiavette clef, used for guitar music and modern tenor parts)


Place \glissando between two notes.

Key signatures

Examples: \key c \minor and \key cis \major

Note that for example you will still have to type es in C minor, as e means "C natural".


Surround the notes to ottavate with \octaveOn and \octaveOff

<music>{\relative c' {\time 4/4 \cadenzaOn a8 b c d e4 \octaveOn e \octaveOff } } </music>


Incase in parentheses: c (d e f) g (a b c)

<music>{\relative c' {\time 4/4 c (d e f) g (a b c) } } </music>

Time signatures

Put \time 3/4 for 3/4 time, and so on.

Override abbreviated signatures (such as Common time) with \numericTimeSignature before the time change itself. This displays 4/4. To go back to "C" instead of "4/4", put \defaultTimeSignature before the next time change.

  • To hide the time signature, put \meterOff before the next time change
  • For an indefinite time signature, put \cadenzaOn

Crossing hand

\lh or \rh

Example 1

<music> {\relative c'

{\time 15/4 \cadenzaOn a16 b^\ffff c\p d_\markup{hello world} e [f g] \times 2/3{a [b c]} }

} </music>

Example 2

<music>\meterOn \cadenzaOff e16-.->a(b gis)a-.->c(d b)c-.->e(f dis)e-.->a(b a) gis(b e)e,(gis b)b,(e gis)gis,(b e)e,(gis? b e) </music>

External Resources

Guide for the Absolute Beginner - Lilypond Wiki

Lilypond Notation Reference