1 つの譜で 2 つの \partCombine を使用する

\partCombine 関数は 2 パートの音楽表記を取り、パートがどのように結合されるかに応じて、“two”, “one”, “solo”, “chords” の 4 つの Voice に配置します。\partCombine によって出力されたボイスは、それぞれがレイアウト プロパティを持ち、通常の方法で調整することができます。ここでは、\partCombine を拡張し、4 つのボイスを 1 つの譜を結合する作業を簡単にしています。

soprano = { d’4 | cis’ b e’ d’8 cis’ | cis’2 b } alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 } tenor = { a8 b | cis’ dis’ e’4 b8 cis’ d’4 | gis cis’ dis’2 } bass = { fis8 gis | a4 gis g fis | eis fis b,2 }

\new Staff << \key b\minor \clef alto \partial 4 \transpose b b’ \partCombineUp \soprano \alto \partCombineDown \tenor \bass >>

\layout {
  \context {
    \Staff
    \accepts "VoiceBox"
  }
  \context {
    \name "VoiceBox"
    \type "Engraver_group"
    \defaultchild "Voice"
    \accepts "Voice"
    \accepts "NullVoice"
  }
}

customPartCombineUp =
#(define-music-function (partOne partTwo)
  (ly:music? ly:music?)
"Take the music in @var{partOne} and @var{partTwo} and return
a @code{VoiceBox} named @q{Up} containing @code{Voice}s
that contain @var{partOne} and @var{partTwo} merged into one
voice where feasible.  This variant sets the default voicing
in the output to use upward stems."
#{
  \new VoiceBox = "Up" <<
    \context Voice = "one" { \voiceOne }
    \context Voice = "two" { \voiceThree }
    \context Voice = "shared" { \voiceOne }
    \context Voice = "solo" { \voiceOne }
    \context NullVoice = "null" {}
    \partCombine #partOne #partTwo
  >>
#})

customPartCombineDown = #
(define-music-function (partOne partTwo)
  (ly:music? ly:music?)
"Take the music in @var{partOne} and @var{partTwo} and return
a @code{VoiceBox} named @q{Down} containing @code{Voice}s
that contain @var{partOne} and @var{partTwo} merged into one
voice where feasible.  This variant sets the default voicing
in the output to use downward stems."
#{
  \new VoiceBox = "Down" <<
    \set VoiceBox.soloText = #"Solo III"
    \set VoiceBox.soloIIText = #"Solo IV"
    \context Voice ="one" { \voiceFour }
    \context Voice ="two" { \voiceTwo }
    \context Voice ="shared" { \voiceFour }
    \context Voice ="solo" { \voiceFour }
    \context NullVoice = "null" {}
    \partCombine #partOne #partTwo
  >>
#})

soprano = { d'4 | cis'  b  e'  d'8 cis' | cis'2 b }
alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 }
tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 }
bass = { fis8 gis | a4 gis g fis | eis fis b,2 }

\new Staff <<
  \key b\minor
  \clef alto
  \partial 4
  \transpose b b'
  \customPartCombineUp \soprano \alto
  \customPartCombineDown \tenor \bass
>>

[image of music]


LilyPond snippets v2.25.21 (開発版).