]> git.donarmstrong.com Git - lilypond.git/blob - input/bugs/dynamic-collide.ly
patch::: 1.3.132.jcn1
[lilypond.git] / input / bugs / dynamic-collide.ly
1 % dynamics should not collide with staff
2 % dynamics (of two voices) should not collide with eachother
3 % strange stem through beam bug in bar 8 on viola staff
4 % 1-staff-high brace should collapse
5
6 \header {
7 texidoc="Template for part-combining orchestral scores";
8 }
9
10
11 End = { \skip 1*8; }
12
13 violaI = \notes\relative c'' {
14   c1 \break c c c c\break
15         g4\p\< r r r8 g(|
16         )c,4 r r r8 c|
17         [\!f8\sf(\>as f as][f g d)\!g]|
18                 r [es'\p(c)es] r [d(bes)d]|
19
20
21 }
22 violaII = \notes\relative c'' {
23   c1 c c c c
24         g4\p\< r r r8 g(|
25         )c,4 r r r8 c|
26         [\!f8\sf(\>as f as][f g d)\!g]|
27         r [c\p(g)c] r [bes(g)bes]|
28 }
29
30
31 violoncello = \notes\relative c {
32   c4\< c c c 
33   \!c1\pp c c c
34         \property Voice.crescendoText = #"cresc."
35         \property Voice.crescendoSpanner = #'dashed-line
36   [g8\p\<(bes' g bes][d bes g)d~]|
37   [d8(a' fis a][d a fis)d]|
38   [\!f!8\sf\>(as f as][f g d)g]|
39   %75
40   \!c,4\p r d r|
41 }
42
43 contrabasso = \notes\relative c {
44   d8\< d d d  d d d d 
45   \!c1\ff c c c
46         \property Voice.crescendoText = #"cresc."
47         \property Voice.crescendoSpanner = #'dashed-line
48   g4\p\< r r r8 g(|
49   )c4 r r r8 c(|
50   \!)b1\sf|
51   c4\p r d r|
52 }
53
54 violeStaff =  \notes \context Staff = viole <
55  \context Voice=oneViole <
56                 \property Staff.instrument = #"Viola"
57                 \property Staff.instr = #"Vla."
58
59  \End
60  >
61  \context Voice=twoViole <
62                 \property Staff.instrument = #"Viola II"
63                 \property Staff.instr = #"Vla. II"
64  \End
65  >
66   \context Voice=oneViole \partcombine Voice
67     \context Thread=oneViole \violaI
68     \context Thread=twoViole \violaII
69 >
70
71 staffCombinePianoStaffProperties = {
72         \property PianoStaff.devNullThread = #'()
73         \property PianoStaff.soloADue = ##t
74         \property PianoStaff.soloText = #""
75         \property PianoStaff.soloIIText = #""
76         % This is non-conventional, but currently it is
77         % the only way to tell the difference.
78         \property PianoStaff.aDueText = #"\\`a2"
79         \property PianoStaff.splitInterval = #'(1 . 0)
80         \property PianoStaff.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
81 }
82
83
84 \score {
85   <
86   \context StaffGroup <
87   \violeStaff
88
89   \context PianoStaff = bassi_group \notes <
90     \staffCombinePianoStaffProperties
91     \context Staff=oneBassi < \clef bass;
92                 \property Staff.instrument = #'(lines
93                   "Violoncello" "    e" "Contrabasso")
94
95                 \property Staff.instr = #"Vc."
96                 \End >
97     \context Staff=twoBassi < \clef bass;
98                 \property Staff.instrument = #"Contrabasso"
99                 \property Staff.instr = #"Cb."
100
101     \End >
102   
103     \context Staff=oneBassi \partcombine Staff
104       \context Voice=oneBassi { \violoncello }
105       \context Voice=twoBassi { \contrabasso }
106  >
107 >
108  >
109   \paper {
110     % \paperSixteen
111     linewidth = 80 * \staffspace;
112     textheight = 200 * \staffspace;
113     \translator{
114       \ThreadContext
115       \consists "Rest_engraver";
116       
117       % Set value for engraver at thread level,
118       % to override the default that is set in ScoreContext
119       % for added engraver at Voice level
120       devNullThread = #'()
121     }
122     \translator{
123       \VoiceContext
124       \remove "Rest_engraver";    
125
126       % The staff combine (bassi part) needs a
127       % thread_devnull_engraver here.
128       % Instead of maintaining two separate hierarchies,
129       % we switch add it, but switch it off immideately.
130       % The staff combine parts switch it on.
131       % devNullThread = #'never
132       \consists "Thread_devnull_engraver";
133     }
134     \translator{
135       \HaraKiriStaffContext
136       \consists "Mark_engraver";
137     }
138     \translator {
139       \OrchestralScoreContext
140       skipBars = ##t
141       soloText = #"I."
142       soloIIText = #"II."
143       % By default, turn off the Thread_devnull_engraver
144       % at Voice level
145       devNullThread = #'never
146
147       % Hmm
148       currentBarNumber = #218
149       BarNumber \override #'padding = #3
150       RestCollision \override #'maximum-rest-count = #1
151       marginScriptHorizontalAlignment = #1
152       TimeSignature \override #'style = #'C
153     }
154   }
155 }
156