]> git.donarmstrong.com Git - lilypond.git/blob - input/test/part-combine.ly
98ab7f1221bb7fe92fb66ae422735cb7b741f5bf
[lilypond.git] / input / test / part-combine.ly
1 \version "1.3.146"
2
3 \header{
4 texidoc="
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
12 \score{
13   \context Staff = flauti <
14     \time 4/4
15     \context Voice=one \partcombine Voice
16     \context Thread=one \notes\relative c'' {
17       c4 d e f | b,4 d c d | r2 e4 f | c4 d e f |
18       c4 r e f | c4 r e f | c4 r a r | a a r a |
19       a2 \property Voice.soloADue = ##f a |
20     }
21     \context Thread=two \notes\relative c'' {
22       g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d
23       c r e r | r2 s2 | a,4 r a r | a r r a |
24       a2 \property Voice.soloADue = ##f a |
25     }
26   >
27   \paper{
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