]> git.donarmstrong.com Git - lilypond.git/blob - ly/arabic.ly
Web-ja: update introduction
[lilypond.git] / ly / arabic.ly
1 %%%% Definitions for writing modern Arabic music scores
2 %%%% This file is part of LilyPond, the GNU music typesetter.
3 %%%%
4 %%%% Copyright (C) 2017 Amir Czwink <amir130@hotmail.de>
5 %%%% Copyright (C) 2008 Neil Puttock
6 %%%%
7 %%%% LilyPond is free software: you can redistribute it and/or modify
8 %%%% it under the terms of the GNU General Public License as published by
9 %%%% the Free Software Foundation, either version 3 of the License, or
10 %%%% (at your option) any later version.
11 %%%%
12 %%%% LilyPond is distributed in the hope that it will be useful,
13 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
14 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 %%%% GNU General Public License for more details.
16 %%%%
17 %%%% You should have received a copy of the GNU General Public License
18 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
19 \version "2.18.2"
20 \language "italiano" %Arabs usually use italian note names
21
22 % Modern Arabic scores are written using a 24-TET tonal system.
23 % The accidental that lowers by a quarter is however the slashed flat, not the
24 % mirrored one lilypond uses by default.
25 TwentyFourTETglyphs = #'(
26     (0 . "accidentals.natural")
27     (-1/2 . "accidentals.flat")
28     (1/2 . "accidentals.sharp")
29
30     (3/4 . "accidentals.sharp.slashslash.stemstemstem")
31     (1/4 . "accidentals.sharp.slashslash.stem")
32     (-1/4 . "accidentals.flat.slash")
33     (-3/4 . "accidentals.mirroredflat.flat")
34
35     (1 . "accidentals.doublesharp")
36     (-1 . "accidentals.flatflat")
37 )
38
39 %
40 % Arabic maqamat ordered by maqam family
41 %
42
43 % Bayati family
44 bayati = #`(
45     (0 . ,NATURAL)
46     (1 . ,SEMI-FLAT)
47     (2 . ,FLAT)
48     (3 . ,NATURAL)
49     (4 . ,NATURAL)
50     (5 . ,FLAT)
51     (6 . ,FLAT)
52   )
53
54 % Hijaz family
55 hijaz = #`(
56     (0 . ,NATURAL)
57     (1 . ,FLAT)
58     (2 . ,NATURAL)
59     (3 . ,NATURAL)
60     (4 . ,NATURAL)
61     (5 . ,FLAT)
62     (6 . ,FLAT)
63 )
64
65 hijaz_kar = #`(
66     (0 . ,NATURAL)
67     (1 . ,FLAT)
68     (2 . ,NATURAL)
69     (3 . ,NATURAL)
70     (4 . ,NATURAL)
71     (5 . ,FLAT)
72     (6 . ,NATURAL)
73 )
74
75 % Kurd/Kurdi family
76 kurd = #`(
77     (0 . ,NATURAL)
78     (1 . ,FLAT)
79     (2 . ,FLAT)
80     (3 . ,NATURAL)
81     (4 . ,NATURAL)
82     (5 . ,FLAT)
83     (6 . ,FLAT)
84 )
85
86 % Rast family
87 rast = #`(
88     (0 . ,NATURAL)
89     (1 . ,NATURAL)
90     (2 . ,SEMI-FLAT)
91     (3 . ,NATURAL)
92     (4 . ,NATURAL)
93     (5 . ,NATURAL)
94     (6 . ,SEMI-FLAT)
95   )
96
97 % Sikah family
98 sikah = #`(
99     (0 . ,NATURAL)
100     (1 . ,SEMI-FLAT)
101     (2 . ,SEMI-FLAT)
102     (3 . ,SEMI-SHARP)
103     (4 . ,NATURAL)
104     (5 . ,SEMI-FLAT)
105     (6 . ,SEMI-FLAT)
106   )
107
108 iraq = #`(
109     (0 . ,NATURAL)
110     (1 . ,SEMI-FLAT)
111     (2 . ,SEMI-FLAT)
112     (3 . ,NATURAL)
113     (4 . ,SEMI-FLAT)
114     (5 . ,SEMI-FLAT)
115     (6 . ,SEMI-FLAT)
116   )
117
118
119
120
121 % Layout settings
122 \layout {
123   \context {
124     \Score
125
126     \override Accidental.glyph-name-alist = \TwentyFourTETglyphs
127     \override KeySignature.glyph-name-alist = \TwentyFourTETglyphs
128
129     keyAlterationOrder =
130       #`(
131         (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT)
132         (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
133         (6 . ,SEMI-FLAT) (2 . ,SEMI-FLAT) (5 . ,SEMI-FLAT ) (1 . ,SEMI-FLAT)
134         (4 . ,SEMI-FLAT) (0 . ,SEMI-FLAT) (3 . ,SEMI-FLAT)
135         (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP)
136         (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
137         (3 . ,SEMI-SHARP) (0 . ,SEMI-SHARP) (4 . ,SEMI-SHARP)
138         (1 . ,SEMI-SHARP)
139         (5 . ,SEMI-SHARP) (2 . ,SEMI-SHARP) (6 . ,SEMI-SHARP)
140         (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT )
141         (1 . ,DOUBLE-FLAT)
142         (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
143         (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP)
144         (1 . ,DOUBLE-SHARP)
145         (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
146         )
147     }
148 }
149
150
151
152
153
154
155
156 %%%%%%%
157 % Amir Czwink: I left this for backward compatibility but it is
158 % basically useless...
159 % The \dwn command is totally impractical and cumbersome, as one has to write
160 % the \dwn command in front of any quarter tone, and also it does not work
161 % for key signatures.
162 %
163 %
164 % Definition of "dwn" symbol in order to draw the half flat symbol
165 % that is more often used in Arabic music (A b with a slash across),
166 % rather than the reverse b symbol that is used by LilyPond.
167 % The method was contributed by Valentin Villenave on the LilyPond Forum
168 %
169 % http://www.mail-archive.com/lilypond-user@gnu.org/msg34244.html
170 %
171 % Exchange on 17 January 2008
172 %
173 % Updated based on email advice 10 July 2008, by Neil Puttock
174 %
175 %
176 % Example
177 %
178 % dod dob dosd \dwn dob dobsb dodsd do
179 %
180
181 dwn = {
182   \once \override Voice.Accidental.stencil = #(lambda (grob)
183   (ly:stencil-combine-at-edge
184     (ly:accidental-interface::print grob) Y UP
185     (grob-interpret-markup grob (markup #:line
186           (#:fontsize -1 (#:musicglyph "flags.ugrace")))) -1.3))
187 }