]> git.donarmstrong.com Git - lilypond.git/blob - input/test/part-combine.ly
release: 1.3.145
[lilypond.git] / input / test / part-combine.ly
1
2 \header{
3 texidoc="
4 In orchestral scores and hymns, voices are traditionally combined onto
5 one staff.  LilyPond has a part combiner, that combines or separates two
6 voices according to actual rhythm and pitch.  User-defined texts such as
7 ``solo'' and ``@`a2'' are typeset automagically, as appropriate.
8 ";
9 }
10
11 \score{
12   \context Staff = flauti <
13     \time 4/4;
14     \context Voice=one \partcombine Voice
15     \context Thread=one \notes\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 \notes\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     linewidth = 80 * \staffspace;
28     \translator{
29       \ThreadContext
30       \consists Rest_engraver;
31     }
32     \translator{
33       \VoiceContext
34       \remove Rest_engraver;
35     }
36   }
37 }
38