Torsten and everyone greetings,

RE: the key signatures for Turkish makam, I've made definitions for about
91 different makams like Rast, Hicaz, Segah, etc. These definitions are in
the turkish-makam.ly file, attached. We need each makam's key signature to:
1. look as they do in standard print (there are good reasons why some
accidentals are included while others not)
2. be fully transposable because, why not, that's why we're here :)

For 89 of the 91 key signatures defined, there are no problems which is
nice.

But so far for only these makams:
bestenigar
revnaknuma

I have issues in that the tonic of these makams is a microtone. In standard
Turkish notation, "fb" which is "f" 4k sharp
We need
\key fb \bestenigar

However, we don't want the "fb" accidental printed in the key signature.
Bestenigar needs a key signature that looks like saba which have a tonic of
"a" in Turkish notation. We DO want "fb" accidental printed in the score.
And we need it to be able to transpose... if we want
\key bfc \bestenigar

We don't want bfc in the key signature BUT yikes, we do need a bfk in the
key signature because

Attached is a shortish example showing that Rast and Segah transposition
works great and shows bestenigar and revnaknuma with the fb in the key
signature with two examples of what Bestenigar and Revnaknuma should look
like.

Would it be simple enough to tell lilypond:
"if the key signature is bestenigar or revnaknuma, don't print the tonic's
accidentals in the key signature. DO print them in the score.

The example needs turkish-makam.ly and regular.ly to work.

Thank you ahead and I hope I've presented everything clear enough.

Adam

Attachment: KeySigIssues.pdf
Description: Adobe PDF document

% Utilities to re-tune regular tunings.

% Use these functions to choose a different regular
% tuning, with fifths taken from some equal temperament,
% and accidentals scaled accordingly.

% Only equal temperaments are supported because Lilypond uses
% rational numbers to denote pitch alterations.
% If you don't want an equal temperament you can probably
% find one anyway that's close enough to what you want.

% to use, add
%
%     tuning = #31
%     \include "regular.ly"
%
% somewhere near the top of the file.  (After any language setting.)

% Resets Lilypond's "default scale" containing the pitch of each
% unaltered note (the C major scale).
#(define (retune-nominals ET)
    (ly:set-default-scale (ly:make-scale (list->vector
        (map (lambda (fifths octaves) (* 6
                  (+ (* fifths (best-fifth ET)) octaves)))
           '(0 2 4 -1 1 3 5) '(0 -1 -2 1 0 -1 -2))))))

% Finds the best size of fifth in the equal temperement with
% the given number of fifths to the octave.
% Note: the effective equal temperament may end up larger.
% For example, ask for 12 and "quartertones" will give you 24.
% If ET is a ratio, assume it describes the fifth, and return it.
#(define (best-fifth ET)
    (if (integer? ET)
        (/ (inexact->exact (round (* ET 0.5849625007))) ET)
        ET))

% Takes the association of pitch names and returns a
% new copy where each alteration has the correct value
% relative to fifths in the given equal temperament.
#(define (retuned-pitchnames pitchnames ET)
    (map (lambda (pitchname)
             (let ((pitch (cdr pitchname)))
                 (cons (car pitchname)
                     (ly:make-pitch
                         (ly:pitch-octave pitch)
                         (ly:pitch-notename pitch)
                         (scale-alteration (ly:pitch-alteration pitch) ET)))))
         pitchnames))

% Takes a list mapping alterations to glyphs
% and re-tunes the alterations according to the size of fifth
% in the given equal temperament.
#(define (retune-glyphs glyphs ET)
    (map (lambda (glyph) (cons (scale-alteration (car glyph) ET) (cdr glyph)))
         glyphs))

% Converts an alteration from the initial alteration size
% (that would give 12-equal) to the given equal temperament.
#(define (scale-alteration alteration ET)
    (* 12 alteration (- (* 7 (best-fifth ET)) 4)))

% Scale an explicit scale
#(define (scale-scale keysig ET)
    (map (lambda (note) (cons (car note) (scale-alteration (cdr note) ET)))
        keysig))

% Retune the standard scales (major/ionian has no alterations)
minor = #(scale-scale minor tuning)
locrian = #(scale-scale locrian tuning)
aeolian = #(scale-scale aeolian tuning)
mixolydian = #(scale-scale mixolydian tuning)
lydian = #(scale-scale lydian tuning)
phrygian = #(scale-scale phrygian tuning)
dorian = #(scale-scale dorian tuning)

% Set the innards
newglyphs = #(begin
    (retune-nominals tuning)
    (ly:parser-set-note-names (retuned-pitchnames pitchnames tuning))
    (retune-glyphs standard-alteration-glyph-name-alist tuning))

% Apply the new glyphs.
\layout {
  \context {
    \Score
    \override Accidental #'glyph-name-alist = \newglyphs
    \override KeySignature #'glyph-name-alist = \newglyphs
    \override AccidentalCautionary #'glyph-name-alist = \newglyphs
    \override TrillPitchAccidental #'glyph-name-alist = \newglyphs
    \override AmbitusAccidental #'glyph-name-alist = \newglyphs
  }
}

% Null function to work with scordablature
retune = #(define-music-function (ET midc m)
    (rational? integer? ly:music?) m)

%\version "2.19.82"
\version "2.18.2"

#(ly:set-option 'relative-includes #t)
\include "definitions.ily"


%{

% 53-ET alterations in terms of 12-ET whole tones.

%}

#(define-public KOMA 1/10)
#(define-public BAKIYE 4/10)
#(define-public KUCUK 5/10)
#(define-public BUYUKMUCENNEB 8/10)

%%% eksikMirroredSlashedFlat for 2.5k and 3k
#(define-public EKSIK-IKI 5/20)
#(define-public EKSIK-UC 3/10)

%{

Define pitch names

%}

makamPitchNames = #`(
  (cfbm . ,(ly:make-pitch -1 0 (- BUYUKMUCENNEB)))
  (cfk . ,(ly:make-pitch -1 0 (- KUCUK)))
  (cfb . ,(ly:make-pitch -1 0 (- BAKIYE)))
  (cfu . ,(ly:make-pitch -1 0 (- EKSIK-UC)))
  (cfi . ,(ly:make-pitch -1 0 (- EKSIK-IKI)))
  (cfc . ,(ly:make-pitch -1 0 (- KOMA)))
  (c . ,(ly:make-pitch -1 0 NATURAL))
  (cc . ,(ly:make-pitch -1 0 KOMA))
  (cb . ,(ly:make-pitch -1 0 BAKIYE))
  (ck . ,(ly:make-pitch -1 0 KUCUK))
  (cbm . ,(ly:make-pitch -1 0 BUYUKMUCENNEB))

  (dfbm . ,(ly:make-pitch -1 1 (- BUYUKMUCENNEB)))
  (dfk . ,(ly:make-pitch -1 1 (- KUCUK)))
  (dfb . ,(ly:make-pitch -1 1 (- BAKIYE)))
  (dfu . ,(ly:make-pitch -1 1 (- EKSIK-UC)))
  (dfi . ,(ly:make-pitch -1 1 (- EKSIK-IKI)))
  (dfc . ,(ly:make-pitch -1 1 (- KOMA)))
  (d . ,(ly:make-pitch -1 1 NATURAL))
  (dc . ,(ly:make-pitch -1 1 KOMA))
  (db . ,(ly:make-pitch -1 1 BAKIYE))
  (dk . ,(ly:make-pitch -1 1 KUCUK))
  (dbm . ,(ly:make-pitch -1 1 BUYUKMUCENNEB))

  (efbm . ,(ly:make-pitch -1 2 (- BUYUKMUCENNEB)))
  (efk . ,(ly:make-pitch -1 2 (- KUCUK)))
  (efb . ,(ly:make-pitch -1 2 (- BAKIYE)))
  (efu . ,(ly:make-pitch -1 2 (- EKSIK-UC)))
  (efi . ,(ly:make-pitch -1 2 (- EKSIK-IKI)))
  (efc . ,(ly:make-pitch -1 2 (- KOMA)))
  (e . ,(ly:make-pitch -1 2 NATURAL))
  (ec . ,(ly:make-pitch -1 2 KOMA))
  (eb . ,(ly:make-pitch -1 2 BAKIYE))
  (ek . ,(ly:make-pitch -1 2 KUCUK))
  (ebm . ,(ly:make-pitch -1 2 BUYUKMUCENNEB))

  (ffbm . ,(ly:make-pitch -1 3 (- BUYUKMUCENNEB)))
  (ffk . ,(ly:make-pitch -1 3 (- KUCUK)))
  (ffb . ,(ly:make-pitch -1 3 (- BAKIYE)))
  (ffu . ,(ly:make-pitch -1 3 (- EKSIK-UC)))
  (ffi . ,(ly:make-pitch -1 3 (- EKSIK-IKI)))
  (ffc . ,(ly:make-pitch -1 3 (- KOMA)))
  (f . ,(ly:make-pitch -1 3 NATURAL))
  (fc . ,(ly:make-pitch -1 3 KOMA))
  (fb . ,(ly:make-pitch -1 3 BAKIYE))
  (fk . ,(ly:make-pitch -1 3 KUCUK))
  (fbm . ,(ly:make-pitch -1 3 BUYUKMUCENNEB))

  (gfbm . ,(ly:make-pitch -1 4 (- BUYUKMUCENNEB)))
  (gfk . ,(ly:make-pitch -1 4 (- KUCUK)))
  (gfb . ,(ly:make-pitch -1 4 (- BAKIYE)))
  (gfu . ,(ly:make-pitch -1 4 (- EKSIK-UC)))
  (gfi . ,(ly:make-pitch -1 4 (- EKSIK-IKI)))
  (gfc . ,(ly:make-pitch -1 4 (- KOMA)))
  (g . ,(ly:make-pitch -1 4 NATURAL))
  (gc . ,(ly:make-pitch -1 4 KOMA))
  (gb . ,(ly:make-pitch -1 4 BAKIYE))
  (gk . ,(ly:make-pitch -1 4 KUCUK))
  (gbm . ,(ly:make-pitch -1 4 BUYUKMUCENNEB))

  (afbm . ,(ly:make-pitch -1 5 (- BUYUKMUCENNEB)))
  (afk . ,(ly:make-pitch -1 5 (- KUCUK)))
  (afb . ,(ly:make-pitch -1 5 (- BAKIYE)))
  (afu . ,(ly:make-pitch -1 5 (- EKSIK-UC)))
  (afi . ,(ly:make-pitch -1 5 (- EKSIK-IKI)))
  (afc . ,(ly:make-pitch -1 5 (- KOMA)))
  (a . ,(ly:make-pitch -1 5 NATURAL))
  (ac . ,(ly:make-pitch -1 5 KOMA))
  (ab . ,(ly:make-pitch -1 5 BAKIYE))
  (ak . ,(ly:make-pitch -1 5 KUCUK))
  (abm . ,(ly:make-pitch -1 5 BUYUKMUCENNEB))

  (bfbm . ,(ly:make-pitch -1 6 (- BUYUKMUCENNEB)))
  (bfk . ,(ly:make-pitch -1 6 (- KUCUK)))
  (bfb . ,(ly:make-pitch -1 6 (- BAKIYE)))
  (bfu . ,(ly:make-pitch -1 6 (- EKSIK-UC)))
  (bfi . ,(ly:make-pitch -1 6 (- EKSIK-IKI)))
  (bfc . ,(ly:make-pitch -1 6 (- KOMA)))
  (b . ,(ly:make-pitch -1 6 NATURAL))
  (bc . ,(ly:make-pitch -1 6 KOMA))
  (bb . ,(ly:make-pitch -1 6 BAKIYE))
  (bk . ,(ly:make-pitch -1 6 KUCUK))
  (bbm . ,(ly:make-pitch -1 6 BUYUKMUCENNEB))
  
)

%% Set pitch names.
pitchnames = \makamPitchNames
#(ly:parser-set-note-names makamPitchNames)

tuning = #53
\include "regular.ly"

#(define eksikMirroredSlashedFlat
  (if (defined? 'eksikMirroredSlashedFlat)
       eksikMirroredSlashedFlat #f))

%%% For Turkish Makam, need 6/53, 18/53, 24/53, 30/53, 48/53
makamGlyphs = #`(
       (-72/53 . "")
       (-66/53 . "")
       (-60/53 . "")
       (-54/53 . "accidentals.flatflat")
       (-48/53 . "accidentals.flat.slashslash")
       (-42/53 . "")
       (-36/53 . "")
       (-30/53 . "accidentals.flat")
       (-24/53 . "accidentals.flat.slash")
       (-18/53 . ,(if eksikMirroredSlashedFlat "accidentals.mirroredflat.backslash" "accidentals.flat.slash"))
       (-15/53 . ,(if eksikMirroredSlashedFlat "accidentals.mirroredflat.backslash" "accidentals.mirroredflat"))
       (-12/53 . "")
       (-6/53  . "accidentals.mirroredflat")
       (0      . "accidentals.natural")
       (6/53   . "accidentals.sharp.slashslash.stem")
       (12/53 . "")
       (18/53  . "accidentals.sharp")
       (24/53  . "accidentals.sharp")
       (30/53  . "accidentals.sharp.slashslashslash.stem")
       (36/53 . "")
       (42/53 . "")
       (48/53  . "accidentals.sharp.slashslashslash.stemstem")
       (54/53  . "accidentals.doublesharp")
       (60/53 . "")
       (66/53 . "")
       (72/53 . "")

)

#(define smufl-alteration-glyph-name-alist '(
  (-72/53 . "accidentalDoubleFlatTwoArrowsDown")
  (-66/53 . "accidentalDoubleFlatOneArrowDown")
  (-60/53 . "accidentalDoubleFlat")
  (-54/53 . "accidentalDoubleFlatOneArrowUp")
  (-48/53 . "accidentalDoubleFlatTwoArrowsUp")

  (-42/53 . "accidentalFlatTwoArrowsDown")
  (-36/53 . "accidentalFlatOneArrowDown")
  (-30/53 . "accidentalFlat")
  (-24/53 . "accidentalFlatOneArrowUp")
  (-18/53 . "accidentalFlatTwoArrowsUp")

  (-12/53 . "accidentalNaturalTwoArrowsDown")
  (-6/53  . "accidentalNaturalOneArrowDown")
  (0      . "accidentalNatural")
  (6/53   . "accidentalNaturalOneArrowUp")
  (12/53  . "accidentalNaturalTwoArrowsUp")

  (18/53  . "accidentalSharpTwoArrowsDown")
  (24/53  . "accidentalSharpOneArrowDown")
  (30/53  . "accidentalSharp")
  (36/53  . "accidentalSharpOneArrowUp")
  (42/53  . "accidentalSharpTwoArrowsUp")

  (48/53  . "accidentalDoubleSharpTwoArrowsDown")
  (54/53  . "accidentalDoubleSharpOneArrowDown")
  (60/53  . "accidentalDoubleSharp")
  (66/53  . "accidentalDoubleSharpOneArrowUp")
  (72/53  . "accidentalDoubleSharpTwoArrowsUp")))

% For LilyPond 2.21:
NewEqualFiftythreeGlyphs = #`(
  (-72/53 . "accidentals.flatflat.2down")
  (-66/53 . "accidentals.flatflat.1down")
  (-60/53 . "accidentals.flatflat")
  (-54/53 . "accidentals.flatflat.1up")
  (-48/53 . "accidentals.flatflat.2up")

  (-42/53 . "accidentals.flat.2down")
  (-36/53 . "accidentals.flat.1down")
  (-30/53 . "accidentals.flat")
  (-24/53 . "accidentals.flat.1up")
  (-18/53 . "accidentals.flat.2up")

  (-12/53 . "accidentals.natural.2down")
  (-6/53  . "accidentals.natural.1down")
  (0      . "accidentals.natural")
  (6/53   . "accidentals.natural.1up")
  (12/53  . "accidentals.natural.2up")

  (18/53  . "accidentals.sharp.2down")
  (24/53  . "accidentals.sharp.1down")
  (30/53  . "accidentals.sharp")
  (36/53  . "accidentals.sharp.1up")
  (42/53  . "accidentals.sharp.2up")

  (48/53  . "accidentals.doublesharp.2down")
  (54/53  . "accidentals.doublesharp.1down")
  (60/53  . "accidentals.doublesharp")
  (66/53  . "accidentals.doublesharp.1up")
  (72/53  . "accidentals.doublesharp.2up")
)

%% set makam key signatures
%%% cargah and transpositions
cargah = #'((0 . 0)(1 . 0)(2 . 0)(3 . 0)(4 . 0)(5 . 0)(6 . 0))
acemasiran=\cargah
mahur=\cargah
suzidilara=\cargah
zavil=\cargah
tarzicedid=\cargah

%%% rast and similar
rast = #'((0 . 0)(1 . 0)(2 . -6/53)(3 . 0)(4 . 0)(5 . 0)(6 . -6/53))
pencgah=\rast
pesendide=\rast
rehavi=\rast
sazkar=\rast
sevkedil=\rast
suznak = #'((0 . 0)(1 . 0)(2 . -6/53)(3 . 0)(4 . 0)(5 . -24/53)(6 . -6/53))
serefnuma=\suznak

%%% ussak and similar
ussak = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . 0)(4 . 0)(5 . -30/53)(6 . -30/53))
acem=\ussak
beyati=\ussak
hisar=\ussak
isfahan=\ussak
isfahanek=\ussak
yenisipihr=\ussak

%%% buselik and transpositions and similar
buselik = #'((0 . 0)(1 . 0)(2 . -30/53)(3 . 0)(4 . 0)(5 . -30/53)(6 . -30/53))
ferahfeza=\buselik
hisarbuselik=\buselik
nihavend=\buselik
ruhnuvaz=\buselik
sehnazbuselik=\buselik
zirefkend=\buselik

%%% neva and similar
neva = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . 0)(4 . 0)(5 . -6/53)(6 . -30/53))
gerdaniye=\neva
gulizar=\neva
huseyni=\neva
muhayyer=\neva
sultaniirak=\neva
tahir=\neva
tahirbuselik=\neva

%%% kurdi and similar and transpositions
kurdi = #'((0 . 0)(1 . -30/53)(2 . -30/53)(3 . 0)(4 . 0)(5 . -30/53)(6 . -30/53))
acemkurdi=\kurdi
askevza=\kurdi
muhayyerkurdi=\kurdi
kurdilihicazkar=\kurdi
ferahnuma=\kurdi

%%% hicaz and similar
hicaz = #'((0 . 0)(1 . -24/53)(2 . -6/53)(3 . 0)(4 . 0)(5 . -6/53)(6 . -30/53))
hicazhumayun = #'((0 . 0)(1 . -24/53)(2 . -6/53)(3 . 0)(4 . 0)(5 . -30/53)(6 . -30/53))
hicazzirgule = #'((0 . 0)(1 . -24/53)(2 . -6/53)(3 . 0)(4 . 0)(5 . -24/53)(6 . -6/53))
hicazkar=\hicazzirgule
sedaraban=\hicazzirgule
hicazuzzal=\hicaz
sehnaz=\hicazhumayun
%%% cc is printed because of transposition of zirgule. keep?
suzidil=\hicazzirgule

%%% karcigar and similar
karcigar = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . 0)(4 . -24/53)(5 . -6/53)(6 . -30/53))
beyatiaraban=\karcigar

%%% saba and similar
saba = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . -24/53)(4 . 0)(5 . -30/53)(6 . -30/53))
dugah=\saba
muhayyersunbule=\saba
sabazemzeme=\saba
eskisipihr=\saba
kucek=\saba

%%% huseyniasiran and similar
huseyniasiran = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . 0)(4 . -6/53)(5 . -30/53)(6 . -30/53))
nuhuft=\huseyniasiran

%%% yegah and similar
yegah = #'((0 . 0)(1 . 0)(2 . -6/53)(3 . 0)(4 . 0)(5 . -6/53)(6 . -30/53))
dilkeside=\yegah

%%% segah and similar
segah = #'((0 . 0)(1 . -24/53)(2 . -24/53)(3 . 0)(4 . 0)(5 . -24/53)(6 . -24/53))
mustear=\segah
vechiarazbar=\segah

%%% huzzam uses -18/53 at 3
huzzam = #'((0 . 0)(1 . -24/53)(2 . -24/53)(3 . -18/53)(4 . 0)(5 . -24/53)(6 . -24/53))

%%% arazbar and similar
arazbar = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . 0)(4 . -6/53)(5 . -30/53)(6 . -30/53))

%%% sultaniyegah and similar
sultaniyegah = #'((0 . 0)(1 . 0)(2 . -30/53)(3 . 0)(4 . 0)(5 . -30/53)(6 . -6/53))

%%% buselikasiran and similar
buselikasiran = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . 0)(4 . 0)(5 . -30/53)(6 . -30/53))
canfeza = #'((0 . 0)(1 . -30/53)(2 . -30/53)(3 . 0)(4 . -6/53)(5 . -30/53)(6 . -54/53))

%%% irak and similar
irak = #'((0 . 0)(1 . -24/53)(2 . -24/53)(3 . 0)(4 . -24/53)(5 . -24/53)(6 . -24/53))
evcara = #'((0 . 0)(1 . -24/53)(2 . 0)(3 . 0)(4 . 0)(5 . -24/53)(6 . 0))
%evcara=\hicazzirgule
evic = #'((0 . 0)(1 . -24/53)(2 . -24/53)(3 . 0)(4 . -24/53)(5 . -24/53)(6 . -24/53))
ferahnak = #'((0 . 0)(1 . -24/53)(2 . -24/53)(3 . 6/53)(4 . 0)(5 . -24/53)(6 . -24/53))
dilkeshaveran=\evic

%%% rahatulervah uses -18/53 at 3
rahatulervah = #'((0 . 0)(1 . -24/53)(2 . -24/53)(3 . -18/53)(4 . 0)(5 . -24/53)(6 . -24/53))

%%% nisabur and similar
nisabur = #'((0 . 0)(1 . -6/53)(2 . -30/53)(3 . 0)(4 . -30/53)(5 . -30/53)(6 . -30/53))

%%% cargaheski and similar
cargaheski = #'((0 . 0)(1 . -24/53)(2 . 0)(4 . 0)(5 . 0)(6 . -6/53))

%%% guldeste and similar
guldeste = #'((0 . 0)(1 . 0)(2 . 0)(3 . 0)(4 . 24/53)(5 . 0)(6 . 0))

%%% buzurk and similar
buzurk = #'((0 . 0)(1 . 0)(2 . 0)(3 . 0)(4 . 0)(5 . 0)(6 . -6/53))

%%% nisaburek and similar
nisaburek = #'((0 . 0)(1 . 0)(2 . -6/53)(3 . 0)(4 . 0)(5 . 0)(6 . -30/53))

%%% neveser and similar
neveser = #'((0 . 0)(1 . 0)(2 . -24/53)(3 . 24/53)(4 . 0)(5 . -24/53)(6 . -6/53))

%%% nikriz and similar
nikriz = #'((0 . 0)(1 . 0)(2 . -24/53)(3 . 24/53)(4 . 0)(5 . 0)(6 . -30/53))

%%% sultanisegah and similar
sultanisegah = #'((0 . 0)(1 . -6/53)(2 . -6/53)(3 . 0)(4 . 0)(5 . -6/53)(6 . -30/53))

%%% sevkefza and similar
sevkefza = #'((0 . 0)(1 . 0)(2 . 0)(3 . 0)(4 . 0)(5 . -24/53)(6 . 0))

%%%flip d and a order
rengidil = #'((0 . 0)(1 . 0)(2 . -24/53)(3 . 24/53)(4 . 0)(5 . -24/53)(6 . 0))
sevkitarab = #'((0 . 0)(1 . 0)(2 . 0)(3 . 24/53)(4 . 0)(5 . -24/53)(6 . 0))
sevkaver = #'((0 . 0)(1 . 0)(2 . 0)(3 . 24/53)(4 . 0)(5 . 0)(6 . -6/53))

%%% test big time
sivenuma = #'((0 . 0)(1 . 0)(2 . -30/53)(3 . 0)(4 . 0)(5 . -6/53)(6 . -30/53)(7 . -24/53))

%%%% figure out how to not print fb in key sig
%%% bestenigar uses -48/53 at 5
bestenigar = #'((7 . 0)(0 . 0)(1 . -24/53)(2 . -24/53)(3 . 0)(4 . -24/53)(5 . -48/53)(6 . -24/53))
revnaknuma = #'((0 . 0)(1 . -24/53)(2 . 0)(3 . 0)(4 . 0)(5 . -24/53)(6 . -24/53))

\layout {
  \context {
    \Staff
%    \bravuraOn
  }

  \context {
    \Score

    %%% key alteration order
    keyAlterationOrder = #`(
       (6 . ,-6/53) (6 . ,-24/53) (6 . ,-30/53) (6 . ,-48/53) (6 . ,-54/53)
       (2 . ,-6/53) (2 . ,-24/53) (2 . ,-30/53) (2 . ,-48/53) (2 . ,-54/53)
       (5 . ,-6/53) (5 . ,-24/53) (5 . ,-30/53) (5 . ,-48/53) (5 . ,-54/53)
       (1 . ,-6/53) (1 . ,-24/53) (1 . ,-30/53) (1 . ,-48/53) (1 . ,-54/53)
       (4 . ,-6/53) (4 . ,-24/53) (4 . ,-30/53) (4 . ,-48/53) (4 . ,-54/53)
       (0 . ,-6/53) (0 . ,-24/53) (0 . ,-30/53) (0 . ,-48/53) (0 . ,-54/53)
       (3 . ,-6/53) (3 . ,-24/53) (3 . ,-30/53) (3 . ,-48/53) (3 . ,-54/53)

       (3 . ,6/53) (3 . ,18/53) (3 . ,24/53) (3 . ,30/53) (3 . ,48/53) (3 . ,54/53)
       (0 . ,6/53) (0 . ,18/53) (0 . ,24/53) (0 . ,30/53) (0 . ,48/53) (0 . ,54/53)
       (4 . ,6/53) (4 . ,18/53) (4 . ,24/53) (4 . ,30/53) (4 . ,48/53) (4 . ,54/53)
       (1 . ,6/53) (1 . ,18/53) (1 . ,24/53) (1 . ,30/53) (1 . ,48/53) (1 . ,54/53)
       (5 . ,6/53) (5 . ,18/53) (5 . ,24/53) (5 . ,30/53) (5 . ,48/53) (5 . ,54/53)
       (2 . ,6/53) (2 . ,18/53) (2 . ,24/53) (2 . ,30/53) (2 . ,48/53) (2 . ,54/53)
       (6 . ,6/53) (6 . ,18/53) (6 . ,24/53) (6 . ,30/53) (6 . ,48/53) (6 . ,54/53)
       )

    \override KeySignature #'padding-pairs = #'(
       (("accidentals.natural" . "accidentals.natural") . 0.2)

       (("accidentals.flat" . "accidentals.flat") . 0.1)
       (("accidentals.flat" . "accidentals.flat.slash") . 0.0)
       (("accidentals.flat" . "accidentals.mirroredflat") . 0.2)
       (("accidentals.flat" . "accidentals.flat.slashslash") . 0.0)

       (("accidentals.flat.slash" . "accidentals.flat") . 0.0)
       (("accidentals.flat.slash" . "accidentals.flat.slash") . -0.1)
       (("accidentals.flat.slash" . "accidentals.mirroredflat") . 0.0)
       (("accidentals.flat.slash" . "accidentals.flat.slashslash") . 0.0)

       (("accidentals.mirroredflat" . "accidentals.flat") . 0.0)
       (("accidentals.mirroredflat" . "accidentals.flat.slash") . 0.4)
       (("accidentals.mirroredflat" . "accidentals.mirroredflat") . 0.3)
       (("accidentals.mirroredflat" . "accidentals.flat.slashslash") . 0.0)

       (("accidentals.flat.slashslash" . "accidentals.flat") . 0.0)
       (("accidentals.flat.slashslash" . "accidentals.flat.slash") . 0.3)
       (("accidentals.flat.slashslash" . "accidentals.mirroredflat") . 0.3)
       (("accidentals.flat.slashslash" . "accidentals.flat.slashslash") . -0.2)

       (("accidentals.sharp" . "accidentals.sharp") . 0.1)
       (("accidentals.sharp" . "accidentals.sharp.slashslash.stem") . 0.0)
       (("accidentals.sharp" . "accidentals.sharp.slashslashslash.stem") . 0.0)
       (("accidentals.sharp" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.sharp.slashslash.stem" . "accidentals.sharp") . 0.2)
       (("accidentals.sharp.slashslash.stem" . "accidentals.sharp.slashslash.stem") . 0.2)
       (("accidentals.sharp.slashslash.stem" . "accidentals.sharp.slashslashslash.stem") . 0.0)
       (("accidentals.sharp.slashslash.stem" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.sharp.slashslashslash.stem" . "accidentals.sharp") . 0.2)
       (("accidentals.sharp.slashslashslash.stem" . "accidentals.sharp.slashslash.stem") . 0.2)
       (("accidentals.sharp.slashslashslash.stem" . "accidentals.sharp.slashslashslash.stem") . 0.0)
       (("accidentals.sharp.slashslashslash.stem" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.sharp") . 0.1)
       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.sharp.slashslash.stem") . 0.0)
       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.sharp.slashslashslash.stem") . 0.0)
       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.flat" . "accidentals.sharp") . 0.3)
       (("accidentals.flat" . "accidentals.sharp.slashslash.stem") . 0.0)
       (("accidentals.flat" . "accidentals.sharp.slashslashslash.stem") . 0.0)
       (("accidentals.flat" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.flat.slash" . "accidentals.sharp") . 0.3)
       (("accidentals.flat.slash" . "accidentals.sharp.slashslash.stem") . 0.1)
       (("accidentals.flat.slash" . "accidentals.sharp.slashslashslash.stem") . 0.3)
       (("accidentals.flat.slash" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.mirroredflat" . "accidentals.sharp") . 0.3)
       (("accidentals.mirroredflat" . "accidentals.sharp.slashslash.stem") . 0.0)
       (("accidentals.mirroredflat" . "accidentals.sharp.slashslashslash.stem") . 0.0)
       (("accidentals.mirroredflat" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.flat.slashslash" . "accidentals.sharp") . 0.0)
       (("accidentals.flat.slashslash" . "accidentals.sharp.slashslash.stem") . 0.0)
       (("accidentals.flat.slashslash" . "accidentals.sharp.slashslashslash.stem") . 0.0)
       (("accidentals.flat.slashslash" . "accidentals.slashslashslash.stemstem") . 0.0)

       (("accidentals.sharp" . "accidentals.flat") . 0.0)
       (("accidentals.sharp" . "accidentals.flat.slash") . 0.0)
       (("accidentals.sharp" . "accidentals.mirroredflat") . 0.0)
       (("accidentals.sharp" . "accidentals.flat.slashslash") . 0.0)

       (("accidentals.sharp.slashslash.stem" . "accidentals.flat") . 0.0)
       (("accidentals.sharp.slashslash.stem" . "accidentals.flat.slash") . 0.0)
       (("accidentals.sharp.slashslash.stem" . "accidentals.mirroredflat") . 0.0)
       (("accidentals.sharp.slashslash.stem" . "accidentals.flat.slashslash") . 0.0)

       (("accidentals.sharp.slashslashslash.stem" . "accidentals.flat") . 0.0)
       (("accidentals.sharp.slashslashslash.stem" . "accidentals.flat.slash") . 0.0)
       (("accidentals.sharp.slashslashslash.stem" . "accidentals.mirroredflat") . 0.0)
       (("accidentals.sharp.slashslashslash.stem" . "accidentals.flat.slashslash") . 0.0)

       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.flat") . 0.0)
       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.flat.slash") . 0.0)
       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.mirroredflat") . 0.0)
       (("accidentals.sharp.slashslashslash.stemstem" . "accidentals.flat.slashslash") . 0.0)

       )

    \override KeySignature #'glyph-name-alist = \makamGlyphs
    \override Accidental #'glyph-name-alist = \makamGlyphs
    \override AccidentalCautionary #'glyph-name-alist = \makamGlyphs
    \override TrillPitchAccidental #'glyph-name-alist = \makamGlyphs
    \override AmbitusAccidental #'glyph-name-alist = \makamGlyphs
  }
}
\version "2.18.2"

\include "turkish-makam.ly"

%%%%% rast needs to be transposable to any pitch level
%%%%% if to any accidental, 
RASTmusic = \relative c' {
  \key g \rast
  g'8 a bfc c d e fb e
  d c bfc a g2
}

{ \mark \markup {"rast-TR" }
  \RASTmusic }

{ \mark \markup {"rast-from bfc=good" }
  \transpose g bfc \RASTmusic }

{ \mark \markup {"rast-from fb=good" }
  \transpose g fb \RASTmusic }

%%%%% 
SEGAHmusic = \relative c' {
  \key bfc \segah
  bfc'8 c d efc f g f efc
  d c bfc ab bfc2
}

{ \mark \markup {"segah-TR from bfc=good" }
  \SEGAHmusic }

{ \mark \markup {"segah-TR from fb=good" }
  \transpose bfc fb \SEGAHmusic }

%%%%% 
BESTENIGARmusic = \relative c' {
  \key fb \bestenigar
  c'8 dfb e f g f e dfb c bfc a g fb2
}

{ \mark \markup {"bestenigar-TR from fb=bad" }
  \BESTENIGARmusic }

%%%%% 
SABABESTENIGARmusic = \relative c' {
  \key a \saba
  c'8 dfb e f g f e dfb c bfc a g fb2
}

{ \mark \markup {"bestenigar should look like this" }
  \SABABESTENIGARmusic }

%%%%% 
REVNAKNUMAmusic = \relative c' {
  \key fb \revnaknuma
  bfc'8 ab bfc cb d cb bfc a a g g fb fb2
}

{ \mark \markup {"revnaknuma from fb=bad" }
  \REVNAKNUMAmusic }

%%%%% 
fakerevnaknuma = #'((0 . 0)(1 . 0)(2 . -24/53)(3 . 6/53)(4 . -24/53)(5 . -24/53)(6 . 0))
FAKEREVNAKNUMAmusic = \relative c' {
  \key bfc \fakerevnaknuma
  bfc'8 ab bfc cb d cb bfc a a g g fb fb2
}

{ \mark \markup {"revnaknuma needs this" }
  \FAKEREVNAKNUMAmusic }
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to