# Modulatory space

The spaces described in this article are pitch class spaces which model the relationships between pitch classes in some musical system. These models are often graphs, groups or lattices. Closely related to pitch class space is pitch space, which represents pitches rather than pitch classes, and chordal space, which models relationships between chords.

## Circular pitch class space

The simplest pitch space model is the real line. In the MIDI Tuning Standard, for example, fundamental frequencies f are mapped to numbers p according to the equation
    $p=69+12\log _{2}{(f/440)}$
This creates a linear space in which octaves have size 12, semitones (the distance between adjacent keys on the piano keyboard) have size 1, and A440 is assigned the number 69 (meaning middle C is assigned the number 60). To create circular pitch class space we identify or "glue together" pitches p and p + 12. The result is a continuous, circular pitch class space that mathematicians call Z/12Z.

## Circles of generators

Other models of pitch class space, such as the circle of fifths, attempt to describe the special relationship between pitch classes related by perfect fifth. In equal temperament, twelve successive fifths equate to seven octaves exactly, and hence in terms of pitch classes closes back to itself, forming a circle. We say that the pitch class of the fifth generates – or is a generator of – the space of twelve pitch classes.
By dividing the octave into n equal parts, and choosing an integer m<n such that m and n are relatively prime – that is, have no common divisor – we obtain similar circles, which all have the structure of finite cyclic groups. By drawing a line between two pitch classes when they differ by a generator, we can depict the circle of generators as a cycle graph, in the shape of a regular polygon.

## Toroidal modulatory spaces

If we divide the octave into n parts, where n = rs is the product of two relatively prime integers r and s, we may represent every element of the tone space as the product of a certain number of "r" generators times a certain number of "s" generators; in other words, as the direct sum of two cyclic groups of orders r and s. We may now define a graph with n vertices on which the group acts, by adding an edge between two pitch classes whenever they differ by either an "r" generator or an "s" generator (the so-called Cayley graph of $\mathbb {Z} _{12}$ with generators r and s). The result is a graph of genus one, which is to say, a graph with a donut or torus shape. Such a graph is called a toroidal graph.
An example is equal temperament; twelve is the product of 3 and 4, and we may represent any pitch class as a combination of thirds of an octave, or major thirds, and fourths of an octave, or minor thirds, and then draw a toroidal graph by drawing an edge whenever two pitch classes differ by a major or minor third.
We may generalize immediately to any number of relatively prime factors, producing graphs can be drawn in a regular manner on an n-torus.

## Chains of generators

A linear temperament is a regular temperament of rank two generated by the octave and another interval, commonly called "the" generator. The most familiar example by far is meantone temperament, whose generator is a flattened, meantone fifth. The pitch classes of any linear temperament can be represented as lying along an infinite chain of generators; in meantone for instance this would be -F-C-G-D-A- etc. This defines a linear modulatory space.

## Cylindrical modulatory spaces

A temperament of rank two which is not linear has one generator which is a fraction of an octave, called the period. We may represent the modulatory space of such a temperament as n chains of generators in a circle, forming a cylinder. Here n is the number of periods in an octave.
For example, diaschismic temperament is the temperament which tempers out the diaschisma, or 2048/2025. It can be represented as two chains of slightly (3.25 to 3.55 cents) sharp fifths a half-octave apart, which can be depicted as two chains perpendicular to a circle and at opposite side of it. The cylindrical appearance of this sort of modulatory space becomes more apparent when the period is a smaller fraction of an octave; for example, ennealimmal temperament has a modulatory space consisting of nine chains of minor thirds in a circle (where the thirds may be only 0.02 to 0.03 cents sharp.)

## Five-limit modulatory space

Five limit just intonation has a modulatory space based on the fact that its pitch classes can be represented by 3$^a$ 5$^b$, where a and b are integers. It is therefore a free abelian group with the two generators 3 and 5, and can be represented in terms of a square lattice with fifths along the horizontal axis, and major thirds along the vertical axis.
In many ways a more enlightening picture emerges if we represent it in terms of a hexagonal lattice instead; this is the Tonnetz of Hugo Riemann, discovered independently around the same time by Shohé Tanaka. The fifths are along the horizontal axis, and the major thirds point off to the right at an angle of sixty degrees. Another sixty degrees gives us the axis of major sixths, pointing off to the left. The non-unison elements of the 5-limit tonality diamond, 3/2, 5/4, 5/3, 4/3, 8/5, 6/5 are now arranged in a regular hexagon around 1. The triads are the equilateral triangles of this lattice, with the upwards-pointing triangles being major triads, and downward-pointing triangles being minor triads.
This picture of five-limit modulatory space is generally preferable since it treats the consonances in a uniform way, and does not suggest that, for instance, a major third is more of a consonance than a major sixth. When two lattice points are as close as possible, a unit distance apart, then and only then are they separated by a consonant interval. Hence the hexagonal lattice provides a superior picture of the structure of the five-limit modulatory space.
In more abstract mathematical terms, we can describe this lattice as the integer pairs (a, b), where instead of the usual Euclidean distance we have a Euclidean distance defined in terms of the vector space norm
    $||(a,b)||={\sqrt {a^{2}+ab+b^{2}}}.$

## Seven-limit modulatory space

In similar fashion, we can define a modulatory space for seven-limit just intonation, by representing 3$^a$ 5$^b$ 7$^c$ in terms of a corresponding cubic lattice. Once again, however, a more enlightening picture emerges if we represent it instead in terms of the three-dimensional analog of the hexagonal lattice, a lattice called A$_3$, which is equivalent to the face centered cubic lattice, or D$_3$. Abstractly, it can be defined as the integer triples (a, b, c), associated to 3$^a$ 5$^b$ 7$^c$, where the distance measure is not the usual Euclidean distance but rather the Euclidean distance deriving from the vector space norm
    $||(a,b,c)||={\sqrt {a^{2}+b^{2}+c^{2}+ab+bc+ca}}.$
In this picture, the twelve non-unison elements of the seven-limit tonality diamond are arranged around 1 in the shape of a cuboctahedron.