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