]> git.donarmstrong.com Git - lilypond.git/blob - input/bugs/text-dynamics.ly
release: 1.3.59
[lilypond.git] / input / bugs / text-dynamics.ly
1 \header{
2 Composer="Sergej Rachmaninov (1873-1943)";
3 Title="Elegie";
4 Subtitle="À Monsieur A. Arensky";
5 Opus="Opus 3 Nr 1";
6 Note="Small fragment to show Pedal and Dynamics problems";
7 Enteredby="JCN";
8 }
9
10 %
11 % Arg.  
12 % How to remove dynamics from Voice/Staff, but still show fingering?
13 % When Dynamic_engraver is removed, the Text_engraver happily engraves
14 % the dynamic markings.
15 % When the Text_engraver is removed, it can't engrave the fingerings.
16 %
17
18 global = \notes{
19         \key es \minor;
20         \time 4/4;
21 }
22
23 upperMusic = \context Voice\notes\relative c'' {
24         %1
25         R1
26         R1
27         r2 ges'2--~
28 }
29
30 upperDynamics = \context Voice\notes {
31         %1
32         s1\pp
33         s1
34         s2 s2\mf
35 }
36
37 upperFingering = \context Voice\notes {
38         %1
39         s1
40         s1
41         s2 s2-4
42 }
43
44 lowerMusic = \context Voice\notes\relative c {
45         %1
46         <es,8(es,> bes' ges' es' bes' es, ges,)bes,
47         <es,8(es,> bes' ges' es' bes' es, ges,)bes,
48         <es,8(es,> bes' ges' es' bes' es, ges,)bes,
49 }
50
51 lowerPedal = \context Voice\notes {
52         %1
53         %1
54         s8\unachorda\sustaindown s8 s4 s2
55         s8\sustaindown\sustainup s8 s4 s2
56         s8\sustaindown\sustainup s8 s4 s2\trechorde
57 }
58
59 lowerDynamics = \context Voice\notes {
60         %1
61 }
62
63 lowerFingering = \context Voice\notes {
64         %1
65         s8 s8-5 s-2 s-1 s-2 s-1 s-2 s
66         s1
67         s1
68 }
69
70 \score{
71         \context PianoStaff <
72                 \context UpperStaff=upper <
73                         \global
74                         \upperMusic
75                         \upperDynamics
76                         \upperFingering
77                         \lowerPedal
78                 >
79                 \context LowerStaff=lower <
80                         \global
81                         \clef bass;
82                         \lowerMusic
83                         \lowerPedal
84                         \lowerDynamics
85                         \lowerFingering
86                         \upperDynamics
87                 >
88         >
89         \paper{
90                 % Hmm
91                 \translator {
92                         \VoiceContext
93                         \remove "Piano_pedal_engraver";
94                         \remove "Dynamic_engraver";
95                         % AAAARGH!
96                         \remove "Text_engraver";
97                 }
98                 \translator {
99                         \StaffContext
100                         \name "UpperStaff";
101                         \consists "Dynamic_engraver";
102                         dynamicPadding = #3  % urg, in \pt
103                         dynamicMinimumSpace = #6  % urg, in \pt
104                 }
105                 \translator {
106                         \StaffContext
107                         \name "LowerStaff";
108                         \consists "Piano_pedal_engraver";
109                         startSustain = #"Ped."
110                         stopSustain = #"*"
111                         stopStartSustain = #"-P"
112                         startUnaChorda = #"una chorda"
113                         stopUnaChorda = #"tre chorde"
114                         textScriptPadding = #3.0
115                 }
116                 \translator {
117                         \PianoStaffContext
118                         \accepts "UpperStaff";
119                         \accepts "LowerStaff";
120                 }
121                 \translator {
122                         \ScoreContext
123                         timeSignatureStyle = #"C"
124                 }
125         }
126         \midi{
127                 % Zucht
128                 \translator {
129                         \StaffContext
130                         \name "UpperStaff";
131                 }
132                 \translator {
133                         \StaffContext
134                         \name "LowerStaff";
135                 }
136                 \translator {
137                         \ScoreContext
138                         \accepts "UpperStaff";
139                         \accepts "LowerStaff";
140                 }
141                 \tempo 4 = 88;
142         }
143 }
144