]> git.donarmstrong.com Git - lilypond.git/blob - input/test/part-combine-moments.ly
(conv): dashes rule.
[lilypond.git] / input / test / part-combine-moments.ly
1 #(ly:set-option 'old-relative)
2 \version "1.9.1"
3 % TODO: this example has a ton of text for very little output.
4 % Is it all needed?  -gp
5 % should this go to regression or be delete'd?   -gp
6 \header{ texidoc="@cindex Part Combine Moments
7 When you combine two voices with the same notes, you should
8 only have one stem. "
9 }
10
11 \score{
12         \context PianoStaff <
13                 \context StaffCombineStaff=one \skip 1*2
14                 \context StaffCombineStaff=two \skip 1*2
15                 \context StaffCombineStaff=one \partcombine StaffCombineStaff
16                         \context StaffCombineVoice=one \notes\relative c''
17                                 {
18                                         c4 d e f\break
19                                         c2 e4 f\break
20                                 }
21                         \context StaffCombineVoice=two \notes\relative c''
22                                 {
23                                         c4 d e f
24                                         c2 e2
25                                 }
26                 >
27         \paper {
28                 raggedright= ##t
29                 textheight = 295.0\mm
30                 linewidth = 180.0\mm
31
32                 \translator{ \RemoveEmptyStaffContext }
33                 %
34                 % The Voice combine hierarchy
35                 %
36                 \translator{
37                         \ThreadContext
38                         \name "VoiceCombineThread"
39                         \consists "Rest_engraver"
40                 }
41                 \translator{
42                         \VoiceContext
43                         \name "VoiceCombineVoice"
44                         soloText = #"I."
45                         soloIIText = #"II."
46                         \remove "Rest_engraver"
47                         \accepts "VoiceCombineThread"
48                 }
49                 \translator{
50                         \RemoveEmptyStaffContext
51                         \consists "Mark_engraver"
52                         \name "VoiceCombineStaff"
53                         \accepts "VoiceCombineVoice"
54                 }
55
56                 %
57                 % The Staff combine hierarchy
58                 %
59                 \translator{
60                         \ThreadContext
61                         \name "StaffCombineThread"
62                 }
63                 \translator{
64                         \VoiceContext
65                         \name "StaffCombineVoice"
66                         \accepts "StaffCombineThread"
67                         \consists "Thread_devnull_engraver"
68                 }
69                 \translator {
70                         \RemoveEmptyStaffContext
71                         \name "StaffCombineStaff"
72                         \accepts "StaffCombineVoice"
73
74                         soloADue = ##t
75                         soloText = #""
76                         soloIIText = #""
77                         aDueText = #""
78                         splitInterval = #'(1 . 0)
79                         changeMoment = #`(,(ly:make-moment 1 1) . ,(ly:make-moment 1 1))
80
81                 }
82                 \translator {
83                         \StaffGroupContext
84                         \accepts "VoiceCombineStaff"
85                         \accepts "StaffCombineStaff"
86                 }
87                 \translator{ \RemoveEmptyStaffContext }
88
89                 \translator {
90                         \ScoreContext
91                         \accepts "VoiceCombineStaff"
92                         \accepts "StaffCombineStaff"
93                         skipBars = ##t 
94
95                         RehearsalMark \override #'padding = #4
96                         BarNumber \override #'padding = #3
97                         TimeSignature \override #'style = #'C
98                         RestCollision \set #'maximum-rest-count = #1
99                 }
100         }
101 }
102