Help:GNU LilyPond
GNU LilyPond is a free music engraving program. It is part of the GNU project, and as such, is released under the GNU General Public License.
For more information see w:LilyPond, or the project's website at www.lilypond.org.
The Mutopia Project is dedicated to transcribing public domain works into LilyPond source. See www.mutopiaproject.org for more details or downloads.
Input
[edit]LilyPond input files are fairly intuitive to read.
r8 g8\ff g8 g8 | e2\fermata | r8 f8 f8 f8 | d2~ | d2\fermata
would generate the opening violin notes of Beethoven's 5th. The vertical bars indicate the measure breaks, but do not affect the rendering of the music -- they just allow LilyPond to give warnings at compile time if the counts don't match up. Also, the indicated duration is in effect until another one is given, so the above can be minimally written as:
r8 g\ff g g e2\fermata r8 f f f d2~ d\fermata
but this is not recommended, for reasons of maintaining sanity. :-)
Third-party software
[edit]LilyPond comes with an w:Emacs mode, lilypond-mode, to assist in working with .ly files in Emacs.
There is also a w:jEdit plugin called LilyPondTool that works quite well.
Other resources can be found on the LilyPond wiki.
Output
[edit]By default, LilyPond generates PostScript and PDF files. These should be converted to SVG or PNG for use. Best is to use pdf2svg to convert to SVG (alternatively, under Linux pdf2svg). Alternatively, view the PDF in a PDF reader and take a screenshot, then crop it, to generate a PNG.
LilyPond also has the ability to generate SVG files, but the default output is not typically usable. The LilyPond Snippet Repository has instructions for fixing output from earlier versions, but they don't appear to work well with the current version.
LilyPoind can also generate MIDI files, and a LilyPond source file can generate multiple output types automatically.
Posting LilyPond output to Commons
[edit]It's recommended that when rendered music is posted to Commons, the source for generating it should be included if possible. The template {{LilyPond source}} provides a standard way to indicate that this has been done, as well as placing the file in Category:GNU LilyPond images (or Category:MIDI files created with GNU LilyPond, if appropriate).
Always include the \version directive, in case behavior changes in later versions break your source.
Supply the minimal source needed to generate the given image/MIDI file - more than that will confuse matters if changes have to be made later.