GNU LilyPond

GNU LilyPond is a free software program for engraving sheet music. It uses a simple ASCII notation for music, which is then compiled into TeX with embedded PostScript. The PostScript output can then be used to produce printable files or images. Lilypond can also automatically generate MIDI files from music specified in the LilyPond format.

Missing image
Lilypond-screenshot-adeste.png
First measures of Adeste Fidelis, generated by LilyPond

Unlike programs such as Finale and Sibelius, which feature a graphical user interface for entering notes, LilyPond focuses on producing beautiful output, comparable to professionally engraved scores. Some graphical music notation programs, such as Rosegarden and NoteEdit, can export files directly to LilyPond format.

The Mutopia project, which distributes free sheet music, uses LilyPond to typeset its music. WikiTeX, a MediaWiki interface, supports editing LilyPond notation directly in wiki articles.

Contents

Example of Lilypond input file

Lines beginning with percent sign are comments.


% Theme to "Fire Breathers", a homebrew NES game 
% 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"). 
% Danish note names are used by default.

\include "suomi.ly"

% The header part is used to control the texts added to the final output.
\header {
    title = "Theme to ``Fire Breathers!''"
    instrument = "For the 2A03 or SID"
    composer = "Urpo Lankinen"
    enteredby = "Urpo Lankinen"
    date = "June 2004"
}

Melody = \notes \relative c'' {
    \clef treble
    \time 3/4
    \key a \minor

    % The piece starts with a quarter-note partial bar, "\partial 4"
    % tells so to Lilypond.
    \partial 4
    a4 | e'4.( d8[ c]) r8 | d4.( c8[ h]) r8 | a2. | e2
    a4 | e'4.( d8[ c]) r8 | d4.( e8[ f]) r8 | e2. | r2
    e4 |  f4.( e8[ d]) r8 | d4.( c8[ h]) r8 | a2. | e2
    a4 | e'4.( d8[ c]) r8 | d4.( c8[ h]) r8 | a2. ~ a2 r4 | \bar "|."
}

% This is the second voice.

SecondVoice = \notes \relative c {
    \clef bass
    \time 3/4
    \key a \minor

    \partial 4
    r4 | e2.              | d2.             | a2. | e2
    a4 | e'2.             | d2       f4     | e2. | r2.
       |  f2.             | d2.             | a2. | e2
    a4 | e'2.             | d2       h4     | a2. ~ a2 r4 | \bar "|."
}


% In lilypond, melodies, lyrics, chords, can be written 
% easily and can always be *reused* elsewhere! Here, are 
% three different accompaniment patterns, which are used 
% throughout the accompaniment melody.

AccompA  = \notes \relative c { a4 e'8 a, e' a, | }
AccompB  = \notes \relative c { g4 d'8 g, d' g, | }
AccompC  = \notes \relative c { e,4 h'8 e, h' e, | }

Accompaniment = \notes \relative c {
    \clef bass
    \time 3/4
    \key a \minor

    \partial 4
    r4 | \AccompA \AccompB \AccompA \AccompA
         \AccompA \AccompB \AccompA \AccompA
         \AccompC \AccompC \AccompA \AccompA
         \AccompA \AccompB \AccompA | a2 r4 | \bar "|."
}

% The score block is used to define what is actually present 
% in the composition, and how is it going to be printed. 

\score {
    <<
	\new Staff \Melody
	\new Staff \Accompaniment
	\new Staff \SecondVoice
    >>
    \paper { indent = 0 }
    \midi { \tempo 4 = 120 }
}

Corresponding output

Missing image
Lilypond_example.png
Rendered output

See also

External links

fr:LilyPond

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools