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, 96-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,
usually up to the five-quarters-tone.
Furthermore, Ekmelily defines own note names
based on the names for semi- and quarter-tones given in LilyPond.
Ekmelily requires LilyPond version 2.19.22 or higher.
See Esmuflily for other music symbols
(clefs, note heads, articulations, etc.)
from SMuFL compliant fonts.
Download and Installation
Download
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.
Tables
… with all accidentals and note names supported by Ekmelily.
Usage
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.
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 (starting at code point U+F600).
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 option1
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#".
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).
Tuning
Include file
Languages
Notation styles
12
ekmel-12.ily
nederlands english deutsch català (catalan) español (espanol) italiano français português (portugues) norsk suomi svenska svenska_ny vlaams
std sag msag
19
ekmel-19.ily
nederlands english deutsch català (catalan) español (espanol) italiano français português (portugues) norsk suomi svenska svenska_ny vlaams
std sag msag
24
ekmel-24.ily
nederlands english deutsch català (catalan) español (espanol) italiano français português (portugues) norsk suomi svenska svenska_ny vlaams
stc stz go stvt arrow sag msag arabic persian four haba bl
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.
See the Tables with all note names supported by Ekmelily.
They are based on the names for semi- and quarter-tones given in LilyPond.
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.
#t
Scale name and accidental (default)
#f
Scale name
'lily
Note name
'all
All alias note names stacked vertically
'alteration
Alteration name
'fraction
Scale name and fraction of alteration
'accidental
Accidental
Predefined Notation Styles
Each tuning provides one or more predefined notation styles,
which can be selected either with the command
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.
See the Tables with all accidentals in these styles.
They require a SMuFL compliant font.
All optional glyphs (starting at code point U+F600)
are private supplements of Ekmelos.
These notation styles are available for all tunings.
They do not define any accidentals, except for the
special symbols (default, leftparen, rightparen),
so that the default accidental is drawn for each alteration.
Note:
alteration, alteration-slash, and step
use the text font selected in LilyPond,
not the selected font of Ekmelily.
See the Example numeric which is similar to
alteration.
User-defined Notation Styles
A new notation style derived from the currently selected style
can be created with the command
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 the following special symbols which are
assigned to names instead of alterations.
Symbol name
default
Default accidental for alterations without a defined accidental.
This applies to the universal notation styles
and to some styles for 53 and 96-EDO, or it can occur with
\transpose.
\ekmelicUserStyle USERSTYLENAME #'(
(default ELEMENT ...)
(leftparen ELEMENT ...)
(rightparen ELEMENT ...)
...
)
Note: If both, the accidental and the parentheses are defined by
a single code point, character literal, or string, the entire cautionary
accidental is drawn as a single string.
This enables the use of a ligature if one is provided by the
selected font.
Additional Commands
\ekmelicOutputSuffix
Set the name of the selected notation style as the output filename
suffix for the current \book section.
\ekmelic-style-name
Draw the name of the selected notation style as markup.
\ekmelic-font-name
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.
\ekm-fraction ARG1ARG2
Draw a fraction of ARG1 and ARG2 as markup,
with a fraction bar according to style:
The default draws a horizontal bar.
This is a variant of LilyPond's \fraction
but with consistent vertical alignment.
slash draws a diagonal bar.
line draws a solidus (U+002F) with horizontally stacked numbers.
This command is used by the next two commands.
Used properties:
font-size (0)
style ('())
\ekmelic-fraction ALTERATION
Draw ALTERATION (a rational number) as markup.
If the denominator is 1, only the numerator is drawn,
else a fraction according to style,
and with fraction-size relative to the current font size
unless style is line.
Used properties:
fraction-size (0)
style ('())
\ekmelic-fraction-small ALTERATION
Draw ALTERATION (a rational number) as markup
like \ekmelic-fraction
but with a 4 steps smaller fraction size.
\ekmelic-table NATURALCOMPOSITEORDER
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.
Examples
See also the file styles/user-styles.ly for further examples
of user-defined styles.
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.
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".
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).
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.
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.
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.
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.
↑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.
↑abcekmel-arabic.ily is a variant of
ekmel-24.ily for Arabic scores, like LilyPond's
arabic.ly and hel-arabic.ly
but with the correct accidentals U+ED30 – U+ED38.
It also supports Arabic maqamat (keys).
↑sth
uses the optional glyphs U+F612 – U+F613 for the semi-flats.