他のボイスを引用する

あるボイスが他のボイスと同じ音符を演奏することはごく一般的なことです。例えば、第 1 バイオリンと第2バイオリンがあるパッセージで同じフレーズを演奏することがあります。これは、ボイスに他のボイスを 引用 させることで実現でき、第 2 ボイスの音楽全体を再入力する必要はありません。

最上位レベルのスコープで用いる \addQuote コマンドは一部を引用することができる音楽を定義します。

\quoteDuring コマンドを用いて、引用を開始する位置を示します。このコマンドは 2 つの引数をとります: \addQuote で定義した引用するボイスの名前と、引用部分の演奏時間を示す音楽表記です。

fluteNotes = \relative {
  a'4 gis g gis | b4^"quoted" r8 ais\p a4( f)
}

oboeNotes = \relative {
  c''4 cis c b \quoteDuring "flute" { s1 }
}

\addQuote "flute" { \fluteNotes }

\score {
  <<
    \new Staff \with { instrumentName = "Flute" } \fluteNotes
    \new Staff \with { instrumentName = "Oboe" } \oboeNotes
  >>
}

[image of music]

\quoteDuring で使用される音楽表記が空白休符や複数小節休符ではなく音符を保持している場合、引用は多声となり、予期しない結果となる可能性があります。

fluteNotes = \relative {
  a'4 gis g gis | b4^"quoted" r8 ais\p a4( f)
}

oboeNotes = \relative {
  c''4 cis c b \quoteDuring "flute" { e4 r8 ais b4 a }
}

\addQuote "flute" { \fluteNotes }

\score {
  <<
    \new Staff \with { instrumentName = "Flute" } \fluteNotes
    \new Staff \with { instrumentName = "Oboe" } \oboeNotes
  >>
}

[image of music]

\unfoldRepeats コマンドを \quoteDuring と一緒に使う場合、引用の中でも \unfoldRepeats コマンドを使わなければなりません:

fluteNotes = \relative {
  \repeat volta 2 { a'4 gis g gis }
}

oboeNotesDW = \relative {
  \repeat volta 2 \quoteDuring "incorrect" { s1 }
}

oboeNotesW = \relative {
  \repeat volta 2 \quoteDuring "correct" { s1 }
}


\addQuote "incorrect" { \fluteNotes }

\addQuote "correct" { \unfoldRepeats \fluteNotes }

\score {
  \unfoldRepeats
  <<
    \new Staff \with { instrumentName = "Flute" }
    \fluteNotes
    \new Staff \with { instrumentName = "Oboe (incorrect)" }
    \oboeNotesDW
    \new Staff \with { instrumentName = "Oboe (correct)" }
    \oboeNotesW
  >>
}

[image of music]

\quoteDuring コマンドは引用されるパートと引用するパート両方の \transposition を使用して、引用されるパートと同じ響きのピッチに変換して、引用するパートの音符を作り出します。

clarinetNotes = \relative c'' {
  \transposition bes
  \key d \major
  b4 ais a ais | cis4^"quoted" r8 bis\p b4( f)
}

oboeNotes = \relative {
  c''4 cis c b \quoteDuring "clarinet" { s1 }
}

\addQuote "clarinet" { \clarinetNotes }


\score {
  <<
    \new Staff \with { instrumentName = "Clarinet" } \clarinetNotes
    \new Staff \with { instrumentName = "Oboe" } \oboeNotes
  >>
}

[image of music]

デフォルトでは引用される音楽はすべてのアーティキュレーション、強弱記号、マークアップ等を含んでいます。quotedEventTypes コンテキスト プロパティを用いることで、引用される音楽から引用するオブジェクトを選択することが可能です。

fluteNotes = \relative {
  a'2 g2 |
  b4\<^"quoted" r8 ais a4\f( c->)
 }

oboeNotes = \relative {
  c''2. b4 |
  \quoteDuring "flute" { s1 }
}

\addQuote "flute" { \fluteNotes }

\score {
  <<
    \set Score.quotedEventTypes = #'(note-event articulation-event
                                     crescendo-event rest-event
                                     slur-event dynamic-event)
    \new Staff \with { instrumentName = "Flute" } \fluteNotes
    \new Staff \with { instrumentName = "Oboe" } \oboeNotes
  >>
}

[image of music]

引用にもタグを付けることができます。タグを使用する を参照してください。

参照

記譜法リファレンス: 楽器の移調, タグを使用する

インストールされているファイル: scm/define-event-classes.scm.

コード断片集: Staff notation

内部リファレンス: +Music classes, QuoteMusic, Voice

既知の問題と警告

\addQuote 中にある最初の Voice の内容だけが引用されます。そのため、音楽表記が \new\context Voice を含んでいても、それらの内容は引用されません。装飾小音符の引用はサポートされておらず、LilyPond がクラッシュする可能性さえあります。 ネストされた連符を引用しようとしてもうまくいきません。


LilyPond 記譜法リファレンス v2.25.15 (開発版).