]> git.donarmstrong.com Git - lilypond.git/blob - input/test/part-combine.ly
c37ab7c06ad7f0e4750f3876aa11ee0ccaa7407b
[lilypond.git] / input / test / part-combine.ly
1
2 \version "2.1.7"
3
4 \header{ texidoc="@cindex Part Combine
5 In orchestral scores and hymns, voices are traditionally combined onto
6 one staff.  LilyPond has a part combiner, that combines or separates two
7 voices according to actual rhythm and pitch.  User-defined texts such as
8 ``solo'' and ``@`a2'' are typeset automagically, as appropriate. "
9 }
10
11 \score{
12    \notes \context Staff = flauti <<
13     \time 4/4
14     \context Voice=one \partcombine Voice
15     \context Thread=one\relative c'' {
16       c4 d e f | b,4 d c d | r2 e4 f | c4 d e f |
17       c4 r e f | c4 r e f | c4 r a r | a a r a |
18       a2 \property Voice.soloADue = ##f a |
19     }
20     \context Thread=two\relative c'' {
21       g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d
22       c r e r | r2 s2 | a,4 r a r | a r r a |
23       a2 \property Voice.soloADue = ##f a |
24     }
25   >>
26   \paper{
27         raggedright = ##t
28     linewidth = 80 * \staffspace
29     \translator{
30       \ThreadContext
31       \consists Rest_engraver
32     }
33     \translator{
34       \VoiceContext
35       \remove Rest_engraver
36     }
37   }
38 }
39
40