Skip to content

Constants

These Map2D constants are available to change to and from:

  • The Wicki-Hayden coordinate system of (M2, P5) vs. Meantonal’s (M2, m2).
  • The “generators” map of (P5, P8), which is useful for mapping arbitrary note names to frequencies in non-EDO meantone tuning systems like quarter-comma or golden meantone, which have an infinite number of pitches and are generated by their octave and fifth.
WICKI_TO = Map2D(1, -3, 0, 1)
WICKI_FROM = Map2D(1, 3, 0, 1)
GENERATORS_TO = Map2D(2, -5, -1, 3)
GENERATORS_FROM = Map2D(3, 5, 1, 2)

The Python implementation also exports two lookup tables used internally in the construction of Pitch vectors and TonalContexts:

MODES # dict mapping mode names to mode numbers, e.g. MODES["DORIAN"] == 3
# includes the aliases MODES["MAJOR"] == 1 and MODES["MINOR"] == 4
LETTER_COORDS # list of (w, h) tuples, indexed C=0 through B=6,
# giving the base coordinates for each letter name