%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/two--partcombine-pairs-on-one-staff.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.24.0"

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

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 >>

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

%% Translation of GIT committish: c043783aac6c35926d633aa2daf60ed4f2e7ca7a
  texidocfr = "

La fonction @code{\\partCombine} prend deux expressions musicales
contenant chacune une partie et les distribue dans quatre contextes
@code{Voice} nommés « two », « one », « solo » et « chords » selon le
moment et la manière dont ces parties fusionnent en une voix commune.

Des variantes de @code{\\partCombine} -- @code{\\partCombineUp} et
@code{\\partCombineDown} -- permettent de fusionner des voix aux hampes
ascendantes et descendantes. Les combiner alors pour présenter quatre
parties sur une seule portée requiert cependant des réglages
spécifiques, comme indiqué ci-dessous.
"

  doctitlefr = "Deux @code{\\partCombine} sur une même portée"

%% Translation of GIT committish: af28c5f89c915fdf795739a1e2dd437c726d7f61
  texidoces = "
La función @code{\\partCombine} toma dos expresiones musicales,
cada una de las cuales contiene una parte o voz, y las distribuye
entre cuatro contextos de @code{Voice} llamados @qq{one},
@qq{two}, @qq{solo} y @qq{shared} dependiendo de cuándo y cómo las
partes o voces se combinan en una voz común.

Las voces que devuelve @code{\\partCombine} pueden ver ajustadas
sus propiedades de presentación de la manera usual.  Aquí
definimos extensiones de @code{\\partCombine} para facilitar la
inclusión de cuatro voces dentro del mismo pentagrama.

@code{\\partCombineUp} y @code{\\partCombineDown} son variantes de
@code{\\partCombine} pensadas para producir combinaciones de dos
voces con la plica hacia arriba y hacia abajo, respectivamente.
Sin embargo, combinarlas para comprimir cuatro partes en un solo
pentagrama requiere ciertos ajustes especiales, los que este
fragmento de código define adecuadamente.

"

  doctitlees = "Dos pares de @code{\\partCombine} en un solo pentagrama"

  categories = "Scheme, Simultaneous notes, Staff notation"

  texidoc = "
The @code{\\partCombine} function takes two music expressions, each
containing a part, and distributes them among four @code{Voice}
contexts named @qq{one}, @qq{two}, @qq{solo}, and @qq{shared}, depending on when
and how the parts are merged into a common voice.

Variants of @code{\\partCombine} are @code{\\partCombineUp} and
@code{\\partCombineDown} to produce up-stem and down-stem merging of
two voices, respectively. Combining them to squeeze four parts into a
single staff, however, need some special setup, which this snippet
defines accordingly.
"

  doctitle = "Two \\partCombine pairs on one staff"
} % begin verbatim


customPartCombineUp =
#(define-music-function (part1 part2) (ly:music? ly:music?)
  "Make an up-stem `VoiceBox` context that combines PART1 and PART2.

The context is called 'Up'; internally, the function calls
`\\partCombineUp`."
  #{
    \new VoiceBox = "Up" <<
      \context Voice = "one" { \voiceOne }
      \context Voice = "two" { \voiceThree }
      \context Voice = "shared" { \voiceOne }
      \context Voice = "solo" { \voiceOne }
      \context NullVoice = "null" {}
      \partCombine #part1 #part2
    >>
  #})

customPartCombineDown =
#(define-music-function (part3 part4) (ly:music? ly:music?)
  "Make a down-stem `VoiceBox` context that combines PART3 and PART4.

The context is called 'Down'; internally, the function calls
`\\partCombineDown`."
  #{
    \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 #part3 #part4
    >>
  #})

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
>>

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



% ****************************************************************
% end ly snippet
% ****************************************************************
