Skip to content

Constants

Meantonal provides an assortment of constant Map1d and Map2d matrices to use with mapping operations. Most built-in functions in Meantonal abstract over the specific maps being used, so few users will ever need to touch them.

They are of particular utility, however, for people playing with tuning systems other than 12-tone equal temperament, or building graphical visualisations of generalised keyboard layouts.

These maps send any Pitch or Interval to its representation as EDO-steps in a given equal temperament. Intuitively, you can think of them as defining the respect size of whole and half steps after the map. In 12TET, a whole step is two half steps, therefore [2,1][2, 1] is the matrix that projects the Meantonal space onto 12TET.

const Map1d ET7 = {1, 1};
const Map1d ET12 = {2, 1};
const Map1d ET19 = {3, 2};
const Map1d ET31 = {5, 3};
const Map1d ET50 = {5, 3};
const Map1d ET55 = {5, 4};

These maps send any Pitch to its coordinates in the new basis, or vice versa.

These two maps can be used to go to and from the Wicki-Hayden layout:

const Map2d WICKI_TO = {1, -3, 0, 1};
const Map2d WICKI_FROM = {1, 3, 0, 1};

These two maps can be used to go to and from a grid where the x-axis increments by perfect 5th, and the y-axis by octave.

const Map2d GENERATORS_TO = {2, -5, -1, 3};
const Map2d GENERATORS_FROM = {3, 5, 1, 2};

This is potentially useful when calculating concrete pitches from Meantonal’s abstract Pitch vectors in non-EDO tuning systems such as quarter comma meantone, where there are an infinite number of distinct pitches in the system, since it is generated entirely by its fifth and octave (hence the name of this map).