Ekmelic Music Tables
====================

Tables with accidentals, alterations, and note names
supported by [Ekmelily](https://github.com/tr-igem/ekmelily)
and partly by [ekmelib](http://www.ekmelic-music.org/en/extra/ekmelib.html).
See also the tables at [Ekmelic Music](http://www.ekmelic-music.org/en/extra/tables.html).

These files are provided "as is," and come with absolutely no warranty.
Use, redistribute, and modify them as you wish.
See also the "Sources" at the end of this file.



Contents
--------

accidentals.ods

alteration-codes.ods

notenames.ods

README.md -- This file



Alteration codes
----------------

This is a proposal for a universal encoding of alterations in an
arbitrary tuning and independent of a specific accidental notation.
An alteration code represents a distinct tone step, i.e. either an
Equal-Temperament tone fraction, or a Just Intonation primary comma,
relative to a base tone in a given scale.

The encoding is based on the Sagittal notation system and the
corresponding code points in SMuFL.
It has been devised for use in Ekmelily to support different tunings.

### Basic concepts

*   All codes are positive integers.

*   0 represents natural.

*   An even code 2n represents an upward alterations.
    An odd code 2n+1 represents the corresponding downward alteration.

*   The codes are grouped into blocks according to the precision classes
    of Sagittal S,A,T,P (see below) and to the corresponding SMuFL ranges.
    The order of codes within a block equals the order of SMuFL code points.

*   The codes are not always contiguous, i.e. there are unused and
    reserved ranges, and not necessarily sorted by alteration.

*   Additional bits are reserved for alternative codes, e.g. for
    enharmonically equivalent accidentals, and possibly for higher
    precisions according to the accidental diacritics in Sagittal.

### Ranges

    Range       Size  Description
    --------------------------------------------------------------------
    0000..01FF  512   Basic codes, bit 0 - 8

    0000..000F  16    No alteration
    0000        1     Natural
    0001..000F  15    -- (accidental-like characters with 0 alteration, spaces ?)

    0010..005F  80    S - Spartan
    0010..001F  16    Single-shaft
    0020..0045  38    Multi-shaft (incl. 2 unused), up to whole tone
    0046..0051  12    up to 5/4 tone
    0052..005F  14    --

    0060..009F  64    A - Athenian (medium precision)
    0060..0087  40    up to whole tone
    0088..0091  10    up to 5/4 tone
    0092..009F  14    --

    00A0..00BF  32    T - Trojan (12-EDO relative)
    00A0..00B7  24    up to whole tone
    00B8..00BD  6     up to 5/4 tone
    00BE..00BF  2     --

    00C0..013F  128   P - Promethean (high precision)
    00C0..00DD  30    Single-shaft
    00DE..00DF  2     --
    00E0..011F  64    Multi-shaft (incl. 2 unused), up to whole tone
    0120..0133  20    up to 5/4 tone
    0134..013F  12    --

    0200..03FF  512   Alternative codes = Basic codes + 0x0200 (bit 9)

    ?                 H - Herculean (very high precision) diacritics
    ?                 O - Olympian (extreme precision) diacritics
    ?                 M - Magrathean (insane precision) diacritics

### Files

The degree in a TUNING field is an integer number, or a fixed point
number for a "fractional degree" (like "1,5"), or it is empty.
Some rows are empty (tabs only). Else the first field is always non-empty.
The rows are in the order of Code.

    Column  Field name    Description
    --------------------------------------------------------------------
    A    1  Code          Alteration code  (H)
    B    2  Name          JI primary comma systematic name
    C    3  Numerator     -,- Primary comma
    D    4  Denominator   -'
    E    5  Class         Sagittal precision class S,A,T,P (see above)
    F    6  Symbol        Sagittal accidental symbol
    G    7  Codepoint     SMuFL code point of the accidental  (H)
    H    8  Long          Sagittal Pure long ASCII representation
    I    9  Short         Sagittal Mixed short ASCII representation
    J   10  TUNING        Degree in TUNING
    :    :  :
    CR  95  :

TUNING is one of the 86 EDO tunings:

    8 9 10 11 12 13 14 15 16 17 18 19
    21 22 23 24 25 26 27 28 29 31 33 34 35 36 37 38 39
    41 42 43 44 45 46 47 48 49 50 51 53 55 56 57 58 59
    60 61 62 63 64 65 68 70 71 72 75 76 77 79
    84 87 88 89 94 96 99
    108 111 112 118 120 125 130 132 142 144
    152 156 168 171 176 180 183 192 217 224



Accidentals
-----------

Tables with the supported accidentals (mostly up to the 5/4 tone).
xx is a notation style predefined in Ekmelily with the consecutive
fields `xxCode`, `xxName`, and optionally `xxAscii`.
The rows are in the order of `index`.

    Column  Field name    Description
    --------------------------------------------------------------------------------
    A  1    index         Consecutive index
    B  2    code          Alteration code  (H)
    C  3    equiv         Y = Enharmonically equivalent accidental, else N
    D  4    step          Step (degree) of the alteration: 0,+1,-1,+2,-2,...
    E  5    fraction      Tone fraction (inflection) of the alteration  (R)
    F  6    cent          Alteration in cents  (R)
    G  7    comma         JI primary comma systematic name
    H  8    xxCode        Code point(s) of the accidental  (H)(S)
    I  9    xxName        Glyph name(s) of the accidental  (S)
    J 10    xxAscii       Alternative ASCII notation (only some notation styles)
    :  :    :             :
    :  :    HEWM          HEWM (Helmholtz/Ellis/Wolf/Monzo) notation (only 72-EDO)
    :  :    altAscii      Another alternative ASCII notation (only 72-EDO)



Note names
----------

Tables with the supported note names (pitch names),
based on the names for 12- and 24-EDO defined in LilyPond.
The rows are in the order of `index`.

    Column  Field name    Description
    ------------------------------------------------------------------------------------
    A  1    index         Consecutive index
    B  2    scale         Index of the scale note (natural note), usually 0 to 6
    C  3    code          Alteration code  (H)
    D  4    rstep         Real step = step (degree) of scale note + alteration
    E  5    step          Step (degree) within the octave
    F  6    exceed        Octave exceed: -1 if rstep < 0, 1 if rstep >= TUNING, else 0
    G  7    fraction      Tone fraction (inflection)  (R)
    H  8    cent          Tone fraction in cents  (R)
    I  9    LANG          Note names in language LANG  (S)
    :  :    :             :



Format
------

*   CSV files are UTF-8 encoded, with comma `,` as field separator,
    and CR+LF as line separator (dialect='excel').

*   Except for some `Short` fields in "alteration-code.csv",
    no field is quoted or has escape sequences.

*   The first row is a header with the field names.

*   (H) Hexadecimal number without a prefix like `U+` or `0x`.

*   (R) Rational or integer number with a leading `+` or `-`.

*   (S) May contain two or more values separated by single space.



Sources
-------

*   SMuFL - Standard Music Font Layout, Version 1.4, 2021.
    A specification for music symbols, introduced by Daniel Spreadbury
    and developed by the
    [W3C Music Notation Community Group](https://www.w3.org/community/music-notation/),
    http://www.smufl.org/ ,
    https://github.com/w3c/smufl .

*   Rolf Maedel, Franz Richter Herf:
    Ekmelische Musik. In: Schriften der Hochschule Mozarteum.
    No. 4, Katzbichler, München/Salzburg 1977, ISBN 3-87397-473-8.

*   Horst-Peter Hesse:
    Breaking into a New World of Sound: Reflections on the Ekmelic Music
    of the Austrian Composer Franz Richter Herf (1920-1989).
    In: Perspectives of New Music, Volume 29 Number 1, Winter 1991.

*   George D. Secor, David C. Keenan:
    Sagittal - A Microtonal Notation System. 2006, 2012, April 2020.
    https://sagittal.org/ .

*   LilyPond - the GNU music typesetter, Version 2.22.
    File "define-note-names.scm" Copyright (C) 2010--2020 Valentin Villenave et al.
    http://lilypond.org/ .

*   Joe Monzo:
    Tonalsoft - Encyclopedia of Microtonal Music Theory.
    http://www.tonalsoft.com/enc/h/hewm.aspx .

*   Suzette Mary Battan:
    Alois Hába's Neue Harmonielehre des diatonischen, chromatischen,
    Viertel-, Drittel-, Sechstel- und Zwölftel-Tonsystems.
    University of Rochester, Rochester, New York 1980.
    Fig. 8. from Alois Hába: Harmonické základy ctvrttónové soustavy, 1922.
    Fig. 13. from Alois Hába: Neue Harmonielehre, 1925, pub. 1927.

*   Gardner Read:
    20th-Century Microtonal Notation.
    p.122, from Brian Ferneyhough: Unity Capsule (1975).

*   Kyle Gann:
    The Arithmetic of Listening: Tuning Theory and History for the Impractical Musician.
    p.212, "EX. 13.9:" Hába, notation for Suite for Violoncello.

*   Jean-Michel Hufflen:
    History of accidentals in music. In: TUGboat, Volume 38, 2017, No. 2, pp. 147.
    https://tug.org/TUGboat/tb38-2/tb119hufflen-music.pdf .

*   Alain Bancquart, Carlos Agon, Moreno Andreatta:
    Microtonal Composition. pp. 279-302.
    http://recherche.ircam.fr/equipes/repmus/moreno/AndreattaMicrotonality.pdf .

*   Marc Sabat, Wolfgang von Schweinitz:
    Extended Helmholtz-Ellis JI Pitch Notation (HEJI).
    https://masa.plainsound.org/pdfs/legend.pdf .

*   M. Kemal Karaosmanoglu:
    A Turkish Makam Music Symbolic Database For Music Information Retrieval: SymbTr.
    2012, ISMIR.
    https://ifdo.ca/~seymour/runabc/makams/index.html .

*   Salah el-Mahdi:
    Al-Turath al-Musiqa al-Tunisiya. Volume 8, 1980.
