]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/ly-examples/bach-schenker.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / ly-examples / bach-schenker.ly
1 % -*-coding: utf-8 -*-
2
3 \header{
4   composer = "J.S. Bach"
5   title = "Wenn wir in höchsten Nöten sein"
6   subtitle = "Analysis from Gene Biringer's Schenker Text, Ex. 5-27"
7 % "BWV641"
8   enteredby = "Kris Shaffer"
9 }
10
11 % See http://kris.shaffermusic.com/tech.html. for more information
12
13 % 'Add color...' sections are not the original author's, but added
14 % afterwards specifically for illustration in LilyPond's Documentation.
15
16 I = \once \override NoteColumn.ignore-collision = ##t
17
18 \version "2.19.21"
19
20 staffPiano = \new PianoStaff {
21   \set Score.timing = ##f
22   \set PianoStaff.followVoice = ##t
23   <<
24     \new Staff = "RH" { % Right hand
25       \clef treble
26       \key g \major
27       \relative {
28         \override Staff.NoteCollision.merge-differently-headed = ##t
29         <<
30           {
31             \override Beam.positions = #'(8 . 8)
32             \hide NoteHead
33             \override NoteHead.duration-log = #1
34             s1 b'8[^\markup {
35               \override #'(baseline-skip . 0.5)
36               % Add color to markup in top staff
37               \column { \with-color #red \small { ^ 3 } }
38             }
39             s4. s1 a8^\markup {
40               \override #'(baseline-skip . 0.5)
41               % Add color to markup in top staff
42               \column { \with-color #red \small { ^ 2 } }
43             }
44             s4. s2 g8]^\markup {
45               % Add color to markup in top staff
46               \override #'(baseline-skip . 0.5)
47               \column { \with-color #red \small { ^ 1 } }
48             }
49             s4.
50             \revert Beam.positions
51             \undo \hide NoteHead
52             \revert NoteHead.duration-log
53           }
54         \\
55           {
56             % Add color to both Dashed Slurs in top staff
57             \override Slur.color = #(x11-color "purple")
58             \hide Stem
59             s1
60             \once \override Slur.height-limit = #6
61             \once \override Slur.extra-offset = #'(1.25 . 0)
62             \slurDashed
63             \I b2_( s2
64             \once \hide NoteHead
65             b4) s
66             \once \override Slur.height-limit = #3.25
67             \once \override Slur.extra-offset = #'(.75 . 0)
68             a2_( s4
69             \once \hide NoteHead
70             a4) g2
71             \undo \hide Stem
72           }
73         \\
74           \override Staff.NoteCollision.merge-differently-headed = ##t
75           {
76             \override Beam.positions = #'(4 . -3.25)
77             \stemUp
78             g8[ s s4 s2
79             \stemDown
80             \once \hide NoteHead
81             \I b8] s8
82             \override Beam.positions = #'(3 . -2.25)
83             \stemUp
84             a8[ s s4
85             \stemDown
86             c8] s s2 s s
87           }
88         \\
89           {
90             % Add color to all remaining Slurs in top staff
91             \override Slur.color = #(x11-color "violet")
92             \override PhrasingSlur.color = #(x11-color "violet")
93             \hide Stem
94             \override Stem.length = #0
95             % Add color to text markups in top staff
96             g4_\( fis^(_\markup { \with-color #blue \tiny N } g)\)
97             a^(^\markup { \with-color #blue \tiny P } b2)
98             b4^(^\markup { \with-color #blue \tiny P }
99             \stemUp
100             \undo \hide Stem
101             \override Stem.length = #10
102             c8)^( s
103             \override Stem.length = #14
104             b4) s s
105             \override Stem.length = #0
106             \hide Stem
107             \once \override Slur.extra-offset = #'(0 . 0.35)
108             % Add color to remaining text markup in top staff
109             c4^\( b_(_\markup { \with-color #blue \tiny P } a)\) s2
110             \revert Stem.length
111           }
112         \\
113           {
114             \hide Stem
115             \hide NoteHead
116             \override Stem.length = #0
117             s1 s4 e4 s
118             \change Staff = "LH"
119             fis,4 s2
120             \undo \hide Stem
121             \undo \hide NoteHead
122             \revert Stem.length
123           }
124         \\
125           {
126             \hide Stem
127             \hide NoteHead
128             \override Stem.length = #0
129             s1 s s2
130             fis'4 s
131             \change Staff = "LH"
132             g,4 s s2
133             \undo \hide Stem
134             \undo \hide NoteHead
135             \revert Stem.length
136           }
137         >>
138         \bar "|."
139       }
140     }
141
142     \new Staff = "LH" { % Left hand
143       \clef bass
144       \key g \major
145       \relative c' {
146         \override Staff.NoteCollision.merge-differently-headed = ##t
147         <<
148           {
149             \override Beam.positions = #'(-8 . -8)
150             \hide NoteHead
151             \stemDown
152             % Add color to long beam text markups in bottom staff
153             \I g8[_\markup { \with-color #(x11-color 'LawnGreen) \bold I }
154             s4. s1 s s2
155             \I d8_\markup { \with-color #(x11-color 'LawnGreen) \bold V }
156             s4.
157             \I g,8]_\markup { \with-color #(x11-color 'LawnGreen) \bold I }
158             s4.
159             \revert Beam.positions
160             \undo \hide NoteHead
161           }
162         \\
163           {
164             \hide Stem
165             \stemDown
166             \override TextScript.extra-offset = #'(-11.75 . -12.25)
167             \I g'2 s1 s s2 \I d2 g,2
168             \undo \hide Stem
169           }
170         \\
171           {
172             % Add color to all single-note Slurs in bottom staff
173             \override Slur.color = #(x11-color "violet")
174             \hide Stem
175             \once \hide NoteHead
176             \override Stem.length = #0
177             g'4
178             \once \override TextScript.padding = #0.25
179             % Add color to text markups in bottom staff
180             a4_(^\markup { \with-color #blue \tiny P } b)
181             fis4^(^\markup { \with-color #blue \tiny P } e)
182             \once \hide NoteHead
183             \once \override Slur.height-limit = #1.5
184             % Add color to remaining text markup in bottom staff
185             c4^( d)^\markup { \with-color #blue \tiny N }
186             \once \hide NoteHead
187             \once \override Slur.extra-offset = #'(0 . 0.5)
188             \I fis,4_(
189             \undo \hide Stem
190             \override Stem.length = #10
191             \stemDown
192             g4) s
193             \once \override Slur.extra-offset = #'(0 . 0.25)
194             \I c8_( s
195             \hide Stem
196             \revert Stem.length
197             a4)
198             \once \hide NoteHead
199             \I d4^( d,4) s2
200           }
201         \\
202           {
203             % Add color to all two-note Slurs in bottom staff
204             \override Slur.color = #(x11-color "violet")
205             \hide Stem
206             \hide NoteHead
207             \I g'4^( s b) s2
208             \undo \hide Stem
209             \undo \hide NoteHead
210             \override Beam.positions = #'(-4 . 1)
211             \stemDown
212             c,8[ s s4
213             \stemUp
214             fis,8] s
215             \override Beam.positions = #'(1 . -4)
216             g8[ s
217             \stemDown
218             b8] s
219             \revert Beam.positions
220             \hide Stem
221             \hide NoteHead
222             c4^( s d4) s s2
223           }
224         \\
225           {
226             % Add color to four-note Slur in bottom staff
227             \override Slur.color = #(x11-color "violet")
228             \hide Stem
229             \hide NoteHead
230             \override Stem.length = #0
231             \stemDown
232             \once \override Slur.height-limit = #3
233             \once \override Slur.extra-offset = #'(0 . 0.25)
234             \I g4_( s2. e4) s2. s2 s1 s2
235             \undo \hide Stem
236             \undo \hide NoteHead
237           }
238         \\
239           {
240             % Add color to dashed Slur in bottom staff
241             \override Slur.color = #(x11-color "purple")
242             \hide Stem
243             \hide NoteHead
244             \slurDashed
245             \once \override Slur.height-limit = #6.0
246             \once \override Slur.extra-offset = #'(0.5 . -0.25)
247             \override Stem.length = #0
248             g4_( s2. s1 g,4) s s1 s2
249             \undo \hide Stem
250             \undo \hide NoteHead
251           }
252         >>
253         \bar "|."
254       }
255     }
256   >>
257 }
258
259 \score {
260   <<
261     \staffPiano
262   >>
263   \layout {
264     indent = 0.0
265     ragged-right = ##f
266     \context { \Staff \remove "Time_signature_engraver" }
267   }
268 }