Node: Automatic part combining, Next: , Previous: Multi measure rests, Up: Orchestral music



Automatic part combining

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.

Syntax

The syntax for part combining is

       \partcombine context musicexpr1 musicexpr2
     
where 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
           }
       >>
     

[picture of music]

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

[picture of music]

See also

PartCombineMusic, Thread_devnull_engraver, and Voice_devnull_engraver and A2_engraver.

Bugs

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:

[picture of music]

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.1 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.