]> git.donarmstrong.com Git - lilypond.git/blob - ly/bagpipe.ly
(Piano templates): change
[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.4 2005/08/19 18:18:02 hanwen Exp $
10 %}
11
12 \version "2.6.0"
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 #'print-function = ##f
42   \set Staff.extraNatural = ##f
43   \key d \major
44   #(set-accidental-style 'forget)
45 }
46 showKeySignature = {
47   % Show the key signature e.g. for BMW compatibility.
48   \override Staff.KeySignature #'print-function = #'Key_signature_interface::print
49   \set Staff.extraNatural = ##f
50   \key d \major
51   #(set-accidental-style 'forget)
52 }
53
54 % Layout tweaks.
55
56 %{
57
58 % WTF is this? --hwn
59 \layout {
60   \context {
61     \Voice
62     % All stems go down.
63     \stemDown
64     % All slurs and ties are on top.
65     \slurUp
66     \tieUp
67   }
68 }
69
70 %}
71
72 % Some common timing tweaks.
73
74 % Sets the autobeamer to span quarter notes only. Use for fast music.
75 % TODO: Needs more tweaking
76 quarterBeaming = {
77   #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
78   #(override-auto-beam-setting '(end * * * *) 1 2 'Staff)
79   #(override-auto-beam-setting '(end * * * *) 3 4 'Staff)
80   #(override-auto-beam-setting '(end * * * *) 4 4 'Staff)
81   #(revert-auto-beam-setting '(end 1 32 2 4 ) 1 8 'Staff)
82   #(revert-auto-beam-setting '(end 1 32 2 4 ) 3 8 'Staff)
83   #(revert-auto-beam-setting '(end 1 32 4 4 ) 1 8 'Staff)
84   #(revert-auto-beam-setting '(end 1 32 4 4 ) 3 8 'Staff)
85   #(revert-auto-beam-setting '(end 1 32 4 4 ) 5 8 'Staff)
86   #(revert-auto-beam-setting '(end 1 32 4 4 ) 7 8 'Staff)
87 }
88 halfBeaming = {
89   #(override-auto-beam-setting '(end * * 2 2) 1 2 'Staff)
90   #(override-auto-beam-setting '(end * * 2 2) 2 2 'Staff)
91 }
92 % Reels are in allabreve time with half note beaming.
93 reelTime = {
94   \time 2/2
95   \halfBeaming
96 }
97 % 4/4 marches are written with numerical time signature and with quarter beaming.
98 marchTime = {
99   \time 4/4
100   \override Staff.TimeSignature #'style = #'()
101   \quarterBeaming
102 }
103
104 % Single grace notes
105 grG = { \grace { \small G32 } }
106 gra = { \grace { \small a32 } }
107 grb = { \grace { \small b32 } }
108 grc = { \grace { \small c32 } }
109 grd = { \grace { \small d32 } }
110 gre = { \grace { \small e32 } }
111 grf = { \grace { \small f32 } }
112 grg = { \grace { \small g32 } }
113 grA = { \grace { \small A32 } }
114
115 % Doublings
116 dblG = { \grace { \small g32[ G d] } }
117 dbla = { \grace { \small g32[ a d] } }
118 dblb = { \grace { \small g32[ b d] } }
119 dblc = { \grace { \small g32[ c d] } }
120 dbld = { \grace { \small g32[ d e] } }
121 dble = { \grace { \small g32[ e f] } }
122 dblf = { \grace { \small g32[ f g] } }
123 % These are the same as the half doublings.
124 dblg = { \grace { \small g32[ f] } }
125 dblA = { \grace { \small A32[ g] } }
126
127 % Half doublings
128 hdblG = { \grace { \small G32[ d] } }
129 hdbla = { \grace { \small a32[ d] } }
130 hdblb = { \grace { \small b32[ d] } }
131 hdblc = { \grace { \small c32[ d] } }
132 hdbld = { \grace { \small d32[ e] } }
133 hdble = { \grace { \small e32[ f] } }
134 hdblf = { \grace { \small f32[ g] } }
135 hdblg = { \grace { \small g32[ f] } }
136 hdblA = { \grace { \small A32[ g] } }
137
138 % Thumb doublings
139 tdblG = { \grace { \small A32[ G d] } }
140 tdbla = { \grace { \small A32[ a d] } }
141 tdblb = { \grace { \small A32[ b d] } }
142 tdblc = { \grace { \small A32[ c d] } }
143 tdbld = { \grace { \small A32[ d e] } }
144 tdble = { \grace { \small A32[ e f] } }
145 tdblf = { \grace { \small A32[ f g] } }
146 tdblg = { \grace { \small A32[ g f] } }
147
148 % Shakes
149 % A few of these can't really be played and are here only for consistency.
150 shakea = { \grace { \small g32[ a d a G] } }
151 shakeb = { \grace { \small g32[ b d b G] } }
152 shakec = { \grace { \small g32[ c d c G] } }
153 shaked = { \grace { \small g32[ d e d G] } }
154 shakee = { \grace { \small g32[ e f e a] } }
155 shakef = { \grace { \small g32[ f g f a] } }
156 shakeg = { \grace { \small A32[ f g a] } }
157 shakeA = { \grace { \small A32[ g A a] } }
158
159 % Half shakes
160 hshakea = { \grace { \small a32[ d a G] } }
161 hshakeb = { \grace { \small b32[ d b G] } }
162 hshakec = { \grace { \small c32[ d c G] } }
163 hshaked = { \grace { \small d32[ e d G] } }
164 hshakee = { \grace { \small e32[ f e a] } }
165 hshakef = { \grace { \small f32[ g f a] } }
166 hshakeg = { \grace { \small g32[ f g a] } }
167 hshakeA = { \grace { \small A32[ g A a] } }
168
169 % Thumb shakes
170 tshakea = { \grace { \small A32[ a d a G] } }
171 tshakeb = { \grace { \small A32[ b d b G] } }
172 tshakec = { \grace { \small A32[ c d c G] } }
173 tshaked = { \grace { \small A32[ d e d G] } }
174 tshakee = { \grace { \small A32[ e f e a] } }
175 tshakef = { \grace { \small A32[ f g f a] } }
176 tshakeg = { \grace { \small A32[ f g a] } }
177 tshakeA = { \grace { \small A32[ g A a] } }
178
179 % Slurs
180 % A few of these can't really be played and are here only for consistency.
181 slura = { \grace { \small g32[ a G] } }
182 slurb = { \grace { \small g32[ b G] } }
183 slurc = { \grace { \small g32[ c G] } }
184 slurd = { \grace { \small g32[ d G] } }
185 slure = { \grace { \small g32[ e a] } }
186 slurf = { \grace { \small g32[ f a] } }
187 slurg = { \grace { \small A32[ f a] } }
188 slurA = { \grace { \small f32[ a] } }
189
190 % Half slurs
191 hslura = { \grace { \small a32[ G] } }
192 hslurb = { \grace { \small b32[ G] } }
193 hslurc = { \grace { \small c32[ G] } }
194 hslurd = { \grace { \small d32[ G] } }
195 hslure = { \grace { \small e32[ a] } }
196 hslurf = { \grace { \small f32[ a] } }
197 hslurg = { \grace { \small g32[ a] } }
198 hslurA = { \grace { \small A32[ a] } }
199
200 % Thumb slurs
201 tslura = { \grace { \small A32[ a G] } }
202 tslurb = { \grace { \small A32[ b G] } }
203 tslurc = { \grace { \small A32[ c G] } }
204 tslurd = { \grace { \small A32[ d a] } }
205 tslure = { \grace { \small A32[ e a] } }
206 tslurf = { \grace { \small A32[ f a] } }
207 tslurg = { \grace { \small A32[ f a] } }
208 tslurA = { \grace { \small f32[ a] } }
209
210 % Catches
211 catcha = { \grace { \small a32[ G d G] } }
212 catchb = { \grace { \small b32[ G d G] } }
213 catchc = { \grace { \small c32[ G d G] } }
214 catchd = { \grace { \small d32[ G b G] } }
215 catche = { \grace { \small e32[ G d G] } }
216
217 % G-grace catches
218 gcatcha = { \grace { \small g32[ a G d G] } }
219 gcatchb = { \grace { \small g32[ b G d G] } }
220 gcatchc = { \grace { \small g32[ c G d G] } }
221 gcatchd = { \grace { \small g32[ d G b G] } }
222 gcatche = { \grace { \small g32[ e G d G] } }
223
224 % Thumb catches
225 tcatcha = { \grace { \small A32[ a G d G] } }
226 tcatchb = { \grace { \small A32[ b G d G] } }
227 tcatchc = { \grace { \small A32[ c G d G] } }
228 tcatchd = { \grace { \small A32[ d G b G] } }
229 tcatche = { \grace { \small A32[ e G d G] } }
230
231 % Throws
232 thrwd     = { \grace { \small G32[ d c] } }
233 Gthrwd    = { \grace { \small d32[ c] } }
234 gripthrwd = { \grace { \small G32[ d G c] } }
235 thrwf     = { \grace { \small f32[ e g e] } }
236
237 % Birls
238 birl  = { \grace { \small a32[ G a G] } }
239 wbirl = { \grace { \small G32[ a G] } }
240 gbirl = { \grace { \small g32[ a G a G] } }
241 dbirl = { \grace { \small d32[ a G a G] } }
242
243 % Grips
244 grip  = { \grace { \small G32[ d G] } }
245 dgrip = { \grace { \small G32[ b G] } }
246 egrip = { \grace { \small G32[ e G] } }
247
248 % Taorluaths
249 taor    = { \grace { \small G32[ d G e] } }
250 dtaor   = { \grace { \small G32[ b G e] } }
251 Gtaor   = { \grace { \small d32[ G e] } }
252 taoramb = { \grace { \small G32[ d G b e] } }
253 taoramc = { \grace { \small G32[ d G c e] } }
254 taoramd = { \grace { \small G32[ d G c d e] } }
255
256 % Crunluaths
257 crun    = { \grace { \small G32[ d G e a f a ] } }
258 dcrun   = { \grace { \small G32[ b G e a f a ] } }
259 Gcrun   = { \grace { \small d32[ G e G f a ] } }
260 crunamb = { \grace { \small G32[ d G b e b f b ] } }
261 crunamc = { \grace { \small G32[ d G c e c f c ] } }
262 crunamd = { \grace { \small G32[ d G c d e d f d ] } }
263
264 % Special piobaireachd notations
265 grGcad  = { \grace { \small G16 } }
266 gracad  = { \grace { \small a16 } }
267 cad     = { \grace { \small g32[ e8 d32] } }
268 hcad    = { \grace { \small g32[ e8] } }
269 dre     = { \grace { \small e32[ a f a] } }
270 % This is the same as thrwf
271 dare    = { \grace { \small f32[ e g e] } }
272 bari    = { \grace { \small e32[ G f G] } }
273 dari    = { \grace { \small f32[ e g e f e] } }
274 pthrwd  = { \grace { \small G16[ d32 c] } }
275 darodo  = { \grace { \small G32[ d G c G] } }
276 Gdarodo = { \grace { \small d32[ G c G] } }
277 % Non-gracenote piobaireachd markup.
278 trebling = \markup { 
279   \override #'(baseline-skip . 0.3)
280   \column { 
281     \musicglyph #"scripts.tenuto" 
282     \musicglyph #"scripts.tenuto" 
283     \musicglyph #"scripts.tenuto" 
284   }
285 }
286 % Abbreviated notation common in piobaireachd scores.
287 % TODO: Make sure these are put on a fixed Y-position.
288 txtaor = \markup { "T" }
289 txcrun = \markup { "C" }
290 txtaorcrun = \markup { \column { "T" "C" } }
291 % TODO: These characters should be shown upside down.
292 % Use a postscript markup command for this.
293 txtaoram = \markup { "T" }
294 txcrunam = \markup { "C" }
295 txtaorcrunam = \markup { \column { "T" "C" } }