Skip to content

How to Create Sheet Music. Part 3: Music Engraving by LilyPond

LilyPond image: double-lily
Double Lily

LilyPond is free open source software designed to create “beautiful sheet music”. It is available for Windows, Mac and Linux systems. The creators describe the software as an automated engraving system. It will format music notation beautifully without requiring typographical expertise of its users.” Read their series of essays about musical engraving and what is wrong with some of the commercial software programs available.

Although there are some small similarities to the ABC notation I described in my previous post, there are significant differences, starting with intent. The original intent of the ABC notation was to create a simple means of sharing folk tunes that could be read as text and sent as email. The ABC notation is a standard, not software. LilyPond is software with the intent of creating printed musical scores that match the best hand engraved musical scores of the past.

The similarity between ABC notation and the LilyPond software is that the basic means of specifying the notes in a musical score for both uses plain text source files and the letters a to g represent musical notes. However, the notation for LilyPond is not the same as for ABC notation.

Some Markup Comparisons between ABC Notation and LilyPond markup:

Markup ABC LilyPond Comments
Basic notes ABC..G includes middle C
abc..g for an octave higher
abc...g is the octave below middle C LilyPond has options to enter notes relative to last note and specify octave
Octaves A,, and a'' represent two octaves lower and 2 higher A,, and a'' represent two octaves lower and 2 higher
Sharps and flats ^C is C sharp
_D is D flat
=D makes natural thus a transition from D sharp to D natural would be:
^D =D
cis is C sharp
des is D flat
a transition from D sharp to D natural would be: dis d
LilyPond defaults to Dutch notation hence cis for C sharp. Other languages can be specified. If English is specified then would use s for sharp and f for flat.
Durations Defaults to eighth notes but can be changed. Note durations are specified as multiples of default. If quarter note is default then C2 is half note and C/2 (duration divided by 2) is eighth note. Durations are specified by number representing fraction. C2 is half note, C4 is quarter note and C16 is sixteenth note.

LilyPond converts a source file into a musical score. There is no GUI within LilyPond. Create your input file in a plain text editor and then run LilyPond to convert the file. For the Windows version of LilyPond you drag and drop your source file onto the LilyPond icon (shortcut to program) and you get a PDF file of the score.

Although there is no user interface to LilyPond, many other programs can either export as a LilyPond file (.ly file extension) or use LilyPond internally to render musical scores. TuxGuitar is one of the programs that can export as a LilyPond file. If you learn some of the LilyPond “tweaks” and nomenclature you can customize your TuxGuitar score to improve it. Beware though. LilyPond has a much more ambitious goal than ABC notation and the markup language for the LilyPond source file can become complex quickly if you are attempting to combine melody, tab, chords, chord diagrams and lyrics.

Example Markup 1 for a chord diagram 2:

LilyPond input for a Guitar Chord Diagram
LilyPond Chord Diagram Markup

LilyPond output including above snippet. Shows some of the different ways chord diagrams can be displayed.

Examples of LilyPond Guitar Chord Diagrams
Examples of LilyPond Guitar Chord Diagrams


  1. The color highlighting shown is from the jEdit editor using the LilyPond plugin.
  2. This code came from the LilyPond Snippet Repository

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.