Use scalar instead of embedded_scm for context mod overrides.
[lilypond/mpolesky.git] / ly / makam.ly
blobc7f793d267754a244fb0776539d256105d01cf30
1 \version "2.12.0"
3 %{
5 Define 1/9 alterations.
7 %}
10 #(define-public EKSIK-IKI 5/18)
11 #(define-public EKSIK-UC 6/18)
13 #(define-public KOMA 1/9)
14 #(define-public BAKIYE 4/9)
15 #(define-public KUCUK 5/9)
16 #(define-public BUYUKMUCENNEB 8/9)
20 Define pitch names
24 makamPitchNames = #`(
25 (c . ,(ly:make-pitch -1 0 NATURAL))
26 (d . ,(ly:make-pitch -1 1 NATURAL))
27 (e . ,(ly:make-pitch -1 2 NATURAL))
28 (f . ,(ly:make-pitch -1 3 NATURAL))
29 (g . ,(ly:make-pitch -1 4 NATURAL))
30 (a . ,(ly:make-pitch -1 5 NATURAL))
31 (b . ,(ly:make-pitch -1 6 NATURAL))
33 (cc . ,(ly:make-pitch -1 0 KOMA))
34 (dc . ,(ly:make-pitch -1 1 KOMA))
35 (ec . ,(ly:make-pitch -1 2 KOMA))
36 (fc . ,(ly:make-pitch -1 3 KOMA))
37 (gc . ,(ly:make-pitch -1 4 KOMA))
38 (ac . ,(ly:make-pitch -1 5 KOMA))
39 (bc . ,(ly:make-pitch -1 6 KOMA))
41 (cb . ,(ly:make-pitch -1 0 BAKIYE))
42 (db . ,(ly:make-pitch -1 1 BAKIYE))
43 (eb . ,(ly:make-pitch -1 2 BAKIYE))
44 (fb . ,(ly:make-pitch -1 3 BAKIYE))
45 (gb . ,(ly:make-pitch -1 4 BAKIYE))
46 (ab . ,(ly:make-pitch -1 5 BAKIYE))
47 (bb . ,(ly:make-pitch -1 6 BAKIYE))
49 (ck . ,(ly:make-pitch -1 0 KUCUK))
50 (dk . ,(ly:make-pitch -1 1 KUCUK))
51 (ek . ,(ly:make-pitch -1 2 KUCUK))
52 (fk . ,(ly:make-pitch -1 3 KUCUK))
53 (gk . ,(ly:make-pitch -1 4 KUCUK))
54 (ak . ,(ly:make-pitch -1 5 KUCUK))
55 (bk . ,(ly:make-pitch -1 6 KUCUK))
57 (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))
58 (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))
59 (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))
60 (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))
61 (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))
62 (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))
63 (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
65 ;; f for flat.
66 (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
67 (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
68 (efc . ,(ly:make-pitch -1 2 (- KOMA)))
69 (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
70 (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
71 (afc . ,(ly:make-pitch -1 5 (- KOMA)))
72 (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
74 (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
75 (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
76 (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
77 (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
78 (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
79 (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
80 (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
82 (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
83 (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
84 (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
85 (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
86 (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
87 (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
88 (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
90 (cfi . ,(ly:make-pitch -1 0 (- EKSIK-IKI)))
91 (dfi . ,(ly:make-pitch -1 1 (- EKSIK-IKI)))
92 (efi . ,(ly:make-pitch -1 2 (- EKSIK-IKI)))
93 (ffi . ,(ly:make-pitch -1 3 (- EKSIK-IKI)))
94 (gfi . ,(ly:make-pitch -1 4 (- EKSIK-IKI)))
95 (afi . ,(ly:make-pitch -1 5 (- EKSIK-IKI)))
96 (bfi . ,(ly:make-pitch -1 6 (- EKSIK-IKI)))
98 (cfu . ,(ly:make-pitch -1 0 (- EKSIK-UC)))
99 (dfu . ,(ly:make-pitch -1 1 (- EKSIK-UC)))
100 (efu . ,(ly:make-pitch -1 2 (- EKSIK-UC)))
101 (ffu . ,(ly:make-pitch -1 3 (- EKSIK-UC)))
102 (gfu . ,(ly:make-pitch -1 4 (- EKSIK-UC)))
103 (afu . ,(ly:make-pitch -1 5 (- EKSIK-UC)))
104 (bfu . ,(ly:make-pitch -1 6 (- EKSIK-UC)))
107 (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
108 (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
109 (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
110 (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
111 (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
112 (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
113 (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
118 %% set pitch names.
119 pitchnames = \makamPitchNames
120 #(ly:parser-set-note-names parser makamPitchNames)
122 #(define eksikMirroredSlashedFlat
123 (if (defined? 'eksikMirroredSlashedFlat)
124 eksikMirroredSlashedFlat #f))
126 makamGlyphs = #`((1 . "accidentals.doublesharp")
127 (8/9 . "accidentals.sharp.slashslashslash.stemstem")
128 (5/9 . "accidentals.sharp.slashslashslash.stem")
129 (4/9 . "accidentals.sharp")
130 (1/9 . "accidentals.sharp.slashslash.stem")
131 (0 . "accidentals.natural")
132 (-1/9 . "accidentals.mirroredflat")
133 (-5/18 . ,(if eksikMirroredSlashedFlat
134 "accidentals.mirroredflat.backslash"
135 "accidentals.mirroredflat"))
136 (-6/18 . ,(if eksikMirroredSlashedFlat
137 "accidentals.mirroredflat.backslash"
138 "accidentals.mirroredflat"))
139 (-4/9 . "accidentals.flat.slash")
140 (-5/9 . "accidentals.flat")
141 (-8/9 . "accidentals.flat.slashslash")
142 (-1 . "accidentals.flatflat"))
144 \layout {
145 \context {
146 \Score
147 \override KeySignature #'glyph-name-alist = \makamGlyphs
148 \override Accidental #'glyph-name-alist = \makamGlyphs
149 \override AccidentalCautionary #'glyph-name-alist = \makamGlyphs
150 \override TrillPitchAccidental #'glyph-name-alist = \makamGlyphs
151 \override AmbitusAccidental #'glyph-name-alist = \makamGlyphs