しかしながら、この例はスタート地点として役に立ちます。
@funindex \book
-@funindex book
@funindex \score
-@funindex score
@cindex book
@cindex score
@end example
@funindex \header
-@funindex header
@funindex \layout
-@funindex layout
@funindex \midi
-@funindex midi
@cindex header (ヘッダ)
@cindex layout (レイアウト)
@cindex midi
@cindex book block, implicit (暗黙の book ブロック)
@cindex implicit book block (暗黙の book ブロック)
@funindex \book
-@funindex book
あなたは複数の @code{\score} ブロックを記述するかもしれません。@c
それらはそれぞれ別々の楽譜として扱われますが、それらは結合されて@c
@translationof Score is a (single) compound musical expression
@funindex \score
-@funindex score
@cindex score
@cindex contents of a score block (score ブロックの内容)
@cindex score block, contents of (score ブロックの内容)
タイが 2 つの連符にまたがっていて、@c
さらにフレージング スラーが連符の外にまで伸びています (行 3 と 4)。
-@lilypond[quote,verbatim,ragged-right,relative=1]
-r16[ g \tuplet 3/2 { r16 e'8] }
-g,16( a \tuplet 3/2 { b16 d) e }
-g,8[( a \tuplet 3/2 { b8 d) e~] } |
-\tuplet 5/4 { e32\( a, b d e } a4.\)
+@lilypond[quote,verbatim,ragged-right]
+\relative {
+ r16[ g' \tuplet 3/2 { r16 e'8] }
+ g,16( a \tuplet 3/2 { b16 d) e }
+ g,8[( a \tuplet 3/2 { b8 d) e~] } |
+ \tuplet 5/4 { e32\( a, b d e } a4.\)
+}
@end lilypond
以下では、上記の例の和音を 2 つのボイスに分け、経過音とスラーを付け加えています:
-@lilypond[quote,verbatim,ragged-right,relative=2]
-\key g \major
-% Voice "1" Voice "2"
-<< { g4 fis8( g) a4 g } \\ { d4 d d d } >>
+@lilypond[quote,verbatim,ragged-right]
+\relative {
+ \key g \major
+ % Voice = "1" Voice = "2"
+ << { g'4 fis8( g) a4 g } \\ { d4 d d d } >>
+}
@end lilypond
この例では 2 番目のボイスの符幹が下向きになっていることに気付いてください。
@lilypond[quote,verbatim,fragment,ragged-right,relative=2]
\key d \minor
-% Voice "1" Voice "2"
+% Voice = "1" Voice = "2"
<< { r4 g g4. a8 } \\ { d,2 d4 g } >> |
<< { bes4 bes c bes } \\ { g4 g g8( a) g4 } >> |
<< { a2. r4 } \\ { fis2. s4 } >> |
しかしながら、各小節に多くの音符がある場合、@c
以下のようにボイス毎に分離した方が良いかもしれません:
-@lilypond[quote,verbatim,ragged-right,relative=2]
-\key d \minor
-<< {
- % Voice "1"
- r4 g g4. a8 |
- bes4 bes c bes |
- a2. r4 |
-} \\ {
- % Voice "2"
- d,2 d4 g |
- g4 g g8( a) g4 |
- fis2. s4 |
-} >>
+@lilypond[quote,verbatim,ragged-right]
+<<
+ \key d \minor
+ \relative { % Voice = "1"
+ r4 g' g4. a8 |
+ bes4 bes c bes |
+ a2. r4 |
+ } \\
+ \relative { % Voice = "2"
+ d'2 d4 g |
+ g4 g g8( a) g4 |
+ fis2. s4 |
+ }
+>>
@end lilypond
\new Staff \relative {
% Main voice
c'16 d e f
- % Voice "1" Voice "2" Voice "3"
+ % Voice = "1" Voice = "2" Voice = "3"
<< { g4 f e } \\ { r8 e4 d c8 ~ } >> |
<< { d2 e2 } \\ { c8 b16 a b8 g ~ 2 } \\ { s4 b4 c2 } >> |
}
@translationof Explicitly instantiating voices
@funindex \voiceOne
-@funindex voiceOne
@funindex \voiceTwo
-@funindex voiceTwo
@funindex \voiceThree
-@funindex voiceThree
@funindex \voiceFour
-@funindex voiceFour
@funindex \oneVoice
-@funindex oneVoice
@funindex \new Voice
@cindex voice contexts, creating (ボイス コンテキストを作成する)
@cindex collisions, notes (音符の衝突)
@cindex shift commands (シフト コマンド)
@funindex \shiftOff
-@funindex shiftOff
@funindex \shiftOn
-@funindex shiftOn
@funindex \shiftOnn
-@funindex shiftOnn
@funindex \shiftOnnn
-@funindex shiftOnnn
和音の中で小さな間隔で置かれる音符、@c
あるいは異なるボイスで同時に発生する音符は、@c
@funindex \new Lyrics
@funindex \lyricsto
-@funindex lyricsto
@funindex Lyrics
@cindex Lyrics context, creating (歌詞コンテキストを作成する)
@cindex lyrics, linking to voice (歌詞をボイスにリンクさせる)
@cindex lyrics and beaming (歌詞と連桁)
@cindex beaming and lyrics (連桁と歌詞)
@funindex \autoBeamOff
-@funindex autoBeamOff
LilyPond がデフォルトで使用する自動連桁は楽器だけの音楽では@c
うまく機能しますが、歌詞を持つ音楽ではそれほどうまく機能しません。@c
@funindex \new ChoirStaff
@funindex ChoirStaff
@funindex \lyricmode
-@funindex lyricmode
@cindex vocal score structure (ボーカル譜構造)
@cindex choir staff
記譜要素を出力に追加しなければなりません。@c
例えば、以下の例で入力と出力を比較してください:
-@lilypond[quote,verbatim,relative=2]
-cis4 cis2. | a4 a2. |
+@lilypond[quote,verbatim]
+\relative { cis''4 cis2. | a4 a2. | }
@end lilypond
この入力は内容がやや乏しいですが、出力では小節線、臨時記号、音部記号、@c
@translationof Creating contexts
@funindex \new
-@funindex new
@cindex new contexts (新しいコンテキスト)
@cindex creating contexts (コンテキストを作成する)
@cindex contexts, creating (コンテキストを作成する)
@cindex context properties, modifying (コンテキスト プロパティを変更する)
@cindex modifying context properties (コンテキスト プロパティを変更する)
@funindex \set
-@funindex set
@funindex \unset
-@funindex unset
コンテキストにはいくつかのコンテキスト プロパティを保持する責任があります。@c
それらプロパティの多くは変更可能であり、変更することで入力の構文解釈に影響を@c
変更は直前にセットされた値から行われるのではなく、デフォルト値から行われます。
@c KEEP LY
-@lilypond[quote,verbatim,ragged-right,relative=1]
-c4 d
-% 符頭を小さくします
-\set fontSize = #-4
-e4 f |
-% 符頭を大きくします
-\set fontSize = #2.5
-g4 a
-% デフォルトのサイズに戻します
-\unset fontSize
-b4 c |
+@lilypond[quote,verbatim,ragged-right]
+\relative {
+ c'4 d
+ % 符頭を小さくします
+ \set fontSize = #-4
+ e4 f |
+ % 符頭を大きくします
+ \set fontSize = #2.5
+ g4 a
+ % デフォルトのサイズに戻します
+ \unset fontSize
+ b4 c |
+}
@end lilypond
これまでにいくつかのタイプのプロパティ値をセットする方法を見てきました。@c
@c Setting context properties with @code{\with}
@funindex \with
-@funindex with
@cindex context properties, setting with \with (\with でコンテキスト プロパティを設定する)
コンテキスト プロパティはコンテキストが作成されるときに@c
@cindex context properties, setting with \context (\context でコンテキスト プロパティを設定する)
@funindex \context
-@funindex context
コンテキスト プロパティの値は単一のコマンドによってある特定のタイプの@c
コンテキスト@emph{すべて} -- すべての @code{Staff} コンテキストなどのように
@cindex removing engravers (エングラーバを削除する)
@funindex \consists
-@funindex consists
@funindex \remove
-@funindex remove
これまでに、コンテキストはそれぞれにいくつかのエングラーバを保持し、@c
それぞれのエングラーバは出力のある特定部分
@c Changing all contexts of the same type
@funindex \layout
-@funindex layout
上の例では、個々のコンテキストにエングラーバを追加あるいは削除する方法を@c
示しました。@c