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