Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > GNU LilyPond


 Contents
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.


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; other programs may be able to export files to another format, such as MusicXML, that can be converted to LilyPond.

The Mutopia project, which distributes free sheet music, uses LilyPond to typeset its music. WikiTeX, a MediaWikiMediaWiki is a Wiki software licensed under the GNU General Public License. It is written in PHP and uses an underlying MySQL relational database. MediaWiki was originally written for Wikipedia by. The site previously used UseModWiki (aka "Phase I"), and interface, supports editing LilyPond notation directly in wiki articles.

1 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 available the following source code to % the Wikipedia article under GFDL license. Other versions of this song, % which are available outside Wikipedia and its GFDL-permitted % mirrors/derivants, are typically under CC BY-SA license. % The version directive identifies the Lilypond syntax version. % This particular source file works in Lilypond 2.2.x. % Typically, there are large changes in syntax (usually for better!) % between the major releases. % The convert-ly program can be used to automatically transform the source % code to most recent version. \version "2.2.0" % This library file makes Lilypond use the Finnish note names % (for example, where Americans use "F#" and "Bb", Finns use % "Fis" and "B"). Danish note names are used by default. Other % national conventions are supported! \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" } % Here is the main melody. The character | is used for a bar check; % it's also a convenient way to display where the bars are. As you can see, % the notes are simply entered with their real names, followed by number that % shows their length. The note can have ' or , in it, meaning a leap % of octave up or down. (This tune uses relative note entry mode, which % you can also explicitly note each note's octave, for example, % c' is middle C.) As expected, a period adds a . to the note. % Parentheses show start and end of slurs, brackets show start and end % of 8th-note beams. (The beaming can be done automatically too!) % Notes are tied with ~. The "r" note is a rest. (and "h" is "b" in English.) 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 "|." } % And now for something really cool... % You can write a lot of different kinds of things easily - melodies, % lyrics, chords, everything. The interesting bit is that they can % always be *reused* elsewhere! Here, I define three different % accompaniment patterns, then use them 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 "|." } % Finally, there is the score block. The score block is used to % define what is actually present in the composition, and how is it % going to be printed. Here, we define three simultaneous staffs, % for melody, accompaniment and the second voice. % The score will be printed on paper, without the first line getting indented % (since there is no instrument names, we don't want the space). % We also wish to produce a MIDI output, using metronome tempo of % 120 quarters per minute. (Note that this isn't noted anywhere on the % paper - you need separate commands to add that to the score.) \score { << \new Staff \Melody \new Staff \Accompaniment \new Staff \SecondVoice >> \paper { indent = 0 } \midi { \tempo 4 = 120 } }

Read more »

Non User