Erv Wilson's keyboard mapping system
I wrote a somewhat detailed Xenharmonikon article called Another look at Wilson's keyboard mapping system discussing the maths behind Erv Wilson's keyboard mappings. This page summarizes the key equations from the article.
Lattice bases
The keys on the keyboard are labeled by pairs of integers $(x, y)$, their $x$ and $y$ coordinates. The set of all these integer pairs is called a lattice. For two lattice points $(a, b)$ and $(c, d)$, if we can write any lattice point $(x, y)$ as
with integer $p$ and $q$, we say $(a, b)$ and $(c, d)$ form a basis for the lattice. Two points $(a, b)$ and $(c, d)$ form a basis if and only if
Scale degree mapping
One way to map a scale is by always going up $s$ scale degrees when moving one key along a row, and $t$ scale degrees when moving one key up a column, for some step sizes $s$ and $t$.
If we choose scale degrees $m$ and $n$ which we want to form a basis on the keyboard, we can solve for $s$ and $t$. Say the basis is $(a, b)$, $(c, d)$. The conditions that scale degree $m$ is mapped to $(a, b)$ and scale degree $n$ is mapped to $(c, d)$ give two equations
which we can solve for the step sizes $s$ and $t$ to give
where $\Delta = ad - bc = \pm 1$.
Now say we want the step sizes to be positive, so scale degree (and so pitch) increases along a row and up a column. This gives the conditions
If $\Delta = -1$, $c > 0$, and $d > 0$, these conditions are equivalent to
For a given $m/n$, Wilson's Gral method finds all bases $(a, b)$, $(c, d)$ with
- $\Delta = ad - bc = -1$
- $a/c < m/n < b/d$
- $a, b, c, d \geq 0$
The Gral method is a binary search for the fraction $m/n$, starting with the interval $[0/1, 1/0]$ and 'bisecting' each interval $[a/c, b/d]$ with the mediant $(a+b)/(c+d)$. Each interval $[a/c, b/d]$ we encounter in the search has $ad - bc = -1$, so $(a, b)$, $(c, d)$ form a basis, and $a/c < m/n < b/d$ since $m/n$ is in each search interval.
Harmonic template mapping
A harmonic template shows where each octave-reduce harmonic maps onto the keyboard. For example:
* * 7/4 * 2/1
11/8 * * * *
* * * 3/2 *
* * 5/4 * *
* * * * *
* * 1/1 * *
A given ratio is then mapped to the keyboard by writing it as a product of the octave-reduced harmonics, and moving by the step in the template for each factor. This can be written using matrix multiplication; for a given ratio, collecting the exponents of each octave-reduced harmonic in its factorization into a vector $V$, the ratio is mapped to a position $X = (x, y)$ on the keyboard with
where $A$ is the matrix representing the harmonic template.
For the example harmonic template above, the matrix $A$ is
where the columns are the $x$ and $y$ coordinates of $2/1$, $3/2$, $5/4$, $7/4$, and $11/8$ in the harmonic template. The ratio $15/8 = 3/2 \cdot 5/4$ has the vector of exponents $V = [0, 1, 1, 0, 0]$, and is so mapped to
that is to $x = 1$, $y = 5$.
Chain position and keyboard coordinates
Chain position
Given a basis $(a, b)$, $(c, d)$, we can write any key $(x, y)$ on the keyboard as
with integer $p$ and $q$. We can write this as
and solve for $(p, q)$, giving
where $\Delta = ad - bc = \pm 1$ since $(a, b)$, $(c, d)$ is a basis. Call $(p, q)$ the chain coordinates of $(x, y)$ with respect to basis $(a, b)$, $(c, d)$.
Chain coordinates can often be interpreted musically. For example, say the fifth of the scale is mapped to $(a, b)$ and the octave to $(c, d)$. Then $p$ gives the position of a key $(x, y)$ in a chain of fifths on the keyboard, and $q$ gives the number of octaves moved.
When the octave is at $(c, d)$, the chain coordinate $p$ corresponding to $(a, b)$ is called the chain position.
Modulus
Modulus is an extension of scale degree to a two dimensional keyboard. Given a basis $(a, b)$, $(c, d)$ we can assign modulus $m$ to $(a, b)$ and $n$ to $(c, d)$. Then the modulus for $(x, y)$ is defined as $r = mp + nq$, where $(p, q)$ are the chain coordinates of $(x, y)$. The chain position $p$ and modulus $r$ form coordinates for the keyboard, since
which can be inverted to give
Modulus allows us to represent scale tones which come in multiple inflections with different pitches. For example, you could map a 22-tone scale to modulus twelve, viewing it as a 12-tone scale in which ten of the notes come in two inflections.
Notation
Say the fifth is at $(a, b)$ on the keyboard and the octave at $(c, d)$. Pick a step $(e, f)$ to represent a 'comma' on the keyboard — this we pick for our convenience, but good choices are often where say $81/80$ or $64/63$ would be mapped by the harmonic template. Then if we can write a key at $(x, y)$ as
where $u$, $v$, and $w$ are integers, we can use the number of fifths $u$ and number of commas $w$ to define a notation.
The number of fifths $u$ determines the start of the note name according to
| Fifths | … | −3 | −2 | −1 | 0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | … |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Name | … | E♭ | B♭ | F | C | G | D | A | E | B | F♯ | C♯ | … |
Here chain positions from $-1$ through $+5$ are named as F, C, G, D, A, E, B, and the pattern continues by adding a $\sharp$ to go up 7 fifths or a $\flat$ to go down seven fifths. The note name is then completed by adding $w$ slashes, where $w$ is the number of commas. We use a forward slash / if $w$ is positive or a backslash \ if $w$ is negative.
If the fifth is at $(a, b)$ and the octave is at $(c, d)$, $ad - bc$ gives the number of chains of fifths the keyboard will be split into. This is useful since it tells us how many slashes will be required in the notation.