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