1 %%%% Definitions for writing modern Arabic music scores
2 %%%% This file is part of LilyPond, the GNU music typesetter.
4 %%%% Copyright (C) 2017 Amir Czwink <amir130@hotmail.de>
5 %%%% Copyright (C) 2008 Neil Puttock
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.
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.
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/>.
20 \language "italiano" %Arabs usually use italian note names
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")
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")
35 (1 . "accidentals.doublesharp")
36 (-1 . "accidentals.flatflat")
40 % Arabic maqamat ordered by maqam family
126 \override Accidental.glyph-name-alist = \TwentyFourTETglyphs
127 \override KeySignature.glyph-name-alist = \TwentyFourTETglyphs
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)
139 (5 . ,SEMI-SHARP) (2 . ,SEMI-SHARP) (6 . ,SEMI-SHARP)
140 (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT )
142 (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
143 (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP)
145 (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
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.
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
169 % http://www.mail-archive.com/lilypond-user@gnu.org/msg34244.html
171 % Exchange on 17 January 2008
173 % Updated based on email advice 10 July 2008, by Neil Puttock
178 % dod dob dosd \dwn dob dobsb dodsd do
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))