# Lilypond - Custom Key Signature for Turkish folk music and microtonal accidentals

I have to create this key signature in lilypond:

Would it be possible to create something like that?

Thanks!

% LilyBin
\score{
{
\set Staff.keySignature = #((-1 . ,FLAT) (3 . ,SHARP))
\time 9/8
\override Staff.KeySignature.stencil = #ly:text-interface::print
\override Staff.KeySignature.text =
\markup {
\concat {
\musicglyph #"accidentals.flat"
\lower #0.4 \super \fontsize #-3 2
}
\concat {
\raise #2 \musicglyph #"accidentals.sharp"
\raise #1.6 \super \fontsize #-3 3
}
}
s4.*3
}

\layout{}
\midi{}
}


Lilybin: http://lilybin.com/ugfo88/1 Thanks to yoker from IRC

This works in latest stable 2.18.2

\relative c' {
\set Staff.keySignature = #((6 . ,FLAT)
(3 . ,SHARP))
c4 d e fis
aes4 bes c2
}


• For the current development version 2.19, the property is keyAlterations instead. Try \set Staff.keyAlterations = #`((6 . ,FLAT) (3 . ,SHARP)) – Paco Vila May 19 '18 at 19:49
• Am I missing something? I don't see any superscripts in the proposed solution. – ex nihilo May 19 '18 at 20:50
• You're right but in the comments nobody focused on the superscripts and I thought the key itself was the main problem. Also, the superscripts looked like footnote markings for some kind of explanation, more than an actual element of the signature. Anyway, I'm pretty confident on some ideas could came from lsr.di.unimi.it/LSR/Item?id=433 or lsr.di.unimi.it/LSR/Item?id=786 in which markups and custom key signatures are built. – Paco Vila May 20 '18 at 11:17
• No, apparently those are the actual accidentals; the superscripts indicate specific microtonal inflections. Is it possible to use a different font for the elements of the key signature in Lilypond? – Pat Muchmore May 20 '18 at 12:09