Node:Automatic part combining, Next:Hiding staves, Previous:Multi measure rests, Up:Orchestral music
Automatic part combining is used to merge two parts of music onto a staff. It is aimed at typesetting orchestral scores. When the two parts are identical for a period of time, only one is shown. In places where the two parts differ, they are typeset as separate voices, and stem directions are set automatically. Also, solo and a due parts are identified and can be marked.
The syntax for part combining is
\partcombine context musicexpr1 musicexpr2where the pieces of music musicexpr1 and musicexpr2 will be combined into one context of type context. The music expressions must be interpreted by contexts whose names should start with
one
and two
.
The following example demonstrates the basic functionality of the part combiner: putting parts on one staff, and setting stem directions and polyphony:
\context Staff << \context Voice=one \partcombine Voice \context Thread=one \relative c'' { g a( b) r } \context Thread=two \relative c'' { g r4 r f } >>
The first g
appears only once, although it was
specified twice (once in each part). Stem, slur and tie directions are
set automatically, depending whether there is a solo or unisono. The
first part (with context called one
) always gets up stems, and
`solo', while the second (called two
) always gets down stems and
`Solo II'.
If you just want the merging parts, and not the textual markings, you may set the property soloADue to false:
\context Staff << \property Staff.soloADue = ##f \context Voice=one \partcombine Voice \context Thread=one \relative c'' { b4 a c g } \context Thread=two \relative c'' { d,2 a4 g' } >>
The syntax for naming contexts in inconsistent with the syntax for combining stanzas.
In soloADue
mode, when the two voices play the same notes on and
off, the part combiner may typeset a2
more than once in a
measure:
The part combiner is rather buggy, and it will be replaced by a better mechanism in the near future.
This page is for LilyPond-2.0.0 (stable-branch).