# Mapping

This is a beginner page. It is written to allow new readers to learn about the basics of the topic easily.The corresponding expert page for this topic is Temperament mapping matrix. |

A regular temperament is more than simply a set of pitches. It's a set of notes together with a *consistent rule* that maps any pitch of the relevant just intonation subgroup to a specific note from that set. (In fact, an abstract regular temperament is not a set of definite pitches at all! The pitches can vary, and the rule mapping JI pitches to notes is the thing that uniquely characterizes the temperament.) This consistent rule is known as the *JI mapping* or simply **mapping**. The mapping answers the question "how do I play this JI pitch as a note of this temperament?". The answer will be the "tempered version" of that JI pitch, which may be a very close approximation or a very distant approximation depending on the circumstances.

Naively, one might think that a simple rounding function might be suitable for a mapping: let the "tempered version" of each JI pitch simply be the tempered pitch that is closest to it. However, this (usually) does not result in a regular temperament at all! The reason is that, although this mapping assigns a tempered pitch to each JI pitch, it does not do so in a *consistent* way—some instances of the same JI interval are represented by different tempered intervals if they occur in different places. A regular temperament mapping always represents each JI interval by the *same* tempered interval, even if that tempered interval is not the closest tempered interval to the JI interval.

## A note on mathematical terminology

In mathematics generally, "mapping" is synonymous with "map" and "function". In RTT, "mapping" has the more specific meaning of a *linear* mapping, which is a function that can be represented by a matrix.

## Equal temperament mappings

An equal temperament, also known as a rank-1 temperament (see below for a discussion of rank), is not merely a set of equally spaced pitches. An equal temperament consists of

- A JI subgroup that is being represented, such as "5-limit JI", and
- A mapping that assigns every pitch of this JI subgroup to a note of the equal temperament (which can be represented as an integer).

As an example, let's consider the familiar 12edo considered as a 3-limit temperament. For concreteness, let's use A440 as the base note. In this case the JI subgroup is the 3-limit, that is, all pitches that form a JI interval with A440 whose prime factorization contains no primes other than 2 and 3. For people familiar with mathematical notation, this can be written as

[math]\left\{440\cdot 2^a\cdot 3^b\,\middle|\,a,b\in\mathbb Z\right\}[/math]

Let's use integers to represent the 12edo notes, so that A440 is note 0, the B♭ above that is 1, the A♭ below it is &minud;, and so on. Then the mapping is simply expressed by saying that each factor of 2 counts for 12 steps, and each factor of 3 counts for 19 steps (because 3/1, or 1901.955… cents, is approximated as 1900 cents, or 19 steps of 12edo). (If you want a mathematical formula, that means that the above expression is mapped to 12*a* + 19*b*.) So, for example, 1/1 is mapped to note 0, which is exactly A440; 2/1 is mapped to note 12, the A one octave higher; 3/2 is mapped to note 7 (the E above A440); and 3^{12}/2^{19} (the Pythagorean comma) is mapped to 0, the same note as 1/1.

### Contrast with rounding

Now, consider the pitch 3^{36}/2^{57}. In JI, this pitch is 70.38… cents above A440, so the closest 12edo note to it is B♭. However, if you apply the mapping formula, you see that it is mapped to note 0 (A), not note 1 (B♭). Why is this? The pitch 3^{36}/2^{57}is three Pythagorean commas above A. If each Pythagorean comma is represented by 0 steps, then since 0 + 0 + 0 = 0 the pitch 3^{36}/2^{57} must be represented by A, even though in JI it's closer to B♭. Mapping it to B♭ would require one of the three Pythagorean commas to be represented by 1 complete step (100 cents)! This illustrates the difference between regular mapping and rounding.

### Notation

In regular temperament theory there is a special notation for this kind of JI mapping. We notate the 3-limit 12edo temperament described above as "⟨12 19]", because the first prime (2) is mapped to 12 steps, and the second prime (3) is mapped to 19 steps. This mathematical object is known as a "mapping matrix" and it summarizes all the information in the mapping in a very compact form. Since this is an equal temperament, the mapping matrix contains only one row, and since it's a 3-limit temperament, the mapping matrix contains two columns, representing the primes 2 and 3.

### Many 12edo temperaments

Now, let's consider 12edo, not as a 3-limit temperament, but as a 5-limit temperament. This temperament maps all the 3-limit JI intervals in the same way as above, but in addition also maps the rest of the 5-limit JI intervals. Its mapping matrix is ⟨12 19 28]. It's important to keep in mind that this is, technically speaking, a *different* regular temperament than ⟨12 19], even though they would both be referred to as "12-tone equal temperament" in common parlance.

Furthermore, consider 12edo as an 11-limit temperament. What is its mapping matrix? It actually depends whether you consider 11/8 a "very sharp D" or a "very flat D♯". This choice results in two different mappings, ⟨12 19 28 34 41] and ⟨12 19 28 34 42]. The latter has a more accurate 11/8, but the former has more accurate versions of other intervals, including 12/11. In the language of regular temperament theory, these are simply two different 11-limit temperaments that both happen to have 12 steps per octave. Phrases like "11-limit 12edo" are thus ambiguous because they don't specify the mapping, and therefore don't refer to a specific temperament.

Strictly speaking, "5-limit 12edo" or even "3-limit 12edo" are also ambiguous, because ⟨12 19 27], for example, is a valid temperament even though it's much less accurate than ⟨12 19 28]. In this temperament 5/4 would be represented as 3 steps of 12edo, or 300 cents. For practical purposes, of course, the ambiguity doesn't appear until higher limits.

## Linear temperament mappings

Now let's consider a temperament that does not consist of a single chain of equally spaced notes. For example, consider conventional music notation *without* enharmonic equivalence. Every note of this system can be expressed as some combination of octaves and perfect fourths. For example:

- E5 = A440 + 1 octave − 1 perfect fourths
- B♭4 = A440 − 3 octaves + 5 perfect fourths
- A♯ = A440 + 4 octaves − 7 perfect fourths

In other words, every note can be represented as an ordered pair of integers (*x*, *y*) where *x* is the number of octaves from A440 (positive is up, negative is down), and *y* is the number of perfect fourths.

## Temperamental rank

A temperament's "rank" denotes how many independent chains of generators exist within the temperament. This is a mathematical term that's borrowed from the fields of group theory and linear algebra. It can also be viewed as the dimension of the temperament's mapping.

For example:

- An equal temperament is rank 1, as it exists in its entirety as a stack of one single generator.
- Temperaments which consist of two generators, or more commonly a "period" and a generator, are rank-2. Meantone is a good example, as its separate chain of fifths and chain of octaves constitute two independent generator chains.
- Temperaments which consist of three generators, or more commonly a period and two generators, are rank-3. 5-limit JI, while not being a "temperament" in the traditional sense, would nonetheless be considered rank 3, as its three generators are 2/1, 3/1, and 5/1 (or 2/1, 3/2, and 5/4 if you'd like).
- 7-limit JI would be rank-4, 11-limit JI would be rank-5, 13-limit JI would be rank-6, etc.

A single val in isolation only maps JI onto temperaments that are rank 1. For us to deal with temperaments of rank 2 or higher, we simply need to use more than one val. In general, the number of vals that it requires to fully map a temperament is equal to the temperament's rank.

## Example

At first, we'll consider a 5-limit rank 2 example. A list of vals for such a temperament will take the following form:

⟨a b c] – period

⟨d e f] – generator

The top val is taken by convention to represent the generator chain which is the period, and the bottom one is taken to represent the one which is not.

When mapping a prime in JI onto a rank 2 temperament, one must think about how many steps of each type of generator it takes to reach the final tempered prime interval. For an example, we'll look at meantone temperament, and we'll start by mapping 2/1. We'll assume that the period is 2/1, and the generator is 3/2. 2/1 maps to one period and zero generators, and hence we arrive at

⟨1 _ _]

⟨0 _ _]

3/1 is slightly more complicated – it requires one step along the 2/1 period chain, plus one step along the 3/2 generator chain, to get to 3/1. This is represented by the following mapping:

⟨1 1 _]

⟨0 1 _]

5/1 is simpler – we know that four meantone 3/2 generators gets us to 5/1. Since it lands us directly on 5/1, rather than something like 5/2 or 10/1, we don't need to shift by any octaves, and 4 generators and 0 periods is all we need:

⟨1 1 0]

⟨0 1 4]

This is, in fact, the mapping matrix for meantone temperament, which is what we wanted.

## Change of basis

In the above example, we wrote out the meantone mapping matrix from the perspective of the two generators 2/1 and 3/2. What if we instead wanted to treat the generators as being 2/1 and 4/3? Or, what if we wanted to write it out from the perspective that the generators are 2/1 and 3/1? All of these will lead to different val lists, but will still represent the same temperament.

In the language of mathematics, you've simply **changed the basis** for your temperament, and the resulting temperamental spaces will be **isomorphic** to one another. This is just a fancy way of stating that they're the same temperament.

If we wanted to lay meantone out as having generators of 2/1 and 4/3, we arrive at the following list of vals:

⟨1 2 4]

⟨0 -1 -4]

This is still rather intuitive: the 2/1 still maps to one period and no generators. The 3/1 is now reachable by two periods *minus* a generator, which is to say that it's just two octaves minus a perfect fourth. The 5/1 is a bit more complicated, but maps as four 4/3's *down*, plus four octaves – it is left as an exercise to the reader to prove that in a meantone system this will actually yield 5/1.

If you wanted your basis to be 2/1 and 3/1, you'd end up with the following list of vals (left as an exercise to the reader to derive):

⟨1 0 -4]

⟨0 1 4]

The normal val list is a normalized form among the variety of writing the mapping matrices, and it is what appears in temperament pages on this wiki.

For more information on these sorts of operations, see Generator size manipulation.

## Units

It may be helpful to think of the units of each entry of a mapping as [math]\small 𝗴/𝗽[/math], read "generators per prime." Each mapping row corresponds to a different generator, and each mapping column corresponds to a different prime, and so the value of the mapping entry at the intersection of a given row and column tells how many of the corresponding generator are part of the temperament's approximation of the corresponding prime. For more information, see Dave Keenan & Douglas Blumeyer's guide to RTT: units analysis.

## See also

- Dave Keenan & Douglas Blumeyer's guide to RTT: mappings, for a step-by-step textbook tutorial style introduction to this topic