Opentopia Directory Encyclopedia Tools

GNU LilyPond

Encyclopedia : G : GN : GNU : GNU LilyPond


GNU LilyPond is a free software program for engraving sheet music for all common operating systems. It uses a simple text notation for music, which is then compiled into PDF (via PostScript), SVG or other formats. LilyPond can also automatically generate MIDI files from music specified in the LilyPond format.

Unlike retail programs such as Finale and Sibelius, LilyPond does not contain its own graphical user interface for the creation of scores. It does, however, have the same aim of producing output comparable to professionally-engraved scores. Some graphical music notation programs such as Rosegarden and NoteEdit can export files directly to LilyPond format.

First measures of Adeste Fideles, generated by LilyPond.
Enlarge
First measures of Adeste Fideles, generated by LilyPond.

One of LilyPond's major goals is the production of unusually high-quality scores that are engraved following traditional layout rules utilized during the era when scores were engraved by hand. It is often considered to produce output of better quality than the leading commercial packages, although they have improved markedly in recent years.

The Mutopia project, which distributes free sheet music, uses LilyPond to typeset its music, as does Musipedia, a collaborative music encyclopedia. [WikiTeXWikiTeX], a MediaWiki interface, supports editing LilyPond notation directly in wiki articles.

Example of LilyPond input file

Text after a percent sign (%) is a comment. Double percent signs are used here for readability.

In LilyPond, notes are entered in note, pitch and length format; pitch is represented with series of single quotes or commas, each representing an octave up or down from the base. For example, a'4 is an A, one octave up from the base, of quarter note length. As a curious syntactical rule, all other modifiers - even ones containing parentheses, which by usual writing rules should go before the note - are added after the note, so d8[ c] is an eighth-note pair with a beam as signified by the brackets.

LilyPond has two modes of entering the note pitches: Absolute and relative. In absolute mode, note pitches are always given, for each note, relative to the base; in relative mode, when the melody stays within limits, notes with unspecified pitch are assumed to be "near" the last note and pitch markers are only used when the interval between the preceding note is more than a fourth. This example uses the relative mode.

The only character encoding that LilyPond understands is UTF-8. This encoding lets you combine Danish, Hebrew, Korean, etc. in the same file. The first line in the file tells emacs that this file should always be read and written as UTF-8. If you use other editors than emacs, you need to make sure that they use UTF-8 too; otherwise anything but ASCII will break.


  1. !lilypond firebreathers.ly -*- coding: utf-8; -*-
%% Theme to "Fire Breathers", a homebrew NES game perpetually %% under development. Composed by Urpo Lankinen.

%% Note: The composer has made this source code available %% to Wikipedia under the GFDL license. Other versions outside %% Wikipedia are typically under CC BY-SA license.

%% This file uses Finnish note names (for example, where %% Americans use "F#" and "Bb", Finns use "Fis" and "B"). %% Dutch note names are used by default. \include "suomi.ly"

%% Optional language upgrade helper. \version "2.6.0"

%% The header block defines the titles and texts. \header

Melody = \relative c''

%% This is the second voice. SecondVoice = \relative c

%% Melodies, lyrics and chords can be assigned to a variable and then %% be *reused* elsewhere. Here are three different accompaniment %% patterns, which are used throughout the accompaniment melody. AccompA = \relative c AccompB = \relative c AccompC = \relative c

Accompaniment =

%% The top level music definition. <<

\new Staff \Melody
\new Staff \Accompaniment
\new Staff \SecondVoice
>>

Corresponding output

Rendered output

See also

External links

[MetaMeta] has a page about this at:

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: