注意:LilyPond 是一个 基于文本 的音乐雕版印刷软件;和一般图形界面的打谱软件相比,LilyPond 倒有点像一门编程语言。在您下载 LilyPond 之前,请先进一步了解我们的文本输入

Generic Packages or Distribution-Specific Packages?

Many distributions include LilyPond in their normal package system. These versions are easier to install and uninstall than the generic packages, but they may be older. If you wish to use our generic packages, please uninstall the official version from your system using the normal package manager for your distribution. See your distribution’s documentation about how to use their package manager.

Generic Packages



In the shell, type:

sh lilypond-2.20.0-OS-TYPE.sh


In the shell, type:



In the shell, type:

sh lilypond-2.20.0-OS-TYPE.sh --help

Compiling a file

注意:These instructions assume that you are familiar with command-line programs. If you are using any of the programs described in Easier editing, consult the documentation for those programs should you have any problems.

Step 1. Create your ‘.ly’ file

Create a text file called ‘test.ly’ and enter:

\version "2.20.0"
  c' e' g' e'

Step 2. Compile (with command-line)

To process ‘test.ly’, type the following at the command prompt:

lilypond test.ly

You will see something resembling:

GNU LilyPond 2.20.0
Processing `test.ly'
Interpreting music...
Preprocessing graphical objects...
Solving 1 page-breaking chunks...[1: 1 pages]
Drawing systems...
Layout output to `test.ps'...
Converting to `./test.pdf'...
Success: compilation successfully completed

Step 3. View output

You may view or print the resulting ‘test.pdf’.




Mac OS X

注意:LilyPond 是一个 基于文本 的音乐雕版印刷软件;和一般图形界面的打谱软件相比,LilyPond 倒有点像一门编程语言。在您下载 LilyPond 之前,请先进一步了解我们的文本输入




Double-click the downloaded file, then drag it to wherever you want.


Delete the LilyPond.app folder.


注意:These instructions assume that you are using the LilyPond application. If you are using any of the programs described in Easier editing, consult the documentation for those programs should you have any problems.

Step 1. Create your ‘.ly’ file

Double click the LilyPond.app, an example file will open.


From the menus along the top left of your screen, select File > Save.


Choose a name for your file, for example ‘test.ly’.


Step 2. Compile (with LilyPad)

From the same menus, select Compile > Typeset.


A new window will open showing a progress log of the compilation of the file you have just saved.


Step 3. View output

Once the compilation has finished, a PDF file will be created with the same name as the original file and will be automatically opened in the default PDF viewer and displayed on your screen.


Other commands

To create new files for LilyPond, begin by selecting File > New


or File > Open to open and edit existing files you have saved previously.


You must save any new edits you make to your file before you Compile > Typeset and if the PDF file is not displayed check the window with the progress log for any errors.

If you are not using the default Preview PDF viewer that comes with the Mac Operating system and you have the PDF file generated from a previous compilation open, then any further compilations may fail to generate an update PDF until you close the original.



Mac OS X 的命令行

The most convenient way to run lilypond scripts is by setting up “helper” scripts of your own.

  1. Create a directory to store these scripts,
    mkdir -p ~/bin
    cd ~/bin
  2. Create a file called lilypond which contains
    exec DIR/LilyPond.app/Contents/Resources/bin/lilypond "$@"

    注意:DIR will generally be /Applications/

  3. Create similar files lilypond-book, convert-ly, and any other scripts you wish to use, by replacing the bin/lilypond with bin/convert-ly (or other program name).
  4. Make the file executable,
    chmod u+x lilypond
  5. Now, add this directory to your path. Modify (or create) a file called .profile in your home directory such that it contains
    export PATH=$PATH:~/bin

    This file should end with a blank line.


The scripts — such as lilypond-book, convert-ly, abc2ly, and even lilypond itself — are included inside the .app file for Mac OS X.

Scripts can also be run from the command line by invoking them directly:


The same is true for all other scripts in that directory, such as lilypond-book and convert-ly.