Ekmelily – Notation of Microtonal Music

Ekmelily is an extension for LilyPond that supports variable accidentals and key signatures for the notation of microtonal music in several equal-temperament tunings – 12, 19, 24, 31, 36, 48, 53, 72-EDO – and in 5-limit JI. For this purpose, it introduces predefined and user-defined notation styles. Each style describes a set of symbols for the alterations up to the five-quarters-tone, at most. Furthermore, Ekmelily defines own note names based on the names for semi- and quarter-tones given in LilyPond.

See Esmuflily for other music symbols (clefs, noteheads, articulations, etc.) from SMuFL compliant fonts.

Ekmelily requires LilyPond version 2.19.22 or higher.

Download and Installation

The folder ly contains the include files.

  • Copy the file(s) for the desired tuning(s) as well as the main include file ekmel-main.ily into an appropriate folder, e.g. "LILYPOND/usr/share/lilypond/current/ly", with LILYPOND meaning the installation folder of LilyPond.
  • Optionally install a font, e.g. Ekmelos.1


Add the following lines near the top of your LilyPond input file. All commands are optional – except for \include of the desired tuning – but should be specified in this order.

ekmFont = FONTNAME
\include "ekmel..."
\language "LANGUAGE"
\ekmelicStyle STYLENAME
\ekmelicUserStyle USERSTYLENAME #'((ALTERATION ELEMENT ...) ...)

Ekmelily + Esmuflily

To combine Ekmelily with Esmuflily, add e.g. the following lines near the top of your LilyPond input file. This achieves LilyPond's standard behaviour, i.e. Dutch note names (default) and Stein / Couper accidentals (stc) for quarter-tones (24-EDO). The first line can be omitted when using Ekmelos.

ekmFont = FONTNAME
\include "ekmel-24.ily"
\include "esmufl.ily"
\ekmelicStyle stc


Ekmelily requires a font for accidentals defined by code point, character literal, or string. This applies to all accidentals in the predefined notation styles. Each of them is a SMuFL recommended character or Ekmelos specific optional glyph.

Ekmelily uses Ekmelos by default. Another font can be selected, either with the variable

ekmFont = FONTNAME

(or ekmelicFont as in previous versions) preceding the include file,
or with the command line option2


(or -dekmelic-font as in previous versions).

The glyphs from LilyPond's Emmentaler font can be used with markup in a user-defined notation style. See the Example lilysingle.

Drawing paths

Ekmelily supports drawing paths instead of font glyphs, which allows e.g. to produce stand-alone SVG output. This requires the Scheme procedure ekm-path-stencil as it is provided for Ekmelos by the include file ly/ekmelos-paths.ily.

A trailing # in FONTNAME switches to drawing paths, which effects all accidentals defined by code point or character literal, in particular, all accidentals in the predefined notation styles. To draw Ekmelos glyphs as paths, add the following lines near the top of your LilyPond input file. Note that a single "#" is equivalent to "Ekmelos#".

ekmFont = "#"
\include "ekmelos-paths.ily"
\include "ekmel..."


Ekmelily supports different tunings available as separate include files. Each provides its own set of languages and predefined notation styles. The first language and notation style specified in the following table is the default in the respective tuning. Some languages have alias names (in parentheses).

TuningInclude fileLanguagesNotation styles
12ekmel-12.ilynederlands english deutsch català (catalan) español (espanol) italiano français português (portugues) norsk suomi svenska vlaamsstd sag msag
19ekmel-19.ilynederlands english deutsch català (catalan) español (espanol) italiano français português (portugues) norsk suomi svenska vlaamsstd sag msag
24ekmel-24.ilynederlands english deutsch català (catalan) español (espanol) italiano français português (portugues) norsk suomi svenska vlaamsstc stz go stvt arrow sag msag arabic persian four haba
24 3ekmel-arabic.ilyitalianoarabic
31ekmel-31.ilynederlands deutsch español (espanol) français italiano português (portugues)std sag msag stz sth
36ekmel-36.ilynederlands english deutsch norsk suomi svenskago arrow sag msag wys bos haba
48ekmel-48.ilynederlands english deutschsag msag gostz
53ekmel-53.ilymakam thm ktm english numberaeu aeuek thm sag dia
72ekmel.ilynederlands english deutsch norsk suomi svenskaarrow rhm sims hesse sag msag wys gostz gostc bos fern haba
5JIekmel-5ji.ilynederlandssag msag he

Note: Ekmelily versions prior to 3.0 support only 72-EDO.

Languages and Note names

Each tuning provides one or more languages for note names, which can be selected with the command

\language "LANGUAGE"

If LANGUAGE is not supported by the respective tuning, the default language is selected (usually nederlands). The note names are based on the names for semi- and quarter-tones given in LilyPond. See the Tables with all note names.

Enharmonically equivalent note names

Some notation styles support two distinct, enharmonically equivalent accidentals, e.g. arrow, hesse, rhm, and sims for the one-quarter-tone and the three-quarters-tone. Therefore, Ekmelily defines two note names each, e.g. cqs and csaqf ("english") or cih and ciseh ("deutsch"). However, LilyPond does not support different accidentals for the same alteration. As a provisional solution, the combined note names like csaqf and ciseh) have slightly differing alterations (+1/1024) and therefore cause inaccurate MIDI output.

NoteNames context

Ekmelily supports the NoteNames context and its properties. Note names can be drawn in any supported language by setting the printNotesLanguage property. Else, the language selected for music entry is used.

The format can be specified with the printAccidentalNames property. The first three values below are equivalent to LilyPond's normal behaviour.

#tScale name and accidental (default)
#fScale name
'lilyNote name
'allAll alias note names stacked vertically
'alterationAlteration name
'fractionScale name and fraction of alteration

Predefined Notation Styles

Each tuning provides one or more predefined notation styles, which can be selected either with the command

\ekmelicStyle STYLENAME

or with the command line option2


If STYLENAME is not supported by the respective tuning, the default notation style is selected.

The following table shows all predefined notation styles. N indicates the default style in tuning N.
All accidentals in these styles require a SMuFL compliant font. All optional glyphs are private supplements of Ekmelos. See the Tables with alterations, the Ekmelos Documentation, or SMuFL for details on the accidentals (code points, glyph names etc.)

Stylename TuningsAccidentals
stdStandard12 19 
stdStandard31 
stcStein / Couper24 
stzStein / Zimmermann24 31 
stvtStein / Van Blankenburg / Tartini24 
sthStein / Half flat 431 
fourDigit 424 
goGould24 36 
arabicArabic 524 
persianPersian 624 
aeuArel-Ezgi-Uzdilek 753 
aeuekArel-Ezgi-Uzdilek 853 
diaDiatonic 953 
thmTurkish folk music53 
arrowArrow24 36 72 
bosBosanquet commatic36 72 
habaHába24 
habaHába 1036 72 
wysWyschnegradsky36 72 
fernFerneyhough72 
gostcGould / Stein / Couper72 
gostzGould / Stein / Zimmermann48 72 
hesseHesse 1172 
rhmRichter Herf / Maedel 1272 
simsSims72 
heExtended Helmholtz-Ellis5JI 
sagSagittal12 19 24 31 36 48 53 72 5JI 
msagMixed Sagittal 1312 19 24 31 36 48 72 
voidNo accidentalsall 

The universal notation style void defines no accidentals at all, except for the special symbols. As a consequence, the default accidental is drawn for each alteration. See the Example numeric which makes use of void.

User-defined Notation Styles

A new notation style derived from the currently selected style can be created with the command

\ekmelicUserStyle USERSTYLENAME #'(

USERSTYLENAME is a freely chosen style name. If it is an empty string "", the name of the currently selected style extended with the suffix -user is taken.

ALTERATION is a rational number or the name of a special symbol. For each specified alteration, a new symbol is defined which is the composition of the elements. For all other alterations where the previous symbol of ALTERATION appears likewise (usually combined with other symbols), this symbol is also replaced with the new one. Therefore, the order of alterations in the definition list can be significant, in particular, when a replaced symbol is again defined but for another alteration. See the Example diaQuarter.

ELEMENT is one of the following:

  • a code point (integer), e.g. #xE47B for Wilson plus
  • a character literal, e.g. #\b for flat
  • a string, e.g. "bb" for double-flat
  • markup, e.g. ,(markup #:semisharp)

Two or more elements are juxtaposed with a padding of 0.12 staff units, but no extra space is inserted between the characters of a string. Note that in a SMuFL compliant font, all accidental glyphs have a zero side-bearing. This also applies to the Basic Latin (ASCII) characters in the Ekmelos font, so that e.g. "bb" is drawn without padding and #\b #\b with padding. See the Example hewm.

Special Symbols

Every notation style includes three special symbols. They can be user-defined like accidentals by specifying the respective name instead of an alteration.

\ekmelicUserStyle USERSTYLENAME #'(
  (leftparen ELEMENT ...)
  (rightparen ELEMENT ...)
  (default ELEMENT ...)
  • leftparen: Left parenthesis for cautionary accidentals. Predefined is U+E26A.
  • rightparen: Right parenthesis for cautionary accidentals. Predefined is U+E26B.
  • default: Default accidental for alterations which are not defined in the selected notation style. This applies to the style void and to some styles in ekmel-53.ily, or it can occur with \transpose. Predefined is no symbol.

Additional Commands

Set the name of the selected notation style as the output filename suffix for the current \book section.
Draw the name of the selected notation style as markup.
Draw the name of the selected font as markup.
\ekmelic-char ALTERATION
Draw the accidental of ALTERATION (a rational number) according to the selected notation style as markup.
Used property:
  • font-size (1)
\ekmelic-elem ELEMENT
Draw ELEMENT with the selected font as markup. ELEMENT is a code point (integer), a character literal, a string, or markup. This command is intended to combine glyphs from the selected font with other markup in a user-defined notation style.
\ekmelic-fraction ALTERATION
Draw ALTERATION (a rational number) as markup. If the denominator is 1, only the numerator is drawn.
\ekmelic-fraction-small ALTERATION
Draw ALTERATION (a rational number) as markup with a 3 steps smaller font size. If the denominator is 1, only the numerator is drawn, but with the current font size.
Used property:
  • font-size (0)
\ekm-fraction ARG1 ARG2
Draw a fraction of ARG1 and ARG2 as markup. This command is a variant of LilyPond's \fraction with consistent vertical alignment. It is used by the above commands.
Used property:
  • font-size (0)
Draw a table of all accidentals in the selected notation style as markup, including the natural symbol if NATURAL is true, and all composite accidentals if COMPOSITE is true. Enharmonically equivalent accidentals and special symbols are always ignored. The accidentals are arranged in a row with the respective alteration placed beneath, and sorted by ascending or descending alteration if ORDER is 1 or -1, respectively, or by absolute alteration if ORDER is 2 or -2.
Used properties:
  • font-size (0)
  • width (4): Horizontal extent for each accidental.
  • baseline-skip: Distance between accidental and alteration.


See also the file styles/user-styles.ly for further examples of user-defined styles.

ekmFont = "Bravura"
\include "ekmel.ily"
\language "english"
\ekmelicStyle sims
Sets the predefined Sims notation for 72-EDO, selects the English note names, and draws the accidentals with the Bravura font.
\include "ekmel-24.ily"
\ekmelicStyle stz
\ekmelicUserStyle myNotation #'(
  (-3/4 #xE327)
  (1 #xE262 #xE262))
Sets the predefined Stein / Zimmermann notation (stz) for quarter-tones (24-EDO) and modifies it into a user-defined notation with the Sagittal flat 11 medium diesis down symbol (U+E327) for three-quarter-tones flat, and two sharp symbols (U+E262) for double-sharp.
\include "ekmel-24.ily"
\ekmelicStyle stz
\ekmelicUserStyle myNotation #`(
  (,THREE-Q-FLAT #xE327)
  (,DOUBLE-SHARP #xE262 #xE262))
This is the same example as above but it makes use of the corresponding Scheme symbols.
\include "ekmel.ily"
\language "english"
\ekmelicUserStyle hewm #'(
  (1 #\x)
  (-1 #\b #\b)
  (1/2 #\#)
  (-1/2 #\b)
  (1/4 #\^)
  (-1/4 #\v)
  (1/6 #\>)
  (-1/6 #\<)
  (1/12 #\+)
  (-1/12 #\-))
Sets the HEWM (Helmholtz / Ellis / Wolf / Monzo) notation for 72-EDO and selects the English note names. Note that double-flat is defined with #\b #\b which is drawn with a padding contrary to "bb".
\include "ekmel-24.ily"
\ekmelicStyle stz
\ekmelicUserStyle stockhausen #'(
  (1/4 #xED58)
  (-1/4 #xED59)
  (3/4 #xED5A)
  (-3/4 #xED59 #xE260))
Sets the notation after Karlheinz Stockhausen for 24-EDO with the fractional sharp symbols (U+ED58, U+ED5A), and the quarter-tone flat symbol (U+ED59).
\include "ekmel.ily"
\ekmelicUserStyle smuflHesse #'(
  (1/4 #xE27A)
  (-1/4 #xE27B)
  (1/6 #xE2A4)
  (-1/6 #xE2A1)
  (1/12 #xE479)
  (-1/12 #xE47A))
Sets a variant of the Hesse notation for 72-EDO using SMuFL characters: Gould arrows   (U+E27A, U+E27B), Sims half arrows   (U+E2A4, U+E2A1), and Bosanquet commatic symbols   (U+E479, U+E47A). It is very similar to the Arrow notation.
\include "ekmel-24.ily"
\ekmelicUserStyle diaQuarter #'(
  (1 #xF61C)
  (-1 #xF61D)
  (3/4 #xE265)
  (-3/4 #xE266)
  (1/2 #xE263)
  (-1/2 #xE264)
  (1/4 #xE262)
  (-1/4 #xE260)
  (5/4 #xF61C #xE262)
  (-5/4 #xF61D #xE260))
Sets the Standard sharp / flat symbols, single thru quintuple, like the predefined Diatonic notation (dia) but for quarter-tones (24-EDO). The quadruple symbols (U+F61C, U+F61D) are private supplements of the Ekmelos font. Note that here, the order of alterations is significant since the standard accidentals in the default notation (stc) are rearranged.
\include "ekmel-48.ily"
\ekmelicUserStyle lilysingle #`(
  (0    ,(markup #:natural))
  (1/8  ,(markup #:musicglyph "accidentals.natural.arrowup"))
  (-1/8 ,(markup #:musicglyph "accidentals.natural.arrowdown"))
  (1/4  ,(markup #:semisharp))
  (-1/4 ,(markup #:semiflat))
  (3/8  ,(markup #:musicglyph "accidentals.sharp.arrowdown"))
  (-3/8 ,(markup #:musicglyph "accidentals.flat.arrowup"))
  (1/2  ,(markup #:sharp))
  (-1/2 ,(markup #:flat))
  (5/8  ,(markup #:musicglyph "accidentals.sharp.arrowup"))
  (-5/8 ,(markup #:musicglyph "accidentals.flat.arrowdown"))
  (3/4  ,(markup #:sesquisharp))
  (-3/4 ,(markup #:sesquiflat))
  (7/8  ,(markup #:musicglyph "accidentals.sharp.slashslashslash.stemstem"))
  (-7/8 ,(markup #:musicglyph "accidentals.flatflat.slash"))
  (1    ,(markup #:doublesharp))
  (-1   ,(markup #:doubleflat))
  (leftparen ,(markup #:musicglyph "accidentals.leftparen"))
  (rightparen ,(markup #:musicglyph "accidentals.rightparen")))
Sets single glyphs from LilyPond's Emmentaler font for 48-EDO, as well as parentheses for cautionary accidentals. ±9/8 and ±5/4 are omitted here since they are set automatically to combinations of ±1 with ±1/8 and ±1/4.
#(define-markup-command (numeric-accidental layout props)
  (let ((alt (ly:chain-assoc-get 'alteration props 0)))
    (interpret-markup layout
      (cons '((font-size . -3)) props)
      (markup #:vcenter #:ekmelic-fraction alt))))

\ekmelicStyle void
\ekmelicUserStyle numeric #`(
  (default ,(markup #:numeric-accidental)))
Sets alteration values instead of accidental symbols. They are drawn as fraction, or integer if the denominator is 1, with the command \ekmelic-fraction and with a 3 steps smaller font size. This is applicable to all tunings. The void notation ensures that the default accidental is used for each alteration.

What's New

  • 2024-04-07: Support to draw paths instead of font glyphs is added. A font can be selected with the variable ekmFont or the option ekmfont as in Esmuflily.
  • 2024-03-12: Support for the NoteNames context is added, with extended formats through the printAccidentalNames property. New commands \ekmelic-fraction-small and \ekm-fraction exist.
  • 2024-03-08: The file ekmel-5ji.ily for 5-limit JI is added, replacing ekmel-he.ily. The default language is now nederlands, except for ekmel-53.ily and ekmel-arabic.ily. The Gould / Stein / Zimmermann notation for 48-EDO is added.
  • 2024-02-22: The file ekmel-he.ily for 5-limit JI in Extended Helmholtz-Ellis notation is added.
  • 2023-12-18: A new command \ekmelic-font-name exists.
  • 2023-09-15: Wrong size of accidentals for grace notes, trill pitch, ambitus, ossia, etc. is fixed.
  • 2023-09-13: A new command \ekmelic-table exists.
  • Version 3.13 (): The symbols "leftparen", "rightparen", and "default" are added for use in all notation styles. The notation style "void" is added. \ekmelic-elem now can take any markup.
  • Version 3.12 (): A new language "nederlands" is available in ekmel-48.ily. A new command \ekmelic-elem exists to define accidentals with markup.
  • Version 3.11 (): \ekmelicUserStyle now supports arbitrary markup to define accidentals.
  • Version 3.10 (): The Diatonic notation for 53-EDO and the Gould / Stein / Couper notation for 72-EDO is added. The Gould / Stein / Zimmermann notation is renamed to gostz. gost is now an alias name.
  • Version 3.9 (): The file ekmel-53.ily with note names and notations for Turkish music is added.
  • Version 3.8 (): The Hesse notation for 72-EDO is added.
  • Version 3.7 (): New languages are available in ekmel-36.ily and ekmel.ily ("norsk", "suomi", "svenska"). In ekmel-24.ily, some quarter-tone names of "suomi" are corrected.
  • Version 3.6 (): The note names are revised according to LilyPond 2.22. New languages are available in ekmel-24.ily ("catalan", "norsk", "suomi", "svenska", "vlaams"), in ekmel-36.ily ("nederlands"), and in ekmel.ily ("nederlands"). Native language names ("català", "español", "português") or their alias names can be used.
  • Version 3.5 (): ekmel-24.ily: The Hába notation for quarter-tones uses the SMuFL glyphs (U+EE64-U+EE69) and the default notation is stc instead of go.
  • Version 3.4 (): The Hába notation for quarter-tones (24-EDO) and for 1/3-, 1/6-, and 1/12-tones (36 and 72-EDO) is added.
  • Version 3.3 (): Definitions to adjust the size of accidentals on grace notes are removed (obsolete since 3.2).
  • Version 3.2 (): The output of accidentals is newly implemented (stencil instead of simple text) and the hair-space character (U+200A) is not used any more for padding in composite accidentals. The natural sign for restore and key cancellation now depends on the notation style (not always U+E261).
  • Version 3.1 (): Key signatures are now supported. The file ekmel-24.ily defines an alteration order for key signatures including quarter tones. A new file ekmel-arabic.ily is available for Arabic scores (24-EDO) including maqamat (taken from arabic.ly).
  • Version 3.0 (): A completely revised version that now supports different tunings (12, 19, 24, 31, 36, 48, 72-EDO) by separate include files. Arabic and Persian notation are added for 24-EDO.

See the file CHANGELOG.txt for more details and older changes.

Author and License

Ekmelily was written by Thomas Richter, thomas-richteraonat

Copyright © 2013-2024 Thomas Richter

Ekmelily is licensed under the GNU General Public License, version 3 or later.
This license is available in the file LICENSE.txt and at www.gnu.org/licenses.

  1. To make use of a newly installed font in LilyPond prior to 2.24, its font cache i.e. the folder "~/.lilypond-fonts.cache-2" (on Windows "%HOMEPATH%\.lilypond-fonts.cache-2") must be emptied or completely deleted. So at the next execution of LilyPond this cache will be rebuilt from scratch inlcuding the new font.
  2. abLilyPond produces a warning “no such internal option”, which can be ignored. Warnings can be suppressed with the command line option --loglevel=ERROR or --loglevel=NONE.
  3. abekmel-arabic.ily is a variant of ekmel-24.ily for Arabic scores, like LilyPond's arabic.ly but with the correct accidentals U+ED30 – U+ED38. It supports Arabic maqamat and defines only the Italian language and the Arabic notation style, so the commands \ekmelicStyle and \language are not required.
  4. sth uses the optional glyphs U+F612 – U+F613 for the semi-flats.
  5. arabic: See ekmel-arabic.ily for Arabic maqamat.3
  6. persian: See Persian music notation for proper Persian microtonal alterations, note names, keys, etc.
  7. aeu uses the optional glyph U+F619 for the reversed slashed flat. See LilyPond's turkish-makam.ly for keys.
  8. aeuek equals aeu but does not use the reversed slashed flat, i.e. eksik-bakiye = koma.
  9. dia uses the optional glyphs U+F61C – U+F61D for the quadruple sharp / flat.
  10. haba in the 36- and 72-EDO tunings uses the optional glyphs U+F660 – U+F670.
  11. hesse uses the optional glyphs U+F606 – U+F60B for the degrees within the semitone.
  12. rhm uses the optional glyphs U+F600 – U+F605 for the degrees within the semitone.
  13. msag uses the large double sharp U+E47D. Hence it is different from std even for 12-EDO.