]> git.donarmstrong.com Git - lilypond.git/blob - ly/bagpipe.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / ly / bagpipe.ly
1 %{
2   Bagpipe music settings for LilyPond.
3   This file builds on work by Andrew McNabb (http://www.mcnabbs.org/andrew/)
4
5   Substantial changes and additions made by
6   Sven Axelsson, the Murray Pipes & Drums of Gothenburg
7   (http://www.murrays.nu)
8
9   $Id: bagpipe.ly,v 1.12 2006/03/16 14:39:46 hanwen Exp $
10 %}
11
12 \version "2.17.6"
13
14 % Notes of the scale of the Great Highland Bagpipe. Extra high notes for bombarde.
15 % Flat notes used mainly in some modern music.
16
17 pitchnamesBagpipe = #`(
18   (G . ,(ly:make-pitch 0 4 NATURAL))
19   (a . ,(ly:make-pitch 0 5 NATURAL))
20   (b . ,(ly:make-pitch 0 6 NATURAL))
21   (c . ,(ly:make-pitch 1 0 SHARP))
22   (cflat . ,(ly:make-pitch 1 0 FLAT))
23   (d . ,(ly:make-pitch 1 1 NATURAL))
24   (e . ,(ly:make-pitch 1 2 NATURAL))
25   (f . ,(ly:make-pitch 1 3 SHARP))
26   (fflat . ,(ly:make-pitch 1 3 FLAT))
27   (g . ,(ly:make-pitch 1 4 NATURAL))
28   (gflat . ,(ly:make-pitch 1 4 FLAT))
29   (A . ,(ly:make-pitch 1 5 NATURAL))
30   (B . ,(ly:make-pitch 1 6 NATURAL))
31   (C . ,(ly:make-pitch 2 0 SHARP))
32 )
33 pitchnames = \pitchnamesBagpipe
34 #(ly:parser-set-note-names parser pitchnames)
35
36 % Bagpipe music is written in something like D major. If we use
37 % flattened notes, the flat should be shown on all instances.
38
39 hideKeySignature = {
40   % We normally don't want to show the key signature.
41   \override Staff.KeySignature  #'stencil = ##f
42   \set Staff.extraNatural = ##f
43   \key d \major
44   \accidentalStyle forget
45 }
46 showKeySignature = {
47   % Show the key signature e.g. for BMW compatibility.
48   \override Staff.KeySignature  #'stencil = #ly:key-signature-interface::print
49   \set Staff.extraNatural = ##f
50   \key d \major
51   \accidentalStyle forget
52 }
53
54 % Layout tweaks.
55
56 \layout {
57   \context {
58     \Voice
59     % All stems go down.
60     \override Stem #'direction = #DOWN
61     % All slurs and ties are on top.
62     \override Slur #'direction = #UP
63     \override Tie #'direction = #UP
64   }
65 }
66
67 % Some common timing tweaks.
68
69 % Sets the autobeamer to span quarter notes only. Use for fast music.
70 quarterBeaming = {
71   \set Staff.beamExceptions = #'()
72 }
73 halfBeaming = {
74   \set Staff.beamExceptions = #'((end . (((1 . 8) . (4 4))
75                                          ((1 . 12) . (3 3)))))
76 }
77
78 % Reels are in allabreve time with half note beaming.
79 reelTime = {
80   \time 2/2
81   \halfBeaming
82 }
83 % 4/4 marches are written with numerical time signature and with quarter beaming.
84 marchTime = {
85   \time 4/4
86   \numericTimeSignature
87   \quarterBeaming
88 }
89
90 % Add appropriate tweaks needed for piping grace notes to look great.
91 stemspace = #(define-music-function (parser location extent) (pair?) #{
92   \once \override Staff.Stem #'X-extent = #extent
93 #})
94 pgrace = #(define-music-function (parser location notes) (ly:music?) #{
95   \override Score.GraceSpacing #'spacing-increment = #0
96   \override Score.Stem #'beamlet-max-length-proportion = #'(0.5 . 0.5)
97   \small \grace $notes \normalsize
98   \revert Score.Stem #'beamlet-default-length
99 #})
100
101 % Single grace notes
102 grG = { \pgrace { G32 } }
103 gra = { \pgrace { a32 } }
104 grb = { \pgrace { b32 } }
105 grc = { \pgrace { c32 } }
106 grd = { \pgrace { d32 } }
107 gre = { \pgrace { e32 } }
108 grf = { \pgrace { f32 } }
109 grg = { \pgrace { g32 } }
110 grA = { \pgrace { A32 } }
111
112 % Doublings
113 dblG = { \pgrace { g32[ G d] } }
114 dbla = { \pgrace { g32[ a d] } }
115 dblb = { \pgrace { g32[ b d] } }
116 dblc = { \pgrace { g32[ c d] } }
117 dbld = { \pgrace { g32[ d e] } }
118 dble = { \pgrace { g32[ e f] } }
119 dblf = { \pgrace { g32[ f g] } }
120 % These are the same as the half doublings.
121 dblg = { \pgrace { g32[ f] } }
122 dblA = { \pgrace { A32[ g] } }
123
124 % Half doublings
125 hdblG = { \pgrace { G32[ d] } }
126 hdbla = { \pgrace { a32[ d] } }
127 hdblb = { \pgrace { b32[ d] } }
128 hdblc = { \pgrace { c32[ d] } }
129 hdbld = { \pgrace { d32[ e] } }
130 hdble = { \pgrace { e32[ f] } }
131 hdblf = { \pgrace { f32[ g] } }
132 hdblg = { \pgrace { g32[ f] } }
133 hdblA = { \pgrace { A32[ g] } }
134
135 % Thumb doublings
136 tdblG = { \pgrace { A32[ G d] } }
137 tdbla = { \pgrace { A32[ a d] } }
138 tdblb = { \pgrace { A32[ b d] } }
139 tdblc = { \pgrace { A32[ c d] } }
140 tdbld = { \pgrace { A32[ d e] } }
141 tdble = { \pgrace { A32[ e f] } }
142 tdblf = { \pgrace { A32[ f g] } }
143 tdblg = { \pgrace { A32[ g f] } }
144
145 % Shakes
146 % A few of these can't really be played and are here only for consistency.
147 shakea = { \pgrace { g32[ a e a G] } }
148 shakeb = { \pgrace { g32[ b e b G] } }
149 shakec = { \pgrace { g32[ c e c G] } }
150 shaked = { \pgrace { g32[ d e d G] } }
151 shakee = { \pgrace { g32[ e f e a] } }
152 shakef = { \pgrace { g32[ f g f a] } }
153 shakeg = { \pgrace { A32[ f g a] } }
154 shakeA = { \pgrace { A32[ g A a] } }
155
156 % Half shakes
157 hshakea = { \pgrace { a32[ d a G] } }
158 hshakeb = { \pgrace { b32[ d b G] } }
159 hshakec = { \pgrace { c32[ d c G] } }
160 hshaked = { \pgrace { d32[ e d G] } }
161 hshakee = { \pgrace { e32[ f e a] } }
162 hshakef = { \pgrace { f32[ g f a] } }
163 hshakeg = { \pgrace { g32[ f g a] } }
164 hshakeA = { \pgrace { A32[ g A a] } }
165
166 % Thumb shakes
167 tshakea = { \pgrace { A32[ a d a G] } }
168 tshakeb = { \pgrace { A32[ b d b G] } }
169 tshakec = { \pgrace { A32[ c d c G] } }
170 tshaked = { \pgrace { A32[ d e d G] } }
171 tshakee = { \pgrace { A32[ e f e a] } }
172 tshakef = { \pgrace { A32[ f g f a] } }
173 tshakeg = { \pgrace { A32[ f g a] } }
174 tshakeA = { \pgrace { A32[ g A a] } }
175
176 % Slurs
177 % A few of these can't really be played and are here only for consistency.
178 slura  = { \pgrace { g32[ a G] } }
179 slurb  = { \pgrace { g32[ b G] } }
180 slurc  = { \pgrace { g32[ c G] } }
181 slurd  = { \pgrace { g32[ d G] } }
182 wslurd = { \pgrace { g32[ d c] } }
183 slure  = { \pgrace { g32[ e a] } }
184 slurf  = { \pgrace { g32[ f a] } }
185 slurg  = { \pgrace { A32[ f a] } }
186 slurA  = { \pgrace { f32[ a] } }
187
188 % Half slurs
189 hslura  = { \pgrace { a32[ G] } }
190 hslurb  = { \pgrace { b32[ G] } }
191 hslurc  = { \pgrace { c32[ G] } }
192 hslurd  = { \pgrace { d32[ G] } }
193 whslurd = { \pgrace { d32[ c] } }
194 hslure  = { \pgrace { e32[ a] } }
195 hslurf  = { \pgrace { f32[ a] } }
196 hslurg  = { \pgrace { g32[ a] } }
197 hslurA  = { \pgrace { A32[ a] } }
198
199 % Thumb slurs
200 tslura  = { \pgrace { A32[ a G] } }
201 tslurb  = { \pgrace { A32[ b G] } }
202 tslurc  = { \pgrace { A32[ c G] } }
203 tslurd  = { \pgrace { A32[ d G] } }
204 wtslurd = { \pgrace { A32[ d c] } }
205 tslure  = { \pgrace { A32[ e a] } }
206 tslurf  = { \pgrace { A32[ f a] } }
207 tslurg  = { \pgrace { A32[ f a] } }
208 tslurA  = { \pgrace { f32[ a] } }
209
210 % Catches
211 catcha = { \pgrace { a32[ G d G] } }
212 catchb = { \pgrace { b32[ G d G] } }
213 catchc = { \pgrace { c32[ G d G] } }
214 catchd = { \pgrace { d32[ G b G] } }
215 catche = { \pgrace { e32[ G d G] } }
216
217 % G-grace catches
218 gcatcha = { \pgrace { g32[ a G d G] } }
219 gcatchb = { \pgrace { g32[ b G d G] } }
220 gcatchc = { \pgrace { g32[ c G d G] } }
221 gcatchd = { \pgrace { g32[ d G b G] } }
222 gcatche = { \pgrace { g32[ e G d G] } }
223
224 % Thumb catches
225 tcatcha = { \pgrace { A32[ a G d G] } }
226 tcatchb = { \pgrace { A32[ b G d G] } }
227 tcatchc = { \pgrace { A32[ c G d G] } }
228 tcatchd = { \pgrace { A32[ d G b G] } }
229 tcatche = { \pgrace { A32[ e G d G] } }
230
231 % Triple strikes (BMW has them all, but I've never seen any but the A one used, so ...)
232 tripleA = { \pgrace { A32[ g A g A g] } }
233
234 % Throws
235 thrwd     = { \pgrace { G32[ d c] } }
236 Gthrwd    = { \pgrace { d32[ c] } }
237 gripthrwd = { \pgrace { G32[ d G c] } }
238 thrwe     = { \pgrace { e32[ a f a] } }
239 wthrwe    = { \pgrace { e32[ d f d] } }
240 thrwf     = { \pgrace { f32[ e g e] } }
241
242 % Birls
243 birl  = { \pgrace { a32[ G a G] } }
244 wbirl = { \pgrace { G32[ a G] } }
245 gbirl = { \pgrace { g32[ a G a G] } }
246 dbirl = { \pgrace { d32[ a G a G] } }
247
248 % Grips
249 grip  = { \pgrace { G32[ d G] } }
250 dgrip = { \pgrace { G32[ b G] } }
251 egrip = { \pgrace { G32[ e G] } }
252
253 % Taorluaths
254 taor    = { \pgrace { G32[ d G e] } }
255 taorjmd = { \pgrace { G32[ d a e] } }
256 taorold = { \pgrace { G32[ d G a e] } }
257 dtaor   = { \pgrace { G32[ b G e] } }
258 Gtaor   = { \pgrace { d32[ G e] } }
259 taoramb = { \pgrace { G32[ d G b e] } }
260 taoramc = { \pgrace { G32[ d G c e] } }
261 taoramd = { \pgrace { G32[ d G c d e] } }
262
263 % Crunluaths
264 crun    = { \pgrace { G32[ d G e a f a ] } }
265 dcrun   = { \pgrace { G32[ b G e a f a ] } }
266 Gcrun   = { \pgrace { d32[ G e G f a ] } }
267 crunamb = { \pgrace { G32[ d G b e b f b ] } }
268 crunamc = { \pgrace { G32[ d G c e c f c ] } }
269 crunamd = { \pgrace { G32[ d G c d e d f d ] } }
270 crunambfosg = { \pgrace { e32[ b f b ] } }
271 crunamcfosg = { \pgrace { e32[ c f c ] } }
272 crunamdfosg = { \pgrace { e32[ d f d ] } }
273
274 % Special piobaireachd notations
275 grGcad   = { \pgrace { G16 } }
276 gracad   = { \pgrace { a16 } }
277 cad      = { \pgrace { \stemspace #'(0 . 0.5) g32[ e8 d32] } }
278 hcad     = { \pgrace { \stemspace #'(0 . 0.5) g32[ e8] } }
279 tcad     = { \pgrace { e8[ d32] } }
280 thcad    = { \pgrace { e8 } }
281 % This is the same as thrwe
282 dre      = { \pgrace { e32[ a f a] } }
283 % This is the same as thrwf
284 dare     = { \pgrace { f32[ e g e] } }
285 bari     = { \pgrace { e32[ G f G] } }
286 dari     = { \pgrace { f32[ e g e f e] } }
287 pthrwd   = { \pgrace { G16[ d32 c] } }
288 darodo   = { \pgrace { G32[ d G c G] } }
289 Gdarodo  = { \pgrace { d32[ G c G] } }
290 pdarodo  = { \pgrace { G16[ d32 G c G16] } }
291 pGdarodo = { \pgrace { d32[ G c G16] } }
292 % Weird stuff from Joseph MacDonald’s book
293 fifteenthcutting     = { \pgrace { G32[ d a e a f a e a d] } }
294 fifteenthcuttingG    = { \pgrace { G32[ d a e G f G e G d] } }
295 Gfifteenthcutting    = { \pgrace { d32[ a e a f a e a d] } }
296 GfifteenthcuttingG   = { \pgrace { d32[ a e G f G e G d] } }
297 seventeenthcutting   = { \pgrace { G32[ d a e a f a e a d a c] } }
298 seventeenthcuttingG  = { \pgrace { G32[ d a e G f G e G d G c] } }
299 Gseventeenthcutting  = { \pgrace { d32[ a e a f a e a d a c] } }
300 GseventeenthcuttingG = { \pgrace { d32[ a e G f G e G d G c] } }
301 barluadh   = { \pgrace { G32[ d a e a f a e a d a c a b a e a f a] } }
302 barluadhG  = { \pgrace { G32[ d a e G f G e G d G c G b G e G f G] } }
303 Gbarluadh  = { \pgrace { d32[ a e a f a e a d a c a b a e a f a] } }
304 GbarluadhG = { \pgrace { d32[ a e G f G e G d G c G b G e G f G] } }
305 % Non-gracenote piobaireachd markup.
306 trebling = \markup {
307   \override #'(baseline-skip . 0.4)
308   \column {
309     \musicglyph #"scripts.tenuto"
310     \musicglyph #"scripts.tenuto"
311     \musicglyph #"scripts.tenuto"
312   }
313 }
314 % Abbreviated notation common in piobaireachd scores.
315 % TODO: Make sure these are put on a fixed Y-position.
316 txtaor = \markup { \center-align "T" }
317 txcrun = \markup { \center-align "C" }
318 txtaorcrun = \markup {
319   \override #'(baseline-skip . 1.8)
320   \column {
321     \center-align "T"
322     \center-align "C"
323   }
324 }
325 % Turn these upside down, as in the Kilberry book.
326 txtaoram = \markup { \center-align \scale #'(-1 . -1) "T" }
327 txcrunam = \markup { \center-align \scale #'(-1 . -1) "C" }
328 txtaorcrunam = \markup {
329   \override #'(baseline-skip . 1.8)
330   \column {
331     \center-align \scale #'(-1 . -1) "T"
332     \center-align \scale #'(-1 . -1) "C"
333   }
334 }