LilyPond Music Typesetting

Earlier in this series, I wrote about MuseScore, a drag, drop and type music typesetting program that bears similarities to the market leaders in the field. An alternative approach to making scores can be found in LilyPond, possibly well described as ‘music notation for coders’ but useful to others that are willing to give the coding approach a try. In the words of the authors:

LilyPond is a music engraving program, devoted to producing the highest-quality sheet music possible. It brings the aesthetics of traditionally engraved music to computer printouts.

In part, it is a reaction to the perceived lack of quality in music printed using the more graphically oriented programmes and wanted to go beyond ‘the soulless look of computer-printed sheet music’.

How does it work?

Music in LilyPond is entered as code (text) in a text editor and compiled into pdf by an additional piece of software. You’ll most likely end up running LilyPond through a combined application such as Frescobaldi (text only) or Denemo (mixed graphic, midi and text entry).

Here is an example of a very short excerpt:

\version "2.14.1"
\include ""
\score {
\new Staff {
\key d \major
\time 2/4
<cs' d'' b''>16 <cs' d'' b''>8.
<cs' d'' b''>8 [ <b d'' a''> ]

The music generated is:

This may, admittedly, look a little intimidating if you are not used to reading or writing code. For users of LaTeX, however, or those that code in other languages, LilyPond is a very powerful music layout tool that produces scores that are more traditional in look and feel and, therefore, easier to read by musicians than the output of other graphical typesetting programmes. Here is an example from Goyescas by Enrique Granados:

If it takes your interest, check out samples at and download LilyPond itself or one of the frontend applications with built-in display.