LilyPond — 使用方法

このマニュアルは LilyPond バージョン 2.14.2 で配布されるプログラムの実効方法について説明します。さらに、効率的な使用方法について提案します。

このマニュアルと他のドキュメントの関係について、あるいは、このマニュアルを他の形式で読む方法についての情報は、 マニュアル を参照してください。

マニュアルのいずれかを見失ってしまった場合、http://www.lilypond.org/ にマニュアルがすべて揃っています。


1. lilypond を実行する

この章では LilyPond を実行するための細かな規定について詳述します。


1.1 通常の使用方法

たいていのユーザは GUI から LilyPond を実行します。まだ実行したことがないのであれば チュートリアル を読んでください。 lilypond ファイルを書くのに代替のエディタを使用するのであれば、そのエディタのドキュメントを読んでください。


1.2 コマンド ラインの使用方法

この節にはコマンド ラインで LilyPond を使用するための追加情報が含まれます。これにはプログラムに追加オプションを渡す必要があるかもしれません。さらに、いくつかの特別なプログラム (midi2ly など) はコマンド ラインからしか利用できません。

ここで ‘コマンド ライン’ とは、OS の中にあるコマンド ラインを意味します。Windows ユーザは ‘DOS シェル’ という言葉の方が馴染みがあるかもしれません。MaxOS X ユーザは ‘ターミナル’ や ‘コンソール’ という言葉の方が馴染みがあるかもしれません。MaxOS X ユーザは追加のセットアップが必要かもしれません。 MacOS X を参照してください。

OS のコマンド ラインの使用方法についての説明はこのマニュアルが扱う範囲ではありません。コマンド ラインに馴染みがない場合は、その内容を扱っている他のドキュメントをあたってください。


lilypond を呼び出す

lilypond 実行可能形式ファイルはコマンド ラインから以下のように呼び出されます。

lilypond [option]… file

拡張子を持たないファイル名で呼び出された場合、‘.ly’ が最初に試されます。sudin から入力を読み込む場合には、file に対してダッシュ (-) を使用します。

filename.ly’ が処理されると、lilypond は出力として ‘filename.ps’ と ‘filename.pdf’ を作り出します。いくつかのファイルを指定することもできます。その場合、それらのファイルは個々に処理されます。1

filename.ly’ が複数の \score を含んでいる場合、2 つ目以降の score は ‘filename-1.pdf’ から始まる番号付きのファイルに出力されます。さらに、output-suffix がベース名と番号の間に挿入されます。以下の内容を含んでいる入力ファイルは

#(define output-suffix "violin")
\book { … }
#(define output-suffix "cello")
\book { … }

base-violin.pdf’ と base-cello-1.pdf’ を出力します。


標準シェル コマンド

シェル (例えばコマンド ウィンドウ) がリダイレクトをサポートしているのであれば、以下のコマンドでコンソール出力をファイルにリダイレクトすると役に立つかもしれません。

あなたの使用しているシェルがこれらのオプションをサポートしているかどうか、あるいは構文が異なるかどうかは、そのシェルのドキュメントを調べてください。これらはシェル コマンドであり、lilypond とは無関係です。


lilypond のコマンド ライン オプション

以下のオプションがサポートされます:

-e,--evaluate=expr

.ly’ ファイルを解析する前に Scheme expr を評価します。複数の -e オプションが与えられた場合、それらは順番に評価されます。

表記は guile-user モジュールの中で評価されます。そのため、expr の中で定義を使いたいのならば、.ly ファイルに以下をインクルードして:

#(use-modules (guile-user))

コマンド ラインで以下を使用します:

lilypond -e '(define-public a 42)'
-f,--format=format

フォーマットを指定します。format には svg, ps, pdf, png を選択します。

例: lilypond -fpng filename.ly

-d,--define-default=var=val

これは内部プログラム オプション var に Scheme 値 val をセットします。val が提供されていない場合、#t が使用されます。オプションを OFF にするには、var の接頭辞として no- を付けます。つまり、

-dno-point-and-click

-dpoint-and-click='#f'

と同じです。

ここで興味深いオプションをいくつか挙げます。

help

lilypond -dhelp を実行すると使用可能な -d オプションがすべて表示されます。

paper-size

このオプションはデフォルトの用紙サイズをセットします。

-dpaper-size=\"letter\"

文字列はエスケーブされたクォート ( \" ) で囲まれていなければならないということに注意してください。

safe

.ly 入力を信用してはいけません。

Web サーバを通じて LilyPond フォーマットが利用可能な場合、--safe オプションか --jail オプションのどちらかを渡さなければなりません--safe オプションは以下のようなインライン Scheme コードが大混乱をもたらすことを防ぎます:

#(system "rm -rf /")
{
  c4^#(ly:export (ly:gulp-file "/etc/passwd"))
}

訳者: #(system "rm -rf /") はルート ディレクトリ以下を削除し、export (ly:gulp-file "/etc/passwd") はパスワード ファイルをエクスポートします。

-dsafe オプションはインライン Scheme 表記を特別なセーフ モジュールの中で評価します。このセーフ モジュールは GUILE ‘safe-r5rs’ モジュールから派生したものですが、LilyPond API 関数をいくつか追加しています。これらの関数は ‘scm/safe-lily.scm’ でリスト アップされています。

さらに、セーフ モードは \include 指示を却下し、TeX 文字列の中にあるバックスラッシュを無効にします。

セーフ モードでは、LilyPond 変数を Scheme にインポートすることはできません。

-dsafe はリソースの乱用を検出しません。例えば循環データ構造体をバックエンドに食わせることで、プログラムをハングさせることは可能です。そのため、パブリックにアクセス可能な Web サーバ上で LilyPond を使用する場合、そのプロセスの CPU とメモリの両方の使用は制限されるべきです。

セーフ モードは多くの有用な LilyPond 断片がコンパイルされることを妨げます。--jail はより安全な代替オプションですが、セット アップにより多くの作業を必要とします。

backend

バックエンドに対して使用する出力フォーマットを指定します。format の選択肢には以下があります:

ps

PostScript

Postscript ファイルは TTF, Type1, OTF フォントを含んでいます。これらのフォントのサブセット化 (訳者: フォント セットを使用するフォントに限定すること) は行われません。東洋の文字セットを使用する場合、巨大なファイルになる可能性があります。

eps

縮約された PostScript (EPS)。これは各ページ (システム) をフォントを持たない個別の ‘EPS’ ファイルとして吐き出し、フォントを含めたすべてのページ (システム) を持つ ‘EPS’ ファイルを 1 つ吐き出します。

このモードは lilypond-book でデフォルトで使用されます。

svg

SVG (Scalable Vector Graphics)。これは各ページをフォントを埋め込まれた個別の ‘SVG’ ファイルとして吐き出します。埋め込みフォントをサポートする SVG ビューアか埋め込みフォントを OTF フォントに置き換える機能を持つ SVG ビューアが必要になります。UNIX では、Inkscape (バージョン 0.42 以降) を使うことになるかもしれません。使用前に、OTF フォントを LilyPond ディレクトリ (一般には ‘/usr/share/lilypond/VERSION/fonts/otf/’) から ‘~/.fonts/’ にコピーしてください。

scm

生データ – 内部 Scheme ベース描画コマンド – を吐き出します。

null

譜刻された楽譜を出力しません。-dno-print-pages と同じ効果を持ちます。

例: lilypond -dbackend=svg filename.ly

preview

タイトルとファイル システム情報を保持している出力ファイルを生成します。

print-pages

すべてのページを生成します。デフォルトです。-dno-print-pages-dpreview と組み合わせて使うと有用です。

-h,--help

使用方法の要約を表示します。

-H,--header=FIELD

ヘッダ フィールドをファイル ‘BASENAME.FIELD’ に吐き出します。

--include, -I=directory

directory を入力ファイルのサーチ パスに追加します。

-i,--init=file

init ファイルとして file をセットします (デフォルト: ‘init.ly’)。

-o,--output=FILE

デフォルトの出力ファイルとして FILE をセットします。適切な接尾辞が追加されます (つまり、pdf ならば拡張子 .pdf が追加されます)。

--ps

PostScript を生成します。

--png

各ページの図を PNG フォーマットで生成します。これは内部で --ps を使用します。画像の DPI 解像度は以下のようにセットします:

-dresolution=110
--pdf

PDF を生成します。これは内部で --ps を使用します。

-j,--jail=user,group,jail,dir

lilypond を chroot jail 環境で実行します。(訳者: chroot jail 環境とはセキュリティのためにカレント プロセスに対してルート ディレクトリの位置を変更すること。)

--jail オプションは、Web サーバを通じて LilyPond 譜刻を実行するときや LilyPond が外部から提供されたソースを実行するときに、--safe よりも自由度の高い代替手段を提供します。

--jail オプションはコンパイル プロセスの開始直前に lilypond の ルートを jail に変更します。それからユーザとグループを提供された環境にマッチするように変更し、カレント ディレクトリは dir に変更されます。このセットアップは jail (牢獄) から抜け出せないということを (少なくとも理論的には) 保証します。--jail を指定した lilypond の実行はroot (ユーザ名) として行われる必要があります。通常、これは sudo を用いた安全な方法で行われます。

jail のセットアップは少々デリケートな問題です。LilyPond がソースをコンパイルするのに必要とされるものすべてを jail の内部 で見つけられるということを保証しなければならないからです。一般的なセットアップには以下の項目が含まれます:

専用のファイルシステムをセットアップする

noexec, nodev, nosuid などのセーフ オプションでマウントするための専用ファイルシステムを作成すべきです。こうすることで、LilyPond から実行可能形式ファイルを実行したり、デバイスに直接書き込むことは不可能になります。専用のパーティションを作成することを望まないのなら、適当なサイズのファイルを作成し、それを使用してループ デバイス (ループバック デバイス) をマウントしてください。専用ファイルシステムはさらに、LilyPond が許可されたディスク容量以上には書き込めないということを保証します。

専用のユーザをセットアップする

jail 内部で LilyPond を実行する際、低い権限を持つ専用のユーザとグループ (仮に lily/lily とします) で行うべきです。このユーザが書き込み可能なディレクトリが 1 つだけ存在すべきであり、それを dir に渡します。

jail の準備をする

LilyPond は実行中にいくつかのファイルを読み込む必要があります。それらのファイルをすべて jail にコピーしておきます。それらのファイルが本当のルート ファイル システムで存在しているパスと同じパスにコピーします。LilyPond インストールの内容すべて (例えば、‘/usr/share/lilypond’) をコピーすべきです。

問題が発生した場合、その原因を突き止める最も簡単な方法は strace を使って LilyPond を実行することです。これによりどのファイルが見当たらないのかがわかります。

LilyPond を実行する

noexec でマウントされた jail の中では、外部プログラムを実行することは一切できません。そのため、外部プログラムを必要としないバックエンドで LilyPond を実行しなければなりません。すでに述べたように、jail モードでの LilyPond の実行はスーパーユーザ権限で行われならず (もちろん、その権限はすぐに外されます)、たぶん sudo を使います。LilyPond が使用可能な CPU 時間を数秒に制限する (例えば、ulimit -t を使って) というのは良いアイディアです。さらに、OS がサポートしているのなら、割り当て可能なメモリ容量を制限するというのも良いアイディアです。

-v,--version

バージョン情報を表示します。

-V,--verbose

冗長表示モードにします: 読み込むすべてのファイルのフル パスを表示して、時間情報を表示します。

-w,--warranty

GNU LilyPond の保証責任を表示します。(GNU LilyPond には保証責任はありません!)


環境変数

lilypond は以下の環境変数を認識します:

LILYPOND_DATADIR

これはデフォルトで参照するロケール メッセージとデータ ファイルがあるディレクトリを指定します。このディレクトリは ‘ly/’, ‘ps/’, ‘tex/’ などのサブディレクトリを保持しているべきです。

LANG

これは警告メッセージの言語を選択します。

LILYPOND_GC_YIELD

この変数を使ってメモリ使用量とパフォーマンスを調節することができます。これはメモリ管理の振る舞いを調整するパーセント値です。高い値にするとプログラムはより多くのメモリを使用し、低い値にするとより多くの CPU 時間を使用します。デフォルト値は 70 です。


LilyPond in chroot jail

Setting up the server to run LilyPond in a chroot jail is a complicated task. The steps are listed below. Examples in the steps are from Ubuntu Linux, and may require the use of sudo as appropriate.

Example script for 32-bit Ubuntu 8.04

#!/bin/sh
## defaults set here

username=lily
home=/home
loopdevice=/dev/loop0
jaildir=/mnt/lilyloop
# the prefix (without the leading slash!)
lilyprefix=usr/local
# the directory where lilypond is installed on the system
lilydir=/$lilyprefix/lilypond/

userhome=$home/$username
loopfile=$userhome/loopfile
adduser $username
dd if=/dev/zero of=$loopfile bs=1k count=200000
mkdir $jaildir
losetup $loopdevice $loopfile
mkfs -t ext3 $loopdevice 200000
mount -t ext3 $loopdevice $jaildir
mkdir $jaildir/lilyhome
chown $username $jaildir/lilyhome
cd $jaildir

mkdir -p bin usr/bin usr/share usr/lib usr/share/fonts $lilyprefix tmp
chmod a+w tmp

cp -r -L $lilydir $lilyprefix
cp -L /bin/sh /bin/rm bin
cp -L /usr/bin/convert /usr/bin/gs usr/bin
cp -L /usr/share/fonts/truetype usr/share/fonts

# Now the library copying magic
for i in "$lilydir/usr/bin/lilypond" "$lilydir/usr/bin/guile" "/bin/sh"  \
  "/bin/rm" "/usr/bin/gs" "/usr/bin/convert"; do ldd $i | sed 's/.*=>  \
    \/\(.*\/\)\([^(]*\).*/mkdir -p \1 \&\& cp -L \/\1\2 \1\2/' | sed  \
      's/\t\/\(.*\/\)\(.*\) (.*)$/mkdir -p \1 \&\& cp -L \/\1\2 \1\2/'  \
        | sed '/.*=>.*/d'; done | sh -s

# The shared files for ghostscript...
      cp -L -r /usr/share/ghostscript usr/share
# The shared files for ImageMagick
      cp -L -r /usr/lib/ImageMagick* usr/lib

### Now, assuming that you have test.ly in /mnt/lilyloop/lilyhome,
### you should be able to run:
### Note that /$lilyprefix/bin/lilypond is a script, which sets the
### LD_LIBRARY_PATH - this is crucial
      /$lilyprefix/bin/lilypond -jlily,lily,/mnt/lilyloop,/lilyhome test.ly

1.3 エラー メッセージ

ファイルのコンパイルの最中にはさまざまなエラー メッセージが表示される可能性があります。

Warning

何か疑わしいことがあります。あなたが何か普通でないことをリクエストしている場合は、そのメッセージを理解して、それを無視することができます。しかしながら、Warning は通常、入力ファイルに何か問題があることを示しています。

Error

何か明らかに問題があります。カレントの処理ステップ (構文解析、構文解釈、フォーマット) は終了され、次のステップは飛ばされます。

Fatal error

何か明らかに問題があり、LilyPond はコンパイルを続けられません。これが起きることは稀です。これが起こるのはたいてい、フォントのインストールに問題があるためです。

Scheme error

Scheme コードの実行中に発生するこのエラーは Scheme インタプリタによって引き起こされます。冗長オプション (-V または --verbose) 付きで実行している場合、問題となっている関数呼び出しの呼び出し追跡が表示されます。

Programming error

内部的な矛盾があります。このエラー メッセージはプログラマとデバッガを助けることを意図したものです。通常、それらは無視できます。時々、それらは非常に大きなメッセージとなり、他の出力を見えにくくします。

Aborted (core dumped)

これは、プログラムをクラッシュさせる深刻なプログラミング エラーを示しています。そのようなエラーは決定的なものだと考えられます。あなたがそのようなエラーでつまずいた場合、バグ レポートを送ってください。

警告とエラーを入力ファイルのある部分にリンクさせることが可能な場合、エラー メッセージは以下のような形式になります:

filename:lineno:columnno: message
offending input line

エラーが見つかった場所を示すために問題のある行に改行が挿入されます。例えば:

test.ly:2:19: error: not a duration: 5
  { c'4 e'
           5 g' }

これらの位置は LilyPond が警告やエラーが発生した位置を最善を尽くして推測したものですが、(ごく当たり前のことですが) 警告とエラーは何か予期しないことが起こったときに発生するものです。入力ファイルの示された行にエラーを見つけることができない場合は、示された位置の 1 行か 2 行上をチェックしてみてください。

エラーについての更なる情報が 一般的なエラー で提供されています。


1.4 一般的なエラー

以下で説明するエラーがしばしば発生しますが、その原因は明白でなかったり、見つけにくかったりします。目を通しておくと、それらのエラーに対処しやすくなります。


楽譜がページからはみ出る

楽譜がページの右マージンを越えてはみ出る、あるいは過度に密集するのは、ほぼ間違いなく音符の演奏時間に誤りがあり、小節の最後の音符が小節線を越えてしまうためです。ある小節の最後の音符が自動的に挿入される小節線の所で終わらなくても無効ではありません。なぜなら、その音符は次の小節に持ち越されるためです。しかしながら、そのような持ち越しが発生する小節が長く続くと、楽譜は密集して表示されたり、ページからはみ出たりします。ページからはみ出るのは、自動改行を挿入できるのは正しく終了する小節 (その小節のすべての音符が小節の中で終了しています) の後ろだけだからです。

Note: 誤った演奏時間は改行を抑制し、結果として楽譜が過度に密集したり、c ページからはみ出たりする可能性が生じます。

小節チェックを使用していれば、誤った演奏時間を簡単に見つけることができます。 小節と小節番号のチェック を参照してください。

あなたがそのような音符が持ち越される小節を続けることを意図しているのであれば、改行させたい場所に不可視の小節線を挿入する必要があります。詳細は 小節線 を参照してください。


余計な譜が表示される

コンテキストが \new\context で明示的に作成されていない場合、既存のコンテキストには適用できないコマンドに遭遇した時点で暗黙的に作成されます。単純な楽譜では、コンテキストの自動作成は有用であり、LilyPond マニュアルのほとんどの例はこの手法を用いています。しかしながら、コンテキストの暗黙的な作成はしばしば予期しない譜や楽譜を発生させてしまいます。例えば、以下のコードは後に続く譜の中にあるすべての符頭を赤にすることを意図していますが、結果は 2 つの譜が表示され、下の譜の符頭の色はデフォルトの黒のままとなります。

\override Staff.NoteHead #'color = #red
\new Staff { a }

[image of music]

これは、(符頭色の) オーバライドが処理される時に Staff コンテキストが存在していないため、Staff コンテキストが暗黙的に作成され、そのコンテキストにオーバライドが適用されるからです。その後に \new Staff コマンドによりもう 1 つ別の Staff コンテキストが作成され、そこに音符が配置されます。すべての符頭を赤にする正しいコードは以下のようになります:

\new Staff {
  \override Staff.NoteHead #'color = #red
  a
}

[image of music]

次の例では、\repeat コマンドの中に \relative コマンドが置かれているため、譜が 2 つ生じています。\repeat コマンドが 2 つの \relative ブロックを生成し、それぞれが暗黙的に Staff ブロックと Voice を作成するため、2 番目の譜は右にずれています。

\repeat unfold 2 {
  \relative c' { c4 d e f }
}

[image of music]

明示的に Voice をインスタンス化することで、この問題は修正されます:

\new Voice {
  \repeat unfold 2 {
    \relative c' { c4 d e f }
  }
}

[image of music]


見かけ上 ../ly/init.ly のエラーとなる

入力ファイルが正しく構成されていないと、‘../ly/init.ly’ に構文エラーがあるという様々な原因のはっきりしないエラー メッセージが表示されます。例えば、括弧やクォート記号の数が一致していない場合にこのようなエラーが発生します。

最も一般的なエラーは score ブロックの終わりに括弧が見当たらない (missing brace, (})) というエラーです。この場合の解決方法は明らかです: score ブロックが正しく閉じられているかチェックしてください。入力ファイルの正しい構造は LilyPond 入力ファイルの仕組み で記述されています。括弧の一致を自動的にハイライトするエディタを使うと、そのようなエラーを防ぐのに役立ちます。

次に一般的なエラーの原因は、歌詞ブロックの最後の音節と閉じ括弧 (}) の間に空白が無いために発生します。空白が無ければ、この閉じ括弧は音節の一部と見なされます。常に すべての 括弧の前後に空白を入れることをお勧めします。歌詞を用いる場合にこのことが重要になります。 Entering lyrics を参照してください。


エラー メッセージ Unbound variable %

Scheme 形式のコメントではなく LilyPond 形式のコメントを持つ Scheme ルーチンが呼び出されると、コンソール出力やログ ファイルの最後にエラー メッセージ “Unbound variable %” が “GUILE signalled an error ...” と共に表示されます。

LilyPond 形式のコメントはパーセント記号 (%) で始まり、Scheme ルーチンの中で使うことはできません。Scheme 形式のコメントはセミコロン (;) で始まります。


エラー メッセージ FT_Get_Glyph_Name

入力ファイルが非 ASCII キャラクタを保持していて、UTF-8 エンコードで保存されていない場合、このエラー メッセージがコンソール出力やログ ファイルに表示されます。詳細は、 Text encoding を参照してください。


警告 – Warning staff affinities should only decrease

この警告は、譜刻された出力の中に譜が無い場合に表示されます。例えば、リード譜に ChordName コンテキストと Lyrics コンテキストしか無い場合です。この警告は、入力の始めに以下を挿入することで譜として振舞うコンテキストを作ることで回避できます:

\override VerticalAxisGroup #'staff-affinity = ##f

詳細は Flexible vertical spacing within systems の中の “Spacing of non-staff lines” を参照してください。


2. convert-ly を使ってファイルを更新する

LilyPond の入力構文は、さまざまな方法で単純化または改善するために、定期的に変更されます。その副作用として、LilyPond のインタプリタはしばしば古い入力ファイルと互換性を持たなくなります。これを救済するために、プログラム convert-ly を用いることで、たいていの LilyPond のバージョン間での構文変更を処理することができます。


2.1 何故構文は変更されるのか?

LilyPond の入力構文はしばしば変更されます。LilyPond 自体が改良されるため、構文 (入力言語) もそれに合わせて変更されます。変更の目的は、入力ファイルを読みやすく、書きやすくするためであったり、LilyPond に新しい機能を持たせるためであったりします。

例えば、\paper\layout のプロパティ名は first-second-third という形式で記述することになっています。しかしながら、バージョン 2.11.60 で printallheaders プロパティがこの規則に従っていないことが判明しました。放置すべきでしょうか? (新しいユーザはつじつまの合わない入力形式で混乱するでしょう。) それとも、変更すべきでしょうか? (既存の楽譜を持つユーザには煩わしいことです。) このケースでは、プロパティ名を print-all-headers に変更することを決断しました。幸運なことに、この変更は convert-ly ツールで自動的に変換することができます。

不幸なことに、convert-ly はすべての変更を処理できるわけではありません。例えば、バージョン 2.4 以前の LilyPond では、アクセント文字と非英語文字を LaTeX を用いて入力していました – Christmas のフランス語は No\"el のように入力されていました。しかしながら、バージョン 2.6 以降の LilyPond では、特殊文字 ë を UTF-8 文字として直接 LilyPond ファイルに入力することになりました。convert-ly はすべての LaTeX の特殊文字を UTF-8 文字に変換することはできません。手動で古い LilyPond 入力ファイルを更新する必要があります。


2.2 convert-ly を呼び出す

convert-ly は古いバージョン番号を検出するために入力ファイルの version ステートメントを使用します。たいていの場合、あなたの入力ファイルを更新するには、そのファイルを保持しているディレクトリで以下を実行することで十分です:

convert-ly -e myfile.ly

これにより、myfile.ly は更新され、オリジナル ファイルは myfile.ly~ に保存されます。

Note: convert-ly のバージョンは、それが扱う最新の構文変更に合わせて変更されます。このため、入力ファイルの version 番号はたいていconvert-ly のバージョンよりも低いことになります。

ディレクトリの中にある入力ファイルをすべて変換するには、以下のようにします:

convert-ly -e *.ly

オリジナル ファイルをそのまま残しておき、 更新されたファイルに新しいファイル名を指定するには以下のようにします:

convert-ly myfile.ly > mynewfile.ly

このプログラムは変換元のバージョン番号をリストアップします。 バージョン番号がリストアップされない場合、そのファイルは最新であるということになります。

MacOS X ユーザはこのコマンドをメニュー エントリ (Compile > Update syntax) 下で実行することになるかもしれません。

Windows ユーザはこれらのコマンドを ‘コマンド プロンプト’ ウィンドウから実行する必要があります。コマンド プロンプトは通常、スタート > アクセサリ > コマンド プロンプト で見つかります。


2.3 convert-ly のコマンド ライン オプション

一般に、このプログラムは以下のように呼び出されます:

convert-ly [option]… filename

以下のオプションを与えることができます:

-e,--edit

Apply the conversions direct to the input file, modifying it in-place.

-f,--from=from-patchlevel

変換元のバージョンをセットします。これがセットされていない場合、convert-ly は入力ファイルの中にある version 文字列を基に推測します。例: --from=2.10.25

-n,--no-version

通常、convert-ly\version インジケータを出力に付け加えます。このオプションを指定すると、それを抑制します。

-s, --show-rules

すべての変換を表示して、終了します。

--to=to-patchlevel

変換先のバージョンをセットします。デフォルトは利用可能な最新バージョンです。例: --to=2.12.2

-h, --help

使用方法についてのヘルプを表示します。

texinfo ファイルの中にある LilyPond 断片を更新するには以下を使用してください:

convert-ly --from=... --to=... --no-version *.itely

2 つのバージョン間での LilyPond 構文の変更を調べるには、以下を使用してください:

convert-ly --from=... --to=... -s

2.4 convert-ly の問題点

Windows の ‘コマンド プロンプト’ ウィンドウからスペースを含むファイル名やパスを持つファイルに対してconvert-ly を実行する場合、入力ファイル名全体を 3 つ (!) のダブル クォートで囲む必要があります:

convert-ly """D:/My Scores/Ode.ly""" > "D:/My Scores/new Ode.ly"

convert-ly -e *.ly コマンドが展開時に長くなりすぎて失敗する場合、convert-ly コマンドをループさせてやります。以下の例は UNIX 用であり、カレント ディレクトリの中にあるすべての .ly ファイルを更新します:

for f in *.ly; do convert-ly -e $f; done;

Windows の ‘コマンド プロンプト’ ウィンドウでの上の例に対応するコマンドは以下の通りです:

for %x in (*.ly) do convert-ly -e """%x"""

言語の変更がすべて処理されるわけではありません。指定できる出力オプションは 1 つだけです。自動的に Scheme と更新することと LilyPond の Scheme インタフェイスを更新することはまったく異なります。Scheme コードの調整は手動で行う覚悟でいてください。


2.5 手動変換

理論的には、convert-ly のようなプログラムはすべての構文変更を処理できます。 After all, a computer program interprets the old version and the new version, so another computer program can translate one file into another2.

しかしながら、LilyPond プロジェクトの資源には限りがあり、すべての変換を自動化することはできません。以下は既知の問題のリストです。

1.6->2.0:
 Doesn't always convert figured bass correctly, specifically things like {<
>}.  Mats' comment on working around this:
   To be able to run convert-ly
   on it, I first replaced all occurrences of '{<' to some dummy like '{#'
   and similarly I replaced '>}' with '&}'.  After the conversion, I could
   then change back from '{ #' to '{ <' and from '& }' to '> }'.
 Doesn't convert all text markup correctly.  In the old markup syntax,
 it was possible to group a number of markup commands together within
parentheses, e.g.
   -#'((bold italic) "string")
   This will incorrectly be converted into
   -\markup{{\bold italic} "string"}
   instead of the correct
   -\markup{\bold \italic "string"}
2.0->2.2:
 Doesn't handle \partcombine
 Doesn't do \addlyrics => \lyricsto, this breaks some scores with multiple
stanzas.
2.0->2.4:
 \magnify isn't changed to \fontsize.
    - \magnify #m => \fontsize #f, where f = 6ln(m)/ln(2)
 remove-tag isn't changed.
    - \applyMusic #(remove-tag '. . .) => \keepWithTag #'. . .
 first-page-number isn't changed.
    - first-page-number no => print-first-page-number = ##f
 Line breaks in header strings aren't converted.
    - \\\\  as line break in \header strings => \markup \center-align <
      "First Line" "Second Line" >
 Crescendo and decrescendo terminators aren't converted.
    - \rced => \!
    - \rc => \!
2.2->2.4:
 \turnOff (used in \set Staff.VoltaBracket = \turnOff) is not properly
converted.
2.4.2->2.5.9
 \markup{ \center-align <{ ... }> } should be converted to:
 \markup{ \center-align {\line { ... }} }
 but now, \line is missing.
2.4->2.6
 Special LaTeX characters such as $~$ in text are not converted to UTF8.
2.8
 \score{} must now begin with a music expression.  Anything else
 (particularly \header{}) must come after the music.

3. lilypond-book: Integrating text and music

If you want to add pictures of music to a document, you can simply do it the way you would do with other types of pictures. The pictures are created separately, yielding PostScript output or PNG images, and those are included into a LaTeX or HTML document.

lilypond-book provides a way to automate this process: This program extracts snippets of music from your document, runs lilypond on them, and outputs the document with pictures substituted for the music. The line width and font size definitions for the music are adjusted to match the layout of your document.

This is a separate program from lilypond itself, and is run on the command line; for more information, see コマンド ラインの使用方法. If you have MacOS 10.3 or 10.4 and you have trouble running lilypond-book, see FIXME FIXME

This procedure may be applied to LaTeX, HTML, Texinfo or DocBook documents.


3.1 An example of a musicological document

Some texts contain music examples. These texts are musicological treatises, songbooks, or manuals like this. Such texts can be made by hand, simply by importing a PostScript figure into the word processor. However, there is an automated procedure to reduce the amount of work involved in HTML, LaTeX, Texinfo and DocBook documents.

A script called lilypond-book will extract the music fragments, format them, and put back the resulting notation. Here we show a small example for use with LaTeX. The example also contains explanatory text, so we will not comment on it further.

Input

\documentclass[a4paper]{article}

\begin{document}

Documents for \verb+lilypond-book+ may freely mix music and text.
For example,

\begin{lilypond}
\relative c' {
  c2 e2 \times 2/3 { f8 a b } a2 e4
}
\end{lilypond}

Options are put in brackets.

\begin{lilypond}[fragment,quote,staffsize=26,verbatim]
  c'4 f16
\end{lilypond}

Larger examples can be put into a separate file, and introduced with
\verb+\lilypondfile+.

\lilypondfile[quote,noindent]{screech-boink.ly}

(If needed, replace screech-boink.ly by any .ly file you put in the same
directory as this file.)

\end{document}

Processing

Save the code above to a file called ‘lilybook.lytex’, then in a terminal run

lilypond-book --output=out --pdf lilybook.lytex
lilypond-book (GNU LilyPond) 2.14.2 
Reading lilybook.lytex...
..lots of stuff deleted..
Compiling lilybook.tex...
cd out
pdflatex lilybook
..lots of stuff deleted..
xpdf lilybook
(replace xpdf by your favorite PDF viewer)

Running lilypond-book and latex creates a lot of temporary files, which would clutter up the working directory. To remedy this, use the --output=dir option. It will create the files in a separate subdirectory ‘dir’.

Finally the result of the LaTeX example shown above.3 This finishes the tutorial section.

Output

Documents for lilypond-book may freely mix music and text. For example,

[image of music]

Options are put in brackets.

c'4 f16

[image of music]

Larger examples can be put into a separate file, and introduced with \lilypondfile.

[image of music]


3.2 Integrating music and text

Here we explain how to integrate LilyPond with various output formats.


3.2.1 LaTeX

LaTeX is the de-facto standard for publishing layouts in the exact sciences. It is built on top of the TeX typesetting engine, providing the best typography available anywhere.

See The Not So Short Introduction to LaTeX for an overview on how to use LaTeX.

Music is entered using

\begin{lilypond}[options,go,here]
  YOUR LILYPOND CODE
\end{lilypond}

or

\lilypondfile[options,go,here]{filename}

or

\lilypond{ YOUR LILYPOND CODE }

Additionally, \lilypondversion displays the current version of lilypond. Running lilypond-book yields a file that can be further processed with LaTeX.

We show some examples here. The lilypond environment

\begin{lilypond}[quote,fragment,staffsize=26]
  c' d' e' f' g'2 g'2
\end{lilypond}

produces

[image of music]

The short version

\lilypond[quote,fragment,staffsize=11]{<c' e' g'>}

produces

[image of music]

Currently, you cannot include { or } within \lilypond{}, so this command is only useful with the fragment option.

The default line width of the music will be adjusted by examining the commands in the document preamble, the part of the document before \begin{document}. The lilypond-book command sends these to LaTeX to find out how wide the text is. The line width for the music fragments is then adjusted to the text width. Note that this heuristic algorithm can fail easily; in such cases it is necessary to use the line-width music fragment option.

Each snippet will call the following macros if they have been defined by the user:

Selected Snippets

Sometimes it is useful to display music elements (such as ties and slurs) as if they continued after the end of the fragment. This can be done by breaking the staff and suppressing inclusion of the rest of the LilyPond output.

In LaTeX, define \betweenLilyPondSystem in such a way that inclusion of other systems is terminated once the required number of systems are included. Since \betweenLilyPondSystem is first called after the first system, including only the first system is trivial.

\def\betweenLilyPondSystem#1{\endinput}

\begin{lilypond}[fragment]
  c'1\( e'( c'~ \break c' d) e f\)
\end{lilypond}

If a greater number of systems is requested, a TeX conditional must be used before the \endinput. In this example, replace ‘2’ by the number of systems you want in the output,

\def\betweenLilyPondSystem#1{
    \ifnum##1<2\else\endinput\fi
}

Remember that the definition of \betweenLilyPondSystem is effective until TeX quits the current group (such as the LaTeX environment) or is overridden by another definition (which is, in most cases, for the rest of the document). To reset your definition, write

\let\betweenLilyPondSystem\undefined

in your LaTeX source.

This may be simplified by defining a TeX macro

\def\onlyFirstNSystems#1{
    \def\betweenLilyPondSystem##1{\ifnum##1<#1\else\endinput\fi}
}

and then saying only how many systems you want before each fragment,

\onlyFirstNSystems{3}
\begin{lilypond}...\end{lilypond}
\onlyFirstNSystems{1}
\begin{lilypond}...\end{lilypond}

参照

There are specific lilypond-book command line options and other details to know when processing LaTeX documents, see Invoking lilypond-book.


3.2.2 Texinfo

Texinfo is the standard format for documentation of the GNU project. An example of a Texinfo document is this manual. The HTML, PDF, and Info versions of the manual are made from the Texinfo document.

In the input file, music is specified with

@lilypond[options,go,here]
  YOUR LILYPOND CODE
@end lilypond

or

@lilypond[options,go,here]{ YOUR LILYPOND CODE }

or

@lilypondfile[options,go,here]{filename}

Additionally, @lilypondversion displays the current version of lilypond.

When lilypond-book is run on it, this results in a Texinfo file (with extension ‘.texi’) containing @image tags for HTML, Info and printed output. lilypond-book generates images of the music in EPS and PDF formats for use in the printed output, and in PNG format for use in HTML and Info output.

We show two simple examples here. A lilypond environment

@lilypond[fragment]
c' d' e' f' g'2 g'
@end lilypond

produces

[image of music]

The short version

@lilypond[fragment,staffsize=11]{<c' e' g'>}

produces

[image of music]

Contrary to LaTeX, @lilypond{...} does not generate an in-line image. It always gets a paragraph of its own.


3.2.3 HTML

Music is entered using

<lilypond fragment relative=2>
\key c \minor c4 es g2
</lilypond>

lilypond-book then produces an HTML file with appropriate image tags for the music fragments:

[image of music]

For inline pictures, use <lilypond ... />, where the options are separated by a colon from the music, for example

Some music in <lilypond relative=2: a b c/> a line of text.

To include separate files, say

<lilypondfile option1 option2 ...>filename</lilypondfile>

Additionally, <lilypondversion/> displays the current version of lilypond.


3.2.4 DocBook

For inserting LilyPond snippets it is good to keep the conformity of our DocBook document, thus allowing us to use DocBook editors, validation etc. So we don’t use custom tags, only specify a convention based on the standard DocBook elements.

Common conventions

For inserting all type of snippets we use the mediaobject and inlinemediaobject element, so our snippets can be formatted inline or not inline. The snippet formatting options are always provided in the role property of the innermost element (see in next sections). Tags are chosen to allow DocBook editors format the content gracefully. The DocBook files to be processed with lilypond-book should have the extension ‘.lyxml’.

Including a LilyPond file

This is the most simple case. We must use the ‘.ly’ extension for the included file, and insert it as a standard imageobject, with the following structure:

<mediaobject>
  <imageobject>
    <imagedata fileref="music1.ly" role="printfilename" />
  </imageobject>
</mediaobject>

Note that you can use mediaobject or inlinemediaobject as the outermost element as you wish.

Including LilyPond code

Including LilyPond code is possible by using a programlisting, where the language is set to lilypond with the following structure:

<inlinemediaobject>
  <textobject>
    <programlisting language="lilypond" role="fragment verbatim staffsize=16 ragged-right relative=2">
\context Staff \with {
  \remove Time_signature_engraver
  \remove Clef_engraver}
  { c4( fis) }
    </programlisting>
  </textobject>
</inlinemediaobject>

As you can see, the outermost element is a mediaobject or inlinemediaobject, and there is a textobject containing the programlisting inside.

Processing the DocBook document

Running lilypond-book on our ‘.lyxml’ file will create a valid DocBook document to be further processed with ‘.xml’ extension. If you use dblatex, it will create a PDF file from this document automatically. For HTML (HTML Help, JavaHelp etc.) generation you can use the official DocBook XSL stylesheets, however, it is possible that you have to make some customization for it.


3.3 Music fragment options

In the following, a ‘LilyPond command’ refers to any command described in the previous sections which is handled by lilypond-book to produce a music snippet. For simplicity, LilyPond commands are only shown in LaTeX syntax.

Note that the option string is parsed from left to right; if an option occurs multiple times, the last one is taken.

The following options are available for LilyPond commands:

staffsize=ht

Set staff size to ht, which is measured in points.

ragged-right

Produce ragged-right lines with natural spacing, i.e., ragged-right = ##t is added to the LilyPond snippet. This is the default for the \lilypond{} command if no line-width option is present. It is also the default for the lilypond environment if the fragment option is set, and no line width is explicitly specified.

noragged-right

For single-line snippets, allow the staff length to be stretched to equal that of the line width, i.e., ragged-right = ##f is added to the LilyPond snippet.

line-width
line-width=size\unit

Set line width to size, using unit as units. unit is one of the following strings: cm, mm, in, or pt. This option affects LilyPond output (this is, the staff length of the music snippet), not the text layout.

If used without an argument, set line width to a default value (as computed with a heuristic algorithm).

If no line-width option is given, lilypond-book tries to guess a default for lilypond environments which don’t use the ragged-right option.

notime

Do not print the time signature, and turns off the timing (time signature, bar lines) in the score.

fragment

Make lilypond-book add some boilerplate code so that you can simply enter, say,

c'4

without \layout, \score, etc.

nofragment

Do not add additional code to complete LilyPond code in music snippets. Since this is the default, nofragment is redundant normally.

indent=size\unit

Set indentation of the first music system to size, using unit as units. unit is one of the following strings: cm, mm, in, or pt. This option affects LilyPond, not the text layout.

noindent

Set indentation of the first music system to zero. This option affects LilyPond, not the text layout. Since no indentation is the default, noindent is redundant normally.

quote

Reduce line length of a music snippet by 2*0.4in and put the output into a quotation block. The value ‘0.4in’ can be controlled with the exampleindent option.

exampleindent

Set the amount by which the quote option indents a music snippet.

relative
relative=n

Use relative octave mode. By default, notes are specified relative to middle C. The optional integer argument specifies the octave of the starting note, where the default 1 is middle C. relative option only works when fragment option is set, so fragment is automatically implied by relative, regardless of the presence of any (no)fragment option in the source.

LilyPond also uses lilypond-book to produce its own documentation. To do that, some more obscure music fragment options are available.

verbatim

The argument of a LilyPond command is copied to the output file and enclosed in a verbatim block, followed by any text given with the intertext option (not implemented yet); then the actual music is displayed. This option does not work well with \lilypond{} if it is part of a paragraph.

If verbatim is used in a lilypondfile command, it is possible to enclose verbatim only a part of the source file. If the source file contain a comment containing ‘begin verbatim’ (without quotes), quoting the source in the verbatim block will start after the last occurrence of such a comment; similarly, quoting the source verbatim will stop just before the first occurrence of a comment containing ‘end verbatim’, if there is any. In the following source file example, the music will be interpreted in relative mode, but the verbatim quote will not show the relative block, i.e.

\relative c' { % begin verbatim
  c4 e2 g4
  f2 e % end verbatim
}

will be printed with a verbatim block like

  c4 e2 g4
  f2 e

If you would like to translate comments and variable names in verbatim output but not in the sources, you may set the environment variable LYDOC_LOCALEDIR to a directory path; the directory should contain a tree of ‘.mo’ message catalogs with lilypond-doc as a domain.

addversion

(Only for Texinfo output.) Prepend line \version @w{"@version{}"} to verbatim output.

texidoc

(Only for Texinfo output.) If lilypond is called with the ‘--header=texidoc’ option, and the file to be processed is called ‘foo.ly’, it creates a file ‘foo.texidoc’ if there is a texidoc field in the \header. The texidoc option makes lilypond-book include such files, adding its contents as a documentation block right before the music snippet.

Assuming the file ‘foo.ly’ contains

\header {
  texidoc = "This file demonstrates a single note."
}
{ c'4 }

and we have this in our Texinfo document ‘test.texinfo

@lilypondfile[texidoc]{foo.ly}

the following command line gives the expected result

lilypond-book --pdf --process="lilypond \
  -dbackend=eps --header=texidoc" test.texinfo

Most LilyPond test documents (in the ‘input’ directory of the distribution) are small ‘.ly’ files which look exactly like this.

For localization purpose, if the Texinfo document contains @documentlanguage LANG and ‘foo.ly’ header contains a texidocLANG field, and if lilypond is called with ‘--header=texidocLANG’, then ‘foo.texidocLANG’ will be included instead of ‘foo.texidoc’.

lilyquote

(Only for Texinfo output.) This option is similar to quote, but only the music snippet (and the optional verbatim block implied by verbatim option) is put into a quotation block. This option is useful if you want to quote the music snippet but not the texidoc documentation block.

doctitle

(Only for Texinfo output.) This option works similarly to texidoc option: if lilypond is called with the ‘--header=doctitle’ option, and the file to be processed is called ‘foo.ly’ and contains a doctitle field in the \header, it creates a file ‘foo.doctitle’. When doctitle option is used, the contents of ‘foo.doctitle’, which should be a single line of text, is inserted in the Texinfo document as @lydoctitle text. @lydoctitle should be a macro defined in the Texinfo document. The same remark about texidoc processing with localized languages also applies to doctitle.

nogettext

(Only for Texinfo output.) Do not translate comments and variable names in the snippet quoted verbatim.

printfilename

If a LilyPond input file is included with \lilypondfile, print the file name right before the music snippet. For HTML output, this is a link. Only the base name of the file is printed, i.e. the directory part of the file path is stripped.


3.4 Invoking lilypond-book

lilypond-book produces a file with one of the following extensions: ‘.tex’, ‘.texi’, ‘.html’ or ‘.xml’, depending on the output format. All of ‘.tex’, ‘.texi’ and ‘.xml’ files need further processing.

Format-specific instructions

LaTeX

There are two ways of processing your LaTeX document for printing or publishing: getting a PDF file directly with PDFLaTeX, or getting a PostScript file with LaTeX via a DVI to PostScript translator like dvips. The first way is simpler and recommended4, and whichever way you use, you can easily convert between PostScript and PDF with tools, like ps2pdf and pdf2ps included in Ghostscript package.

To produce a PDF file through PDFLaTeX, use

lilypond-book --pdf yourfile.pdftex
pdflatex yourfile.tex

To produce PDF output via LaTeX/dvips/ps2pdf, you should do

lilypond-book yourfile.lytex
latex yourfile.tex
dvips -Ppdf yourfile.dvi
ps2pdf yourfile.ps

The ‘.dvi’ file created by this process will not contain note heads. This is normal; if you follow the instructions, they will be included in the ‘.ps’ and ‘.pdf’ files.

Running dvips may produce some warnings about fonts; these are harmless and may be ignored. If you are running latex in twocolumn mode, remember to add -t landscape to the dvips options.

Texinfo

To produce a Texinfo document (in any output format), follow the normal procedures for Texinfo; this is, either call texi2pdf or texi2dvi or makeinfo, depending on the output format you want to create. See the documentation of Texinfo for further details.

Command line options

lilypond-book accepts the following command line options:

-f format
--format=format

Specify the document type to process: html, latex, texi (the default) or docbook. If this option is missing, lilypond-book tries to detect the format automatically, see Filename extensions. Currently, texi is the same as texi-html.

-F filter
--filter=filter

Pipe snippets through filter. lilypond-book will not –filter and –process at the same time. For example,

lilypond-book --filter='convert-ly --from=2.0.0 -' my-book.tely
-h
--help

Print a short help message.

-I dir
--include=dir

Add dir to the include path. lilypond-book also looks for already compiled snippets in the include path, and does not write them back to the output directory, so in some cases it is necessary to invoke further processing commands such as makeinfo or latex with the same -I dir options.

-o dir
--output=dir

Place generated files in directory dir. Running lilypond-book generates lots of small files that LilyPond will process. To avoid all that garbage in the source directory, use the ‘--output’ command line option, and change to that directory before running latex or makeinfo.

lilypond-book --output=out yourfile.lytex
cd out
...
--skip-lily-check

Do not fail if no lilypond output is found. It is used for LilyPond Info documentation without images.

--skip-png-check

Do not fail if no PNG images are found for EPS files. It is used for LilyPond Info documentation without images.

--lily-output-dir=dir

Write lily-XXX files to directory dir, link into --output directory. Use this option to save building time for documents in different directories which share a lot of identical snippets.

--info-images-dir=dir

Format Texinfo output so that Info will look for images of music in dir.

--latex-program=prog

Run executable prog instead of latex. This is useful if your document is processed with xelatex, for example.

--left-padding=amount

Pad EPS boxes by this much. amount is measured in millimeters, and is 3.0 by default. This option should be used if the lines of music stick out of the right margin.

The width of a tightly clipped system can vary, due to notation elements that stick into the left margin, such as bar numbers and instrument names. This option will shorten each line and move each line to the right by the same amount.

-P command
--process=command

Process LilyPond snippets using command. The default command is lilypond. lilypond-book will not --filter and --process at the same time.

--pdf

Create PDF files for use with PDFLaTeX.

-V
--verbose

Be verbose.

-v
--version

Print version information.

既知の問題と警告

The Texinfo command @pagesizes is not interpreted. Similarly, LaTeX commands that change margins and line widths after the preamble are ignored.

Only the first \score of a LilyPond block is processed.


3.5 Filename extensions

You can use any filename extension for the input file, but if you do not use the recommended extension for a particular format you may need to manually specify the output format; for details, see Invoking lilypond-book. Otherwise, lilypond-book automatically selects the output format based on the input filename’s extension.

extension

output format

.html

HTML

.itely

Texinfo

.latex

LaTeX

.lytex

LaTeX

.lyxml

DocBook

.tely

Texinfo

.tex

LaTeX

.texi

Texinfo

.texinfo

Texinfo

.xml

HTML

If you use the same filename extension for the input file than the extension lilypond-book uses for the output file, and if the input file is in the same directory as lilypond-book working directory, you must use --output option to make lilypond-book running, otherwise it will exit with an error message like “Output would overwrite input file”.


3.6 Alternative methods of mixing text and music

This section shows methods to integrate text and music, different than the automated method with lilypond-book.


Many quotes from a large score

If you need to quote many fragments from a large score, you can also use the clip systems feature, see Extracting fragments of music.


Inserting LilyPond output into OpenOffice.org

LilyPond notation can be added to OpenOffice.org with OOoLilyPond.


Inserting LilyPond output into other programs

To insert LilyPond output in other programs, use lilypond instead of lilypond-book. Each example must be created individually and added to the document; consult the documentation for that program. Most programs will be able to insert LilyPond output in ‘PNG’, ‘EPS’, or ‘PDF’ formats.

To reduce the white space around your LilyPond score, use the following options

\paper{
  indent=0\mm
  line-width=120\mm
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  bookTitleMarkup = ##f
  scoreTitleMarkup = ##f
}

{ c1 }

To produce a useful ‘EPS’ file, use

lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts   myfile.ly

‘PNG’:
lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --png myfile.ly

4. 外部プログラム

LilyPond は様々な方法で他のプログラムと連携することができます。


4.1 ポイント&クリック

ポイント&クリックは PDF ビューアの中で表記をクリックすることで入力の中の表記を見つけ出すことを可能にします。これは楽譜の中でエラーを引き起こす入力を見つけ出すことより容易にします。

この機能がアクティブな場合、LilyPond は PDF ファイルにハイパーリンクを付け加えます。これらのハイパーリンクは Web ブラウザに送られ、Web ブラウザはカーソルを持つテキスト エディタを適切な位置に開きます。

この一連の動作を有効にするには、PDF ビューアが LilyPond で提供される ‘lilypond-invoke-editor’ スクリプトを使ってハイパーリンクを追うように設定変更する必要があります。

UNIX の Xpdf では、‘xpdfrc5 の中に以下の記述が必要です:

urlCommand     "lilypond-invoke-editor %s"

プログラム ‘lilypond-invoke-editor’ は小さな支援プログラムです。これは特別な textedit URI に対してエディタを呼び出し、それ以外に対しては Web ブラウザを呼び出します。このプログラムは環境変数 EDITOR を調べて、以下のパターンに動作します:

emacs

このプログラムは以下を呼び出します

emacsclient --no-wait +line:column file
gvim

このプログラムは以下を呼び出します

gvim --remote +:line:normcolumn file
nedit

このプログラムは以下を呼び出します

  nc -noask +line file'

環境変数 LYEDITOR はこの動作をオーバライドするために使用されます。これにはエディタを起動するためのコマンド ラインを保持し、%(column)s, %(line)s はそれぞれファイル、列、行に置き換えられます。 以下の LYEDITOR 設定は標準の emacsclient 呼び出しと等価です。

emacsclient --no-wait +%(line)s:%(column)s %(file)s

ポイント&クリックのリンクは出力ファイルを肥大化させます。PDF ファイルと PS ファイルのサイズを小さくするには、‘.ly’ ファイルの中に以下を記述してポイント&クリックを OFF にします:

\pointAndClickOff

以下を用いて、ポイント&クリックを明示的に ON にすることができます:

\pointAndClickOn

.ly’ ファイルの中でポイント&クリックを OFF にする代わりにコマンド ライン オプションで OFF にすることができます:

lilypond -dno-point-and-click file.ly

Note: 配布する LilyPond ファイルでは常にポイント&クリックを OFF にして、.pdf ファイルにあなたのコンピュータの Path 情報が含まれないようにすべきです。配布する .pdf ファイルに Path 情報が含まれているとセキュリティ リスクとなります。


4.2 テキスト エディタ サポート

いくつかのテキスト エディタの LilyPond サポート機能があります。


Emacs モード

Emacs は ‘lilypond-mode’ を持ちます。これはキーワード自動補完、インデント挿入、LilyPond 特有の括弧一致、構文カラーリング、コンパイルへのショートカット、それに Info を用いての LilyPond マニュアル参照といった機能を持ちます。‘lilypond-mode’ があなたのプラットフォームにインストールされていないのであれば、以下を参照してください。

楽譜を記述して、LilyPond を実行するための Emacs モードは ‘elisp’ ディレクトリの中にあるソース アーカイブに保持されています。make install を実行して、これを elispdir にインストールします。ファイル ‘lilypond-init.el’ を load-path/sites-start.d/’ に配置するか、‘~/.emacs’ または ‘~/.emacs.el’ に追記する必要があります。

~/.emacs’ に以下の行を追記 (あるいは修正) して、ソース パス (例えば ‘~/site-lisp/) を load-path に追加した方が良いかもしれません。

(setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))

Vim モード

Vim のために LilyPond 用のファイルタイプ プラグイン、インデント モード、それに構文ハイライト モードが用意されています。これらの機能をすべて有効にするには、‘$HOME/.vimrc’ が以下の 3 行を順序に従って保持するよう追記 (あるいは修正) します:

filetype off
set runtimepath+=/usr/local/share/lilypond/current/vim/
filetype on

LilyPond が ‘/usr/local’ にインストールされていない場合はパスを適切に変更してください。このトピックは その他の情報源 で議論されています。


その他のエディタ

他にも LilyPond をサポートするエディタ (テキスト ベースとグラフィカル ベースの両方) がありますが、それらの特殊な設定ファイルは LilyPond では配布されません。更なる情報はそれらのエディタのドキュメントを参照してください。LilyPond をサポートするエディタは より簡単な編集手段 でリストアップされています。


4.3 他のフォーマットから変換する

楽譜の記述を他のフォーマットからインポートするもできます。この章では、配布プログラムに含まれるインポート ツールについて説明します。 LilyPond 入力を作り出すツールは他にもあります。例えば GUI シーケンスと XML コンバータです。詳細は website を参照してください。

上で述べたツールは lilypond とは別のプログラムであり、コマンド ラインで実行します。詳細は コマンド ラインの使用方法 を参照してください。あなたが MacOS 10.3 や 10.4 を使っていて、これらのスクリプト (例えば convert-ly) を実行する際に問題が発生した場合は、 MacOS X を参照してください。

既知の問題と警告

残念なことに我々にはこれらのプログラムを維持していくだけの余力はありません。“これからの課題” になっていると考えてください。パッチは適用されていますが、バグ レポートはほとんど解決されていません。


4.3.1 midi2ly を呼び出す

midi2ly は Type 1 MIDI ファイルを LilyPond ソース ファイルに変換します。

MIDI (Music Instrument Digital Interface) は電子楽器の標準です: これはケーブル、シリアル プロトコル、それにファイル フォーマットを指定します。MIDI ファイル フォーマットは音楽を他のプログラムにエクスポートするためのデファクトスタンダードなフォーマットです。そのため、MIDI ファイルを扱う機能を持つことは、独自フォーマットを MIDI に変換できるプログラムのファイルをインポートする際に有用です。

midi2ly はトラックを Staff コンテキストに変換し、チャネルを Voice コンテキストに変換します。ピッチには相対モードが使用され、演奏時間は必要がある場合にだけ記述されます。

デジタル キーボードを使って MIDI ファイルを録音し、それを ‘.ly’ ファイルに変換することが可能です。しかしながら、人間の演奏者のリズムは LilyPond コンバータにかけられる MIDI を作り出せるほど正確ではありません。量子化オプション (-s-d オプション) を指定して midi2ly を呼び出すと、リズムの誤りを訂正しようとしますが、十分機能するとは言えません。このため、人間の演奏で生成された MIDI ファイルを midi2ly で変換することはお勧めできません。

midi2ly は以下のようにコマンド ラインから呼び出します:

midi2ly [option]… midi-file

‘コマンド ライン’ とは、OS のコマンド ラインを意味しているということに注意してください。このことについての更なる情報は 他のフォーマットから変換する を参照してください。

midi2ly には以下のオプションがあります。

-a, --absolute-pitches

絶対ピッチで出力します。

-d, --duration-quant=DUR

音符の演奏時間を DUR で量子化します。

-e, --explicit-durations

すべての音符の演奏時間を出力します。

-h,--help

使用方法の要約を表示します。

-k, --key=acc[:minor]

デフォルトの調をセットします。acc > 0 はシャープの数をセットし、acc < 0 はフラットの数をセットします。短調は :1 で指定します。

-o, --output=file

file に出力します。

-s, --start-quant=DUR

音符の始まりを DUR で量子化します。

-t, --allow-tuplet=DUR*NUM/DEN

連符の演奏時間 DUR*NUM/DEN を許可します。

-v, --verbose

Verbose モード (ログ等が詳細) で実行します。

-V, --version

バージョン番号を表示します。

-w, --warranty

保証と著作権を表示します。

-x, --text-lyrics

すべてのテキストを歌詞として扱います。

既知の問題と警告

アルペジオでの音符のオーバラップは正しく変換されません。最初の音符は読み込まれますが、他の音符は無視されます。すべての音符を同時に開始させ、同じ演奏にして、フレーズ記号かペダル指示記号を追加してください。


4.3.2 musicxml2ly を呼び出す

MusicXML は音楽記譜を表すための XML の派生語です。

musicxml2ly は Part-wise (時間軸優先ではなくパート優先の) MusicXML から、音符、アーティキュレーション、楽譜構造、歌詞等を抽出し、それらを ‘.ly’ ファイルに記述します。

このプログラムはコマンド ラインから以下のように呼び出します:

musicxml2ly [option]… xml-file

‘コマンド ライン’ とは、OS のコマンド ラインを意味しているということに注意してください。このことについての更なる情報は 他のフォーマットから変換する を参照してください。

ファイル名に ‘-’ を指定すると、musicxml2ly はコマンド ラインから入力を受け付けます。

musicxml2ly には以下のオプションがあります。

-a, --absolute

絶対ピッチで出力します。

-h,--help

使用方法の要約を表示します。

-l, --language=LANG

ピッチ名に LANG を使用します。例えば、ピッチ名にドイツ語を使用するには 'deutsch' を指定します。

--lxml

XML 解析に lxml.etree Python パッケージを使用します。これはより少ないメモリと CPU 時間で実行されます。

--nd --no-articulation-directions

アーティキュレーションや強弱等の指示 (^, _ あるいは -) を変換しません。

--no-beaming

連桁情報を変換せず、LilyPond の自動連桁機能を使用します。

-o,--output=file

出力ファイル名を file とします。file に ‘-’ を指定すると、出力は stdout に表示されます。指定が無い場合、出力は xml-file.ly’ となります。

-r,--relative

ピッチを相対モードに変換します。(デフォルト)

-v,--verbose

Verbose モード (ログ等が詳細) で実行します。

--version

バージョン情報を表示します。

-z,--compressed

入力ファイルが ZIP で圧縮された MusicXML ファイルであることを示します。


4.3.3 abc2ly を呼び出す

Note: このプログラムはサポートされていません。LilyPond 将来のバージョンからは削除される可能性があります。

ABC は ASCII ベースの非常にシンプルなフォーマットです。このファイル形式について ABC のサイトで説明されています:

http://www.walshaw.plus.com/abc/learn.html.

abc2ly は ABC から LilyPond に変換を行います。以下のように呼び出します:

abc2ly [option]… abc-file

abc2ly には以下のオプションがあります。

-b,--beams=None

ABC の連桁情報を保持します。

-h,--help

このオプション一覧を表示します。

-o,--output=file

出力ファイル名を file とします。

-s,--strict

be strict about success

--version

バージョン情報を表示します。

LilyPond コードを ABC ソース ファイルに付け加えるための簡単な機能があります。以下のように記述した場合:

%%LY voices \set autoBeaming = ##f

キーワード ‘voices’ の後に続くテキストが LilyPond 出力ファイルのカレントのボイスに挿入されます。

同様に、

%%LY slyrics more words

これは、キーワード ‘slyrics’ の後に続くテキストを歌詞のカレント行に挿入します。

既知の問題と警告

ABC の標準はあくまでも ‘標準’ でしかありません。機能拡張 (例えば、多声音楽) のために、異なる書式があります。

1 つのファイルに複数の旋律を持つものは変換できません。

ABC は行の先頭で単語と音符との同期をとりますが、abc2ly は同期をとりません。

abc2ly は ABC の連桁を無視します。


4.3.4 etf2ly を呼び出す

Note: このプログラムはサポートされていません。LilyPond 将来のバージョンからは削除される可能性があります。

ETF (Enigma Transport Format) is a format used by Coda Music Technology's Finale product. etf2ly will convert part of an ETF file to a ready-to-use LilyPond file.

It is invoked from the command-line as follows.

etf2ly [option]… etf-file

Note that by ‘command-line’, we mean the command line of the operating system. See 他のフォーマットから変換する, for more information about this.

The following options are supported by etf2ly:

-h,--help

this help

-o,--output=FILE

set output filename to FILE

--version

version information

既知の問題と警告

The list of articulation scripts is incomplete. Empty measures confuse etf2ly. Sequences of grace notes are ended improperly.


4.3.5 その他のフォーマット

LilyPond 自体は他のフォーマットを一切サポートしませんが、外部ツールで LilyPond ファイルを生成することができます。それらのツールは より簡単な編集手段 でリストアップされています。


4.4 LilyPond 出力を他のプログラムで使用する

このセクションでは、lilypond-book を用いた自動手法ではない、テキストと楽譜を統合する手法を示します。


大きな楽譜から多くの引用を行う

大きな楽譜から多くの断片を引用する必要がある場合、システムをクリップする機能を使うことができます。 Extracting fragments of music を参照してください。


LilyPond 出力を OpenOffice.org に挿入する

OOoLilyPond を用いて LilyPond 記譜を OpenOffice.org に付け加えることができます。


LilyPond 出力を他のプログラムに挿入する

LilyPond 出力を他のプログラムに挿入するには、lilypond-book ではなく、lilypond を使用します。それぞれの例を個々に作成してドキュメントに付け加えます。大抵のプログラムに ‘PNG’, ‘EPS’, あるいは ‘PDF’ フォーマットの LilyPond 出力を挿入することができます。

LilyPond 楽譜の周りの空白を減らすには、以下のオプションを使用します: the following options

\paper{
  indent=0\mm
  line-width=120\mm
  oddFooterMarkup=##f
  oddHeaderMarkup=##f
  bookTitleMarkup = ##f
  scoreTitleMarkup = ##f
}

{ c1 }

EPS’ を作り出すには、以下のようにします:

lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts   myfile.ly

‘PNG’:
lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --png myfile.ly

4.5 独立した include

共有可能な大きな (そして有用な!) コードを記述している人がいます。これらのコードは独自のやり方で LilyPond を include してい場合があります。include が行われない場合、include されるファイルをダウンロードして手動でそれらを include する必要があります。


4.5.1 MIDI アーティキュレーション

LilyPond は “校閲” のために MIDI 出力を作り出すことができます。しかしながら MIDI に出力されるのは、強弱記号、明示的なテンポ記号、音符と演奏時間だけです。

アーティキュレーション プロジェクトは、楽譜の情報をより多く MIDI に組み込もうとしている試みの 1 つです。音符に ‘アーティキュレーション’ を加えるため、スラーの付いていない音符を縮めます。縮める長さは音符に付いているアーティキュレーション記号に基づいてが決まります: 例えば、スタッカートは音価を半分にし、テヌートは音符を演奏時間いっぱい鳴らします。さらに、このスクリプトはトリルとターンを理解し、モルデントなど他の装飾を理解するよう拡張することができます。

http://www.nicta.com.au/people/chubbp/articulate

既知の問題と警告

この機能は理解できるものにしか効果を持ちません: (音符のプロパティの代わりの) テキスト マークアップは無視されます。


5. LilyPond 入力ファイルの記述に対する提案

今やあなたはもっと大きな LilyPond 入力ファイル -- チュートリアルにあるような小さな例ではなく、楽曲全体 -- を書き始める準備が整っています。しかしながら、どのように書き進めていくべきなのでしょうか?

LilyPond があなたの入力ファイルを理解でき、望みの出力を作り出している限り、あなたの入力ファイルがどのようなものであるかは問題になりません。しかしながら、LilyPond 入力ファイルを書いているときに考慮すべきことが他にもいくつかあります。


5.1 一般的な提案

ここで、あなたが問題を回避したり修正する手助けになる可能性がある提案をいくつか挙げます:


5.2 既存の音楽を譜刻する

既存の楽譜からの音楽を入力している (つまり、既存の楽譜の楽曲を譜刻している) のなら、


5.3 大きなプロジェクト

大きなプロジェクトに取り組んでいるとき、LilyPond 入力ファイルの構造をすっきりさせておくことが不可欠です。


5.4 トラブルシュート

遅かれ早かれ、あなたは LilyPond がコンパイルできないファイルを書くことになります。LilyPond が返すメッセージはエラーを見つけ出す手助けになるかもしれませんが、多くの場合、問題の原因を探し出すために調査を行う必要があります。

この目的のための最も強力なツールは 1 行コメント (% で記述します) とブロック コメント (%{ ... %} で記述します) です。問題がどこにあるかわからない場合、入力ファイルの大きな一部分をコメント アウトすることから始めます。あるセクションをコメント アウトして、そのファイルを再びコンパイルしてみます。コンパイルが通ったのなら、問題は今コメント アウトした部分の中にあります。コンパイルが通らなかった場合は、コンパイルが通るようになるまでコメント アウトしたままにしておきます。

極端な場合、最終的に以下のようになるかもしれません:

\score {
  <<
    % \melody
    % \harmony
    % \bass
  >>
  \layout{}
}

(言い換えると、何の音楽も持たないファイルです)

こうなったとしても、あきらめないでください。少しだけコメントを外して -- 例えば、バス パートを -- コンパイルが通るかどうか試してみます。コンパイルが通らなかった場合は、バスの音楽をすべてコメント アウトします (しかし、\score の中の \bass はコメントを外したままにしておきます)。

bass = \relative c' {
%{
  c4 c c c
  d d d d
%}
}

そして、問題を起こしている行を見つけ出すまで、bass パートから少しずつコメントを外していきます。

もう 1 つの非常に有用なデバッグ テクニックは Tiny examples を構築することです。


5.5 Make と Makefile

LilyPond を実行できるほとんどすべてのプラットフォームが make というソフトウェアをサポートします。このソフトウェアは Makefile という名前の特殊なファイルを読み込みます。ファイル Makefile は、ファイルの依存関係と、あるファイルから別のファイルを作り出すためにオペレーティング システムに渡す必要があるコマンドを定義します。例えば、Makefile は LilyPond を実行して ballad.ly から ballad.pdfballad.midi を作り出す方法を記述します。

自身の便利さのためかソース ファイルにアクセスしてくれる他の人のために、自身のプロジェクト用に Makefile を作成することが良い場合があります。これが当てはまるのは、多くのインクルード ファイルと複数の出力オプション (例えば、フル スコア、パート スコア、指揮譜、ピアノ譜など) を持つ 非常に大きなプロジェクト、あるいは、ビルドするために複雑なコマンドを必要とするプロジェクト (lilypond-book プロジェクトなど) です。Makefile の複雑さと自由度は、必要性と作者のスキルに応じて、さまざまです。プログラム GNU Make は GNU/Linux ディストリビューションと MacOS X にインストールされていて、Windows でも利用可能です。

make の使い方についてのすべての詳細は GNU Make マニュアル を参照してください。これから示すのは make でできることのほんの一例です。

Makefile の中に規則を定義するためのコマンドは、プラットフォームによって異なります。例えば、さまざまな種類がある Linux と MacOS は bash を使いますが、Windows は cmd を使います。MacOS X では、コマンド ライン インタプリタを使用するためにシステムをコンフィグレーションする必要があるということに注意してください。ここで、Makefile の例をいくつか Linux/MacOS 用と Windows 用の両方のバージョンで示します。

最初の例は、4 楽章のオーケストラのためのもので、以下のようなディレクトリ構造を持ちます:

Symphony/
|-- MIDI/
|-- Makefile
|-- Notes/
|   |-- cello.ily
|   |-- figures.ily
|   |-- horn.ily
|   |-- oboe.ily
|   |-- trioString.ily
|   |-- viola.ily
|   |-- violinOne.ily
|   `-- violinTwo.ily
|-- PDF/
|-- Parts/
|   |-- symphony-cello.ly
|   |-- symphony-horn.ly
|   |-- symphony-oboes.ly
|   |-- symphony-viola.ly
|   |-- symphony-violinOne.ly
|   `-- symphony-violinTwo.ly
|-- Scores/
|   |-- symphony.ly
|   |-- symphonyI.ly
|   |-- symphonyII.ly
|   |-- symphonyIII.ly
|   `-- symphonyIV.ly
`-- symphonyDefs.ily

Scores ディレクトリと Parts ディレクトリの中にある .ly ファイルは音符を Notes ディレクトリの中にある .ily ファイルから取得します:

%%% top of file "symphony-cello.ly"
\include ../definitions.ily
\include ../Notes/cello.ily

この Makefile はターゲットとして score (フル スコアの楽曲全体)、movements (フル スコアの個々の楽章)、それに parts (演奏者のための個々のパート) を持ちます。さらに、web や email で配布するのに適したソース ファイルの tarball (訳者: 複数のファイルをコマンド tar で 1 つのファイルにまとめたもの) を作成するターゲット archive もあります。ここでは GNU/Linux や MacOS X 用の Makefile を示します。これをプロジェクトのトップ ディレクトリに Makefile という名前で保存する必要があります:

Note: ターゲットやパターン ルールが定義されたとき、そのあとの行はスペースではなく Tab で始まる必要があります。

# 出力ファイル名
piece = symphony
# いくつプロセッサがあるかを決定します
CPU_CORES=`cat /proc/cpuinfo | grep -m1 "cpu cores" | sed s/".*: "//`
# lilypond を実行するコマンド
LILY_CMD = lilypond -ddelete-intermediate-files \
                    -dno-point-and-click -djob-count=$(CPU_CORES)

# この Makefile で使用される拡張子
.SUFFIXES: .ly .ily .pdf .midi

# 入力ファイルと出力ファイルのサーチは VPATH 変数でリストアップされている
# ディレクトリの中で行われます。それらのディレクトリはすべて (GNU make 変数
# `CURDIR' によって与えられる) カレント ディレクトリのサブディレクトリです。
VPATH = \
  $(CURDIR)/Scores \
  $(CURDIR)/PDF \
  $(CURDIR)/Parts \
  $(CURDIR)/Notes

# LY 入力ファイルから PDF ファイルと MIDI ファイルを作成するための
# パターン ルール。.pdf 出力ファイルは `PDF' サブディレクトリの中に
# 配置され、.midi ファイルは `MIDI' サブディレクトリの中に配置されます。
%.pdf %.midi: %.ly
        $(LILY_CMD) $<; \           # this line begins with a tab
        if test -f "$*.pdf"; then \
            mv "$*.pdf" PDF/; \
        fi; \
        if test -f "$*.midi"; then \
            mv "$*.midi" MIDI/; \
        fi

notes = \
  cello.ily \
  horn.ily \
  oboe.ily \
  viola.ily \
  violinOne.ily \
  violinTwo.ily

# 楽章の依存関係
$(piece)I.pdf: $(piece)I.ly $(notes)
$(piece)II.pdf: $(piece)II.ly $(notes)
$(piece)III.pdf: $(piece)III.ly $(notes)
$(piece)IV.pdf: $(piece)IV.ly $(notes)

# 総譜の依存関係
$(piece).pdf: $(piece).ly $(notes)

# パート譜の依存関係
$(piece)-cello.pdf: $(piece)-cello.ly cello.ily
$(piece)-horn.pdf: $(piece)-horn.ly horn.ily
$(piece)-oboes.pdf: $(piece)-oboes.ly oboe.ily
$(piece)-viola.pdf: $(piece)-viola.ly viola.ily
$(piece)-violinOne.pdf: $(piece)-violinOne.ly violinOne.ily
$(piece)-violinTwo.pdf: $(piece)-violinTwo.ly violinTwo.ily

# 4 つすべての楽章のフル スコアを 1 つのファイルとして生成するには
# `make score' とタイプします。
.PHONY: score
score: $(piece).pdf

# すべてのパートを生成するには `make parts' とタイプします。
# 楽器 `foo' のためのパートを生成するには `make foo.pdf' とタイプします。
# 例: `make symphony-cello.pdf'
.PHONY: parts
parts: $(piece)-cello.pdf \
       $(piece)-violinOne.pdf \
       $(piece)-violinTwo.pdf \
       $(piece)-viola.pdf \
       $(piece)-oboes.pdf \
       $(piece)-horn.pdf

# 4 つの楽章を別個のファイルとして生成するには `make movements' とタイプします。
.PHONY: movements
movements: $(piece)I.pdf \
           $(piece)II.pdf \
           $(piece)III.pdf \
           $(piece)IV.pdf

all: score parts movements

archive:
        tar -cvvf stamitz.tar \       # this line begins with a tab
        --exclude=*pdf --exclude=*~ \
        --exclude=*midi --exclude=*.tar \
        ../Stamitz/*

Windows プラットフォームには特別な面倒さがあります。Windows 用の GNU Make をダウンロードしてインストールした後、システム環境変数に正しいパスを設定して、DOS シェルが Make プログラムを見つけられるようにする必要があります。これを行うには、"マイ コンピュータ" を右クリックして、プロパティ を選択し、それから 詳細設定 を選択します。それから 環境変数 をクリックして、システム環境変数 パネルの中にある Path をハイライトしてから 編集 をクリックして、GNU Make の実行ファイルへのパスを追加します。そのパスは以下のようになります (訳者: GNU Make のインストールのされ方によって異なります):

C:\Program Files\GnuWin32\bin

Linux/MacOS X とは異なるシェル コマンドを扱い、いくつかのデフォルト システム ディレクトリの中に存在するファイル空間を扱うために、Makefile 自体を変更する必要があります。Windows は tar コマンドを持たないため、archive ターゲットは除去されます。また、Windows が持つ MIDI ファイルのデフォルト拡張子は異なります。

## WINDOWS VERSION
##
piece = symphony
LILY_CMD = lilypond -ddelete-intermediate-files \
                    -dno-point-and-click \
                    -djob-count=$(NUMBER_OF_PROCESSORS)

#get the 8.3 name of CURDIR (workaround for spaces in PATH)
workdir = $(shell for /f "tokens=*" %%b in ("$(CURDIR)") \
          do @echo %%~sb)

.SUFFIXES: .ly .ily .pdf .mid

VPATH = \
  $(workdir)/Scores \
  $(workdir)/PDF \
  $(workdir)/Parts \
  $(workdir)/Notes

%.pdf %.mid: %.ly
        $(LILY_CMD) $<      # this line begins with a tab
        if exist "$*.pdf"  move /Y "$*.pdf"  PDF/ # begin with tab
        if exist "$*.mid" move /Y "$*.mid" MIDI/  # begin with tab

notes = \
  cello.ily \
  figures.ily \
  horn.ily \
  oboe.ily \
  trioString.ily \
  viola.ily \
  violinOne.ily \
  violinTwo.ily

$(piece)I.pdf: $(piece)I.ly $(notes)
$(piece)II.pdf: $(piece)II.ly $(notes)
$(piece)III.pdf: $(piece)III.ly $(notes)
$(piece)IV.pdf: $(piece)IV.ly $(notes)

$(piece).pdf: $(piece).ly $(notes)

$(piece)-cello.pdf: $(piece)-cello.ly cello.ily
$(piece)-horn.pdf: $(piece)-horn.ly horn.ily
$(piece)-oboes.pdf: $(piece)-oboes.ly oboe.ily
$(piece)-viola.pdf: $(piece)-viola.ly viola.ily
$(piece)-violinOne.pdf: $(piece)-violinOne.ly violinOne.ily
$(piece)-violinTwo.pdf: $(piece)-violinTwo.ly violinTwo.ily

.PHONY: score
score: $(piece).pdf

.PHONY: parts
parts: $(piece)-cello.pdf \
       $(piece)-violinOne.pdf \
       $(piece)-violinTwo.pdf \
       $(piece)-viola.pdf \
       $(piece)-oboes.pdf \
       $(piece)-horn.pdf

.PHONY: movements
movements: $(piece)I.pdf \
           $(piece)II.pdf \
           $(piece)III.pdf \
           $(piece)IV.pdf

all: score parts movements

次の Makefile は、LaTeX で処理する lilypond-book ドキュメント用です。このドキュメントは目次を持ちます。目次を作成するには、リンクを更新するために latex コマンドを 2 回実行する必要があります。.pdf 出力ファイルは out ディレクトリに保存され、HTML 出力ファイルは htmlout ディレクトリに保存されます。

SHELL=/bin/sh
FILE=myproject
OUTDIR=out
WEBDIR=htmlout
VIEWER=acroread
BROWSER=firefox
LILYBOOK_PDF=lilypond-book --output=$(OUTDIR) --pdf $(FILE).lytex
LILYBOOK_HTML=lilypond-book --output=$(WEBDIR) $(FILE).lytex
PDF=cd $(OUTDIR) && pdflatex $(FILE)
HTML=cd $(WEBDIR) && latex2html $(FILE)
INDEX=cd $(OUTDIR) && makeindex $(FILE)
PREVIEW=$(VIEWER) $(OUTDIR)/$(FILE).pdf &

all: pdf web keep

pdf:
        $(LILYBOOK_PDF)  # begin with tab
        $(PDF)           # begin with tab
        $(INDEX)         # begin with tab
        $(PDF)           # begin with tab
        $(PREVIEW)       # begin with tab

web:
        $(LILYBOOK_HTML) # begin with tab
        $(HTML)          # begin with tab
        cp -R $(WEBDIR)/$(FILE)/ ./  # begin with tab
        $(BROWSER) $(FILE)/$(FILE).html &  # begin with tab

keep: pdf
        cp $(OUTDIR)/$(FILE).pdf $(FILE).pdf  # begin with tab

clean:
        rm -rf $(OUTDIR) # begin with tab

web-clean:
        rm -rf $(WEBDIR) # begin with tab

archive:
        tar -cvvf myproject.tar \ # begin this line with tab
        --exclude=out/* \
        --exclude=htmlout/* \
        --exclude=myproject/* \
        --exclude=*midi \
        --exclude=*pdf \
        --exclude=*~ \
        ../MyProject/*

TODO: make this thing work on Windows

この Makefile は Windows では機能しません。Windows ユーザの代替手段として、ビルド コマンドを保持する簡単なバッチ ファイルを作成する方法があります。これは Makefile のように依存関係を保持できませんが、少なくともビルド処理を単一のコマンドに縮小します。以下のコードを build.bat あるいは build.cmd として保存してください。このバッチ ファイルは DOS プロンプトから実行することができ、単にそのアイコンをダブル クリックすることでも実行することができます。

lilypond-book --output=out --pdf myproject.lytex
cd out
pdflatex myproject
makeindex myproject
pdflatex myproject
cd ..
copy out\myproject.pdf MyProject.pdf

参照

アプリケーションの使用方法: コマンド ラインの使用方法, lilypond-book


A. GNU Free Documentation License

Version 1.3, 3 November 2008

 
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
  1. PREAMBLE

    The purpose of this License is to make a manual, textbook, or other functional and useful document free in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.

    This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.

    We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.

  2. APPLICABILITY AND DEFINITIONS

    This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

    A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.

    A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.

    The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

    The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

    A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''.

    Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.

    The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.

    The ``publisher'' means any person or entity that distributes copies of the Document to the public.

    A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition.

    The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

  3. VERBATIM COPYING

    You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.

    You may also lend copies, under the same conditions stated above, and you may publicly display copies.

  4. COPYING IN QUANTITY

    If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.

    If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.

    If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.

    It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.

  5. MODIFICATIONS

    You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:

    1. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
    2. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
    3. State on the Title page the name of the publisher of the Modified Version, as the publisher.
    4. Preserve all the copyright notices of the Document.
    5. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
    6. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
    7. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
    8. Include an unaltered copy of this License.
    9. Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
    10. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
    11. For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
    12. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
    13. Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version.
    14. Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section.
    15. Preserve any Warranty Disclaimers.

    If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.

    You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.

    You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.

    The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.

  6. COMBINING DOCUMENTS

    You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.

    The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.

    In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.''

  7. COLLECTIONS OF DOCUMENTS

    You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.

    You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.

  8. AGGREGATION WITH INDEPENDENT WORKS

    A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.

    If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.

  9. TRANSLATION

    Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

    If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

  10. TERMINATION

    You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License.

    However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

    Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

    Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it.

  11. FUTURE REVISIONS OF THIS LICENSE

    The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/.

    Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document.

  12. RELICENSING

    ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the site means any set of copyrightable works thus published on the MMC site.

    ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization.

    ``Incorporate'' means to publish or republish a Document, in whole or in part, as part of another Document.

    An MMC is ``eligible for relicensing'' if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008.

    The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing.

ADDENDUM: How to use this License for your documents

To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:

 
  Copyright (C)  year  your name.
  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.3
  or any later version published by the Free Software Foundation;
  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  Texts.  A copy of the license is included in the section entitled ``GNU
  Free Documentation License''.

If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with…Texts.'' line with this:

 
    with the Invariant Sections being list their titles, with
    the Front-Cover Texts being list, and with the Back-Cover Texts
    being list.

If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.

If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.


B. LilyPond インデックス

行き先:   \                    
A   C   D   E   F   H   I   L   M   O   P   S   T   U   V   W  
インデックス エントリ セクション

\
\header in LaTeX documents3.2.1 LaTeX

A
ABC4.3.3 abc2ly を呼び出す

C
call trace (トレースを呼び出す)1.3 エラー メッセージ
Coda Technology4.3.4 etf2ly を呼び出す
coloring, syntax (カラーリング構文)4.2 テキスト エディタ サポート
command line options for lilypond (lilypond のためのコマンド ライン オプション)lilypond のコマンド ライン オプション
convert-ly2. convert-ly を使ってファイルを更新する
convert-ly2.1 何故構文は変更されるのか?

D
docbook3. lilypond-book: Integrating text and music
DocBook, music in3. lilypond-book: Integrating text and music
documents, adding music to3. lilypond-book: Integrating text and music
dvipsLaTeX

E
editors (エディタ)4.2 テキスト エディタ サポート
emacs4.2 テキスト エディタ サポート
enigma4.3.4 etf2ly を呼び出す
Entering lyrics見かけ上 ../ly/init.ly のエラーとなる
error (エラー)1.3 エラー メッセージ
error messages (エラー メッセージ)1.3 エラー メッセージ
errors, message format (エラー メッセージの形式)1.3 エラー メッセージ
ETF4.3.4 etf2ly を呼び出す
External programs, generating LilyPond files (LilyPond ファイルを生成する外部プログラム)4.3.5 その他のフォーマット
Extracting fragments of musicMany quotes from a large score
Extracting fragments of music大きな楽譜から多くの引用を行う

F
fatal error (致命的なエラー)1.3 エラー メッセージ
file searching (ファイル検索)lilypond のコマンド ライン オプション
file size, output (出力のファイル サイズ)4.1 ポイント&クリック
Finale4.3.4 etf2ly を呼び出す
Flexible vertical spacing within systems警告 – Warning staff affinities should only decrease

H
html3. lilypond-book: Integrating text and music
HTML, music in3. lilypond-book: Integrating text and music

I
invoking dvipsLaTeX
Invoking lilypond (lilypond を呼び出す)lilypond のコマンド ライン オプション

L
LANG環境変数
latex3. lilypond-book: Integrating text and music
LaTeX, music in3. lilypond-book: Integrating text and music
LilyPond 入力ファイルの仕組み見かけ上 ../ly/init.ly のエラーとなる
lilypond-book参照
LILYPOND_DATADIR環境変数

M
MacOS X1.2 コマンド ラインの使用方法
MacOS X4.3 他のフォーマットから変換する
MIDI4.3.1 midi2ly を呼び出す
modes, editor (エディタのモード)4.2 テキスト エディタ サポート
musicology3.1 An example of a musicological document
MusicXML4.3.2 musicxml2ly を呼び出す

O
OpenOffice.orgInserting LilyPond output into OpenOffice.org
OpenOffice.orgLilyPond 出力を OpenOffice.org に挿入する
options, command line (コマンド ライン オプション)lilypond のコマンド ライン オプション
outline fontsLaTeX
output format, setting (出力フォーマットを設定する)lilypond のコマンド ライン オプション

P
paper-size, command line (コマンドラインで paper-size を指定する)lilypond のコマンド ライン オプション
point and click (ポイント&クリック)4.1 ポイント&クリック
point and click, command line (コマンド ラインからポイント&クリックを制御する)lilypond のコマンド ライン オプション
PostScript output (PostScript 出力)lilypond のコマンド ライン オプション
preview image3.2.3 HTML
Programming error (プログラミング エラー)1.3 エラー メッセージ

S
Scheme dump (Scheme ダンプ)lilypond のコマンド ライン オプション
Scheme error (Scheme エラー)1.3 エラー メッセージ
search path (サーチ パス)lilypond のコマンド ライン オプション
Skipping corrected music5.2 既存の音楽を譜刻する
Staff4.3.1 midi2ly を呼び出す
SVG (Scalable Vector Graphics)lilypond のコマンド ライン オプション
switches (切り換え)lilypond のコマンド ライン オプション
syntax coloring (カラーリング構文)4.2 テキスト エディタ サポート

T
texi3. lilypond-book: Integrating text and music
texinfo3. lilypond-book: Integrating text and music
texinfo3. lilypond-book: Integrating text and music
Texinfo, music in3. lilypond-book: Integrating text and music
Text encodingエラー メッセージ FT_Get_Glyph_Name
thumbnail3.2.3 HTML
Tiny examples5.4 トラブルシュート
titling and lilypond-book3.2.1 LaTeX
titling in HTML3.2.3 HTML
trace, Scheme (Scheme トレース)1.3 エラー メッセージ
type1 fontsLaTeX

U
Updating a LilyPond file (LilyPond ファイルを更新する)2. convert-ly を使ってファイルを更新する
updating old input files (古い入力ファイルを更新する)2.1 何故構文は変更されるのか?

V
vim4.2 テキスト エディタ サポート
Voice4.3.1 midi2ly を呼び出す

W
warning (警告)1.3 エラー メッセージ

その他の情報源Vim モード

より簡単な編集手段その他のエディタ
より簡単な編集手段4.3.5 その他のフォーマット

オクターブ チェック5.1 一般的な提案

コマンド ラインの使用方法参照

スタイル シート5.1 一般的な提案

チュートリアル1.1 通常の使用方法

マニュアルLilyPond — 使用方法
マニュアルLilyPond — 使用方法

変数と関数を用いて入力の手間を省く5.1 一般的な提案

小節と小節番号のチェック楽譜がページからはみ出る
小節と小節番号のチェック5.1 一般的な提案
小節線楽譜がページからはみ出る

行き先:   \                    
A   C   D   E   F   H   I   L   M   O   P   S   T   U   V   W  

脚注

[1] GUILE のステータスは .ly 処理後にリセットされません。そのため、Scheme 内部からいかなるシステム デフォルトも変更しないよう注意してください。

[2] At least, this is possible in any LilyPond file which does not contain scheme. If there is scheme in the file, then the LilyPond file contains a Turing-complete language, and we run into problems with the famous “Halting Problem” in computer science.

[3] This tutorial is processed with Texinfo, so the example gives slightly different results in layout.

[4] Note that PDFLaTeX and LaTeX may not be both usable to compile any LaTeX document, that is why we explain the two ways.

[5] UNIXでは、このファイルは ‘/etc/xpdfrc’ かホーム ディレクトリの中の ‘.xpdfrc’ としてのどちらかです。


目次


このドキュメントについて

This document was generated by Graham Percival on 7 月 26, 2011 using texi2html 1.82.

ナビゲーション パネルの中にあるボタンには以下のような意味があります:

ボタン 名前 行き先 1.2.3 からの行き先
[]
[ << ] 大きく戻る この章あるいは前の章の先頭 1
[]
[トップ] トップ ドキュメントの表紙 (先頭)  
[目次] 目次 目次  
[インデックス] インデックス インデックス  
[ ? ] 情報 情報 (ヘルプ)  
[]
[ >> ] 大きく進む 次の章 2
[]
[]
[ < ] 戻る 前のセクション 1.2.2
[]
[ 上へ ] 上のセクション 1.2
[]
[ > ] 進む 次のセクション 1.2.4

この表で、 行き先 は、現在の位置が以下のような構造を持つドキュメントの サブサブセクション 1-2-3 であると仮定しています:


他の言語: English, deutsch, español, français, magyar, italiano

LilyPond — 使用方法