]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/fretted-headword.ly
Imported Upstream version 2.14.2
[lilypond.git] / Documentation / snippets / new / fretted-headword.ly
1 % INSPIRATIONAL HEADER FOR LILYPOND DOCUMENTATION fretted-strings %
2 % Passage from Johann Kaspar Mertz "Opern Revue, Op. 8, no. 17"   %
3 % on melodies from Bellini's "Norma"                              %
4 %*****************************************************************%
5
6 \version "2.14.0"
7
8 #(set-global-staff-size 15)
9 \paper {
10   line-width = 17\cm
11   indent = 0\cm
12 }
13
14 \header {
15   lsrtags = "headwords"
16   texidoc = ""
17   doctitle = "headword"
18 }
19
20
21 \layout {
22   \context {
23     \Score
24     \remove "Bar_number_engraver"
25   }
26 }
27
28 %%%% shortcuts
29 % fingering orientations
30 sfol = \set fingeringOrientations = #'(left)
31 sfor = \set fingeringOrientations = #'(right)
32 sfod = \set fingeringOrientations = #'(down)
33 sfou = \set fingeringOrientations = #'(up)
34
35 % string number orientations
36 ssnol = \set stringNumberOrientations = #'(left)  %(down right up)
37 ssnou = \set stringNumberOrientations = #'(up)
38 ssnod = \set stringNumberOrientations = #'(down)
39 ssnor = \set stringNumberOrientations = #'(right)
40
41 % define fingering offset
42 FO = #(define-music-function (parser location offsetX offsetY) (number? number?)
43 #{
44   \once \override Voice.Fingering #'extra-offset = #(cons $offsetX $offsetY)
45 #})
46
47 % markups
48 rit = \markup \center-align { \bold { \italic { " rit." } } }
49 dimin = \markup \center-align { \italic { " dim." } }
50 andantino = \markup \left-align { \italic { \bold { \fontsize #2.5 { "Andantino" } } } }
51 benmarcato = \markup { \italic { \bold { "il canto ben marcato" } } }
52 pdolce = #(make-dynamic-script (markup #:line (#:dynamic "p" #:normal-text #:italic "dol.")))
53
54 %%% THE MUSIC %%%
55
56 melody = \relative c {
57   \clef "treble_8"
58   \key d \major
59   \time 4/4
60   \voiceOne
61   \sfol
62   e,32 a' c e
63   e, a c e
64   e,, a' c e
65   e, a c e
66   f4\rest <e'-4>4-> | % m. 1
67
68   e,,,32 gis' b e
69   e, gis b e
70   e,, gis' b e
71   e, gis b e
72   f4\rest \FO #'0.4 #'0.5 <gis-1 e'-4>4 | % m. 2
73
74   d4\rest <b e>-> d4\rest^\rit <b e>4-> | % m. 3
75   <gis b e>1 | % m. 4
76
77   \bar "||"
78   \key a \minor
79   R1 % m. 5
80
81   e'4^\benmarcato e8. d16-4
82   d4-4 \times 2/3 { \sfou \FO #'-0.3 #'0.6 <c-2>4 b8 } | % end of m. 6
83
84   \FO #'-0.3 #'0.3
85   <a-3>4 \times 2/3 { c4 b8 } a4 e'8. e16 | % m. 7
86
87   \FO #'-0.3 #'0.3
88   <g-4>4 \times 2/3 { \sfol \FO #'0.3 #'0.0 <f-1>4 e8 } e4  % beg of m. 8
89   \times 2/3 { \sfou <d-4>4 c8 } | % end of m. 8
90
91   b4 \times 2/3 { d4-4 c8 } \sfou \FO #'-1.7 #'-1.5 <b-0>4 e | % end of m. 9
92
93   e4 e8. d16-4 d4 \times 2/3 { c4 b8 } | % m. 10
94
95   \times 2/3 { a4 a8 b4 c8 } % beg of m. 11
96   \sfou \FO #'-0.3 #'0.3
97   <d-4>4^\< \times 2/3 { e4 <d f>8\! } | % end of m. 11
98 }
99
100 bass = \relative c {
101   \key d \major
102   \time 4/4
103   \voiceTwo
104
105   e,8\fp[ e'] e,[ e'] e, \sfol <c''-1> <a'-2> c, | % m. 1
106
107   e,,8\fp[ e'] e,[ e'] e, \sfod \FO #'0.2 #'-0.2 <b''-1>  % beg m. 2
108   \sfol \FO #'0.3 #'0.0 <e-1> b | % end m. 2
109
110   e,,8 e' gis e e, e' gis_\dimin e | % m. 3
111
112   e,1 | % m. 4
113
114   %% new section starts here in A minor
115   \set Score.beamExceptions = #'()
116   \once \override TextScript #'staff-padding = #1.7
117   \times 2/3 { a8\p^\andantino e' a c a e a, e' a c a e } | % m. 5
118
119   \times 2/3 { a,8\pdolce e' a c a e } % beg m. 6
120   \times 2/3 { e,8 \sfou <e'-3> <gis-1> c gis e } | % end m. 6
121
122   \times 2/3 { a,8 <e'-2> a c e, b' a, e' a c a e } | % m. 7
123
124   \times 2/3 { f,8 f' a \sfol \FO #'0.3 #'-0.5 <d-4> a f fis, d' a' d a d, } | % m. 8
125
126   \times 2/3 { <g,-3>8 d' g d' g, d % beg m. 9
127     \sfod \FO #'0.0 #'-2.0 <gis,-4> \sfou <e'-2> <gis-1> b gis e } | % end m. 9
128
129   \times 2/3 { a,8 e' a c a e e, e' gis c gis e } | % m. 10
130
131   \times 2/3 { a,8 e' a b a e f, f' a d a f } | % m. 11
132 }
133
134 \score {
135   \new Staff = "guitar" <<
136     \context Voice = "upper" { \melody }
137     \context Voice = "lower" { \bass }
138   >>
139   \layout {
140     \context {
141       \Score
142       \override Fingering #'staff-padding = #'()
143       \override TupletNumber #'stencil = ##f
144       \override TupletBracket #'bracket-visibility = ##f
145     }
146   }
147   \midi { }
148 }