]> git.donarmstrong.com Git - lilypond.git/blob - ly/makam-init.ly
add Makam init file.
[lilypond.git] / ly / makam-init.ly
1 \header {
2
3   texidoc = "Makam is Turkish type of melody that uses 1/9 tone
4   microtonal alterations."
5
6 }
7
8
9 \version "2.11.6"
10
11 %{
12
13 Define 1/9 alterations.
14
15 %}
16
17  
18 #(define-public EKSIK-IKI 5/18)
19 #(define-public EKSIK-UC 6/18)
20
21 #(define-public KOMA 1/9)
22 #(define-public BAKIYE 4/9)
23 #(define-public KUCUK 5/9)
24 #(define-public BUYUKMUCENNEB 8/9)
25
26 %{
27
28 Define pitch names
29
30 %}
31
32 makamPitchNames = #`(
33   (c . ,(ly:make-pitch -1 0 NATURAL))
34   (d . ,(ly:make-pitch -1 1 NATURAL))
35   (e . ,(ly:make-pitch -1 2 NATURAL))
36   (f . ,(ly:make-pitch -1 3 NATURAL))
37   (g . ,(ly:make-pitch -1 4 NATURAL))
38   (a . ,(ly:make-pitch -1 5 NATURAL))
39   (b . ,(ly:make-pitch -1 6 NATURAL))
40   
41   (cc . ,(ly:make-pitch -1 0 KOMA))
42   (dc . ,(ly:make-pitch -1 1 KOMA))
43   (ec . ,(ly:make-pitch -1 2 KOMA))
44   (fc . ,(ly:make-pitch -1 3 KOMA))
45   (gc . ,(ly:make-pitch -1 4 KOMA))
46   (ac . ,(ly:make-pitch -1 5 KOMA))
47   (bc . ,(ly:make-pitch -1 6 KOMA))
48
49   (cb . ,(ly:make-pitch -1 0 BAKIYE))
50   (db . ,(ly:make-pitch -1 1 BAKIYE))
51   (eb . ,(ly:make-pitch -1 2 BAKIYE))
52   (fb . ,(ly:make-pitch -1 3 BAKIYE))
53   (gb . ,(ly:make-pitch -1 4 BAKIYE))
54   (ab . ,(ly:make-pitch -1 5 BAKIYE))
55   (bb . ,(ly:make-pitch -1 6 BAKIYE))
56
57   (ck . ,(ly:make-pitch -1 0 KUCUK))
58   (dk . ,(ly:make-pitch -1 1 KUCUK))
59   (ek . ,(ly:make-pitch -1 2 KUCUK))
60   (fk . ,(ly:make-pitch -1 3 KUCUK))
61   (gk . ,(ly:make-pitch -1 4 KUCUK))
62   (ak . ,(ly:make-pitch -1 5 KUCUK))
63   (bk . ,(ly:make-pitch -1 6 KUCUK))
64
65   (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
66   (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
67   (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
68   (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))
69   (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
70   (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
71   (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
72
73   ;; f for flat.
74   (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
75   (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
76   (efc . ,(ly:make-pitch -1 2 (- KOMA)))
77   (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
78   (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
79   (afc . ,(ly:make-pitch -1 5 (- KOMA)))
80   (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
81   
82   (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
83   (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
84   (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
85   (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
86   (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
87   (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
88   (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
89
90   (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
91   (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
92   (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
93   (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
94   (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
95   (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
96   (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
97   
98   (cfi . ,(ly:make-pitch -1 0 (- EKSIK-IKI)))
99   (dfi . ,(ly:make-pitch -1 1 (- EKSIK-IKI)))
100   (efi . ,(ly:make-pitch -1 2 (- EKSIK-IKI)))
101   (ffi . ,(ly:make-pitch -1 3 (- EKSIK-IKI)))
102   (gfi . ,(ly:make-pitch -1 4 (- EKSIK-IKI)))
103   (afi . ,(ly:make-pitch -1 5 (- EKSIK-IKI)))
104   (bfi . ,(ly:make-pitch -1 6 (- EKSIK-IKI)))
105
106   (cfu . ,(ly:make-pitch -1 0 (- EKSIK-UC)))
107   (dfu . ,(ly:make-pitch -1 1 (- EKSIK-UC)))
108   (efu . ,(ly:make-pitch -1 2 (- EKSIK-UC)))
109   (ffu . ,(ly:make-pitch -1 3 (- EKSIK-UC)))
110   (gfu . ,(ly:make-pitch -1 4 (- EKSIK-UC)))
111   (afu . ,(ly:make-pitch -1 5 (- EKSIK-UC)))
112   (bfu . ,(ly:make-pitch -1 6 (- EKSIK-UC)))
113   
114   
115   (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
116   (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
117   (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
118   (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
119   (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
120   (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
121   (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
122
123 )
124
125
126 %% set pitch names.
127 pitchnames = \makamPitchNames 
128 #(ly:parser-set-note-names parser makamPitchNames)
129
130 \paper
131 {
132   ragged-right = ##t
133 }
134
135 eksikMirroredSlashedFlat = ##f
136
137 makamGlyphs = #`((1 . "accidentals.doublesharp")
138        (8/9 . "accidentals.sharp.slashslashslash.stemstem")
139        (5/9 . "accidentals.sharp.slashslashslash.stem")
140        (4/9 . "accidentals.sharp")
141        (1/9 . "accidentals.sharp.slashslash.stem")
142        (0 . "accidentals.natural")
143        (-1/9 . "accidentals.mirroredflat")
144        (-5/18 . ,(if eksikMirroredSlashedFlat
145                  "accidentals.mirroredflat.backslash"
146                  "accidentals.mirroredflat"))
147        (-6/18 . ,(if eksikMirroredSlashedFlat
148                  "accidentals.mirroredflat.backslash"
149                  "accidentals.mirroredflat"))
150        (-4/9 . "accidentals.flat.slash")
151        (-5/9 . "accidentals.flat")
152        (-8/9 . "accidentals.flat.slashslash")
153        (-1 . "accidentals.flatflat"))
154
155 \relative {
156
157   %{ define alteration <-> symbol mapping. The following glyphs are available.
158
159   accidentals.sharp 
160   accidentals.sharp.slashslash.stem 
161   accidentals.sharp.slashslashslash.stemstem 
162   accidentals.sharp.slashslashslash.stem 
163   accidentals.sharp.slashslash.stemstemstem 
164   accidentals.natural 
165   accidentals.flat 
166   accidentals.flat.slash 
167   accidentals.flat.slashslash 
168   accidentals.mirroredflat.flat 
169   accidentals.mirroredflat 
170   accidentals.flatflat 
171   accidentals.flatflat.slash 
172   accidentals.doublesharp 
173
174   %}
175
176   \override Accidental #'glyph-name-alist =  \makamGlyphs
177   
178   \override Staff.KeySignature #'glyph-name-alist = \makamGlyphs
179   \set Staff.keySignature =  #'(
180     (3 .  4/9)
181     (6 . -1/9))
182   
183   c cc db fk gbm gfc gfb efk dfbm
184 }