Harmonic template construction
Erv Wilson's harmonic template construction is an algorithm for finding harmonic templates and so rank-2 regular temperaments. It is presented in the 1992 paper On the Construction of Harmonic Templates.[1]
Algorithm
Pick the octave-reduced harmonics you would like to map, say [math]\displaystyle{ [2/1, 3/2, 5/4, 7/4] }[/math]. Now pick an EDO [math]\displaystyle{ n }[/math], say [math]\displaystyle{ n = 31 }[/math], and find the scale degrees nearest in pitch to the harmonics, giving [math]\displaystyle{ [31, 18, 10, 25] }[/math]. Now pick a scale degree [math]\displaystyle{ m }[/math] to use as generator, and for each scale degree [math]\displaystyle{ r }[/math] find a chain position [math]\displaystyle{ p }[/math] such that [math]\displaystyle{ pm \bmod n = r }[/math], with [math]\displaystyle{ 0 \leq p < n }[/math] . Taking [math]\displaystyle{ m = 18 }[/math], for the scale degrees [math]\displaystyle{ [31, 18, 10, 25] }[/math] we get chain positions [math]\displaystyle{ [0, 1, 4, 10] }[/math]. Consider also the negative chain positions which are [math]\displaystyle{ n }[/math] less than these, so here [math]\displaystyle{ [-31, -30, -27, -21] }[/math]. We have a choice whether to use the positive or negative chain position for each harmonic; for this example choose all the positive chain positions. Assemble the scale degrees and chain positions into a matrix, here \begin{displaymjx} \begin{bmatrix} 31 & 18 & 10 & 25 \\ 0 & 1 & 4 & 10 \end{bmatrix}. \end{displaymjx} We now need to calculate period counts [math]\displaystyle{ q }[/math] from each pair of scale degree [math]\displaystyle{ r }[/math] and chain position [math]\displaystyle{ p }[/math]. We want [math]\displaystyle{ pm + qn = r }[/math], so [math]\displaystyle{ q = (r - pm)/n }[/math]. Replace the scale degree row with the period counts, to give \begin{displaymjx} \begin{bmatrix} 1 & 0 & -2 & -5 \\ 0 & 1 & 4 & 10 \end{bmatrix}. \end{displaymjx} This matrix represents a harmonic template, and is almost our mapping; we just need to change basis from octave-reduced harmonics 2/1, 3/2, 5/4, ... to harmonics 2, 3, 5, ... . To do this, add the number of octaves each harmonic has been reduced by to the corresponding period count in the first row (0 for 2/1, 1 for 3/2, 2 for 5/4 and 7/4), to give \begin{displaymjx} \begin{bmatrix} 1 & 1 & 0 & -3 \\ 0 & 1 & 4 & 10 \end{bmatrix}. \end{displaymjx} This is the matrix of a mapping for a rank-2 regular temperament, in this case septimal meantone.
This algorithm can be understood in terms of Wilson's keyboard mapping theory; in particular, Wilson uses scale degree and chain position as coordinates on the keyboard.[2]
Code
The following Python code implements Wilson's harmonic template construction and the conversion into a mapping matrix.
from fractions import Fraction
from math import log2
harmonics = [Fraction(2, 1), Fraction(3, 2), Fraction(5, 4), Fraction(7, 4)]
n = 31
scale_degrees = [round(n * log2(h)) for h in harmonics]
m = 18
chain_positions_positive = [(pow(m, -1, n) * r) % n for r in scale_degrees]
chain_positions_negative = [p - n for p in chain_positions_positive]
# Choose all positive chain positions for this example
chain_positions = chain_positions_positive
period_counts = [(r - p * m) // n for r, p in zip(scale_degrees, chain_positions)]
period_counts = [q + int(log2(h.denominator)) for q, h in zip(period_counts, harmonics)]
print(scale_degrees)
print(chain_positions_positive)
print(chain_positions_negative)
print()
print(period_counts)
print(chain_positions)
Temperaments
Since harmonic templates are equivalent to rank-2 mappings, Wilson's paper On the Construction of Harmonic Templates is effectively a catalogue of regular temperaments.[1] The tables below show how Wilson's templates correspond to temperaments later found and named. In Wilson's paper each template is given out to at least the 13-limit; the tables below give lower limits separately for convenience. The mappings are given in Hermite normal form.
5-limit
| Generator | Harmonic template table | Mapping | Temperament |
|---|---|---|---|
| 5/22 | [math]\displaystyle{ \begin{bmatrix} 22 & 13 & 7 \\ 0 & 7 & -3 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 3 \\ 0 & 7 & -3 \end{bmatrix} }[/math] | Orson |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 \\ 0 & 6 & 5 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 \\ 0 & 6 & 5 \end{bmatrix} }[/math] | Kleismic |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 \\ 0 & 1 & -8 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 \\ 0 & 1 & -8 \end{bmatrix} }[/math] | Schismic |
7-limit
| Generator | Harmonic template table | Mapping | Temperament |
|---|---|---|---|
| 5/22 | [math]\displaystyle{ \begin{bmatrix} 22 & 13 & 7 & 18 \\ 0 & 7 & -3 & 8 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 3 & 1 \\ 0 & 7 & -3 & 8 \end{bmatrix} }[/math] | Orwell |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 \\ 0 & 6 & 5 & 3 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 \\ 0 & 6 & 5 & 3 \end{bmatrix} }[/math] | Keemun |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 \\ 0 & 6 & 5 & -12 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 6 \\ 0 & 6 & 5 & -12 \end{bmatrix} }[/math] | Catalan |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 \\ 0 & 6 & 5 & 22 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & -3 \\ 0 & 6 & 5 & 22 \end{bmatrix} }[/math] | Catakleismic |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 \\ 0 & 6 & 5 & -31 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 11 \\ 0 & 6 & 5 & -31 \end{bmatrix} }[/math] | Countercata |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 \\ 0 & 1 & -8 & 39 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & -59 \\ 0 & 1 & -8 & 39 \end{bmatrix} }[/math] | Pontiac |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 \\ 0 & 1 & -8 & -14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & 25 \\ 0 & 1 & -8 & -14 \end{bmatrix} }[/math] | Garibaldi |
11-limit
| Generator | Harmonic template table | Mapping | Temperament |
|---|---|---|---|
| 5/22 | [math]\displaystyle{ \begin{bmatrix} 22 & 13 & 7 & 18 & 10 \\ 0 & 7 & -3 & 8 & 2 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 3 & 1 & 3 \\ 0 & 7 & -3 & 8 & 2 \end{bmatrix} }[/math] | Orwell |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 & 7 \\ 0 & 6 & 5 & 3 & 13 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & 0 \\ 0 & 6 & 5 & 3 & 13 \end{bmatrix} }[/math] | Darjeeling |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 & 7 \\ 0 & 6 & 5 & 3 & -2 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & 4 \\ 0 & 6 & 5 & 3 & -2 \end{bmatrix} }[/math] | Keemun |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 & 7 \\ 0 & 6 & 5 & -12 & -2 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 6 & 4 \\ 0 & 6 & 5 & -12 & -2 \end{bmatrix} }[/math] | Catalan |
| 5/19 | [math]\displaystyle{ \begin{bmatrix} 19 & 11 & 6 & 15 & 9 \\ 0 & 6 & 5 & 3 & 17 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & -1 \\ 0 & 6 & 5 & 3 & 17 \end{bmatrix} }[/math] | Qeema |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 \\ 0 & 6 & 5 & 22 & 32 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & -3 & -5 \\ 0 & 6 & 5 & 22 & 32 \end{bmatrix} }[/math] | Cataclysmic |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 \\ 0 & 6 & 5 & -31 & 32 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 11 & -5 \\ 0 & 6 & 5 & -31 & 32 \end{bmatrix} }[/math] | Countercata |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 \\ 0 & 6 & 5 & 22 & -21 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & -3 & 9 \\ 0 & 6 & 5 & 22 & -21 \end{bmatrix} }[/math] | Catakleismic |
| 19/72 | [math]\displaystyle{ \begin{bmatrix} 72 & 42 & 23 & 58 & 33 \\ 0 & 6 & 5 & 22 & 51 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & -3 & -10 \\ 0 & 6 & 5 & 22 & 51 \end{bmatrix} }[/math] | Catalytic |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 \\ 0 & 1 & -8 & -14 & 23 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & 25 & -33 \\ 0 & 1 & -8 & -14 & 23 \end{bmatrix} }[/math] | Cassandra |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 \\ 0 & 1 & -8 & 39 & -30 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & -59 & 51 \\ 0 & 1 & -8 & 39 & -30 \end{bmatrix} }[/math] | Helenoid |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 \\ 0 & 1 & -8 & -14 & -30 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & 25 & 51 \\ 0 & 1 & -8 & -14 & -30 \end{bmatrix} }[/math] | Helenus |
13-limit
| Generator | Harmonic template table | Mapping | Temperament |
|---|---|---|---|
| 7/31 | [math]\displaystyle{ \begin{bmatrix} 31 & 18 & 10 & 25 & 14 & 22 \\ 0 & 7 & -3 & 8 & 2 & 12 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 3 & 1 & 3 & 1 \\ 0 & 7 & -3 & 8 & 2 & 12 \end{bmatrix} }[/math] | Winston |
| 7/31 | [math]\displaystyle{ \begin{bmatrix} 31 & 18 & 10 & 25 & 14 & 22 \\ 0 & 7 & -3 & 8 & 2 & -19 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 3 & 1 & 3 & 8 \\ 0 & 7 & -3 & 8 & 2 & -19 \end{bmatrix} }[/math] | Orwell |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 & 7 & 11 \\ 0 & 6 & 5 & 3 & 13 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & 0 & 0 \\ 0 & 6 & 5 & 3 & 13 & 14 \end{bmatrix} }[/math] | Darjeeling |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 & 7 & 11 \\ 0 & 6 & 5 & 3 & -2 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & 4 & 0 \\ 0 & 6 & 5 & 3 & -2 & 14 \end{bmatrix} }[/math] | Keemun |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 & 7 & 11 \\ 0 & 6 & 5 & 3 & -2 & -1 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & 4 & 4 \\ 0 & 6 & 5 & 3 & -2 & -1 \end{bmatrix} }[/math] | Kumbaya |
| 4/15 | [math]\displaystyle{ \begin{bmatrix} 15 & 9 & 5 & 12 & 7 & 11 \\ 0 & 6 & 5 & -12 & -2 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 6 & 4 & 0 \\ 0 & 6 & 5 & -12 & -2 & 14 \end{bmatrix} }[/math] | Catalan |
| 5/19 | [math]\displaystyle{ \begin{bmatrix} 19 & 11 & 6 & 15 & 9 & 13 \\ 0 & 6 & 5 & 3 & 17 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & -1 & 0 \\ 0 & 6 & 5 & 3 & 17 & 14 \end{bmatrix} }[/math] | Qeema |
| 5/19 | [math]\displaystyle{ \begin{bmatrix} 19 & 11 & 6 & 15 & 9 & 13 \\ 0 & 6 & 5 & 3 & -2 & -5 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 2 & 4 & 5 \\ 0 & 6 & 5 & 3 & -2 & -5 \end{bmatrix} }[/math] | Kimah |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 & 37 \\ 0 & 6 & 5 & 22 & 32 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & -3 & -5 & 0 \\ 0 & 6 & 5 & 22 & 32 & 14 \end{bmatrix} }[/math] | Cataclysmic |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 & 37 \\ 0 & 6 & 5 & -31 & 32 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & 11 & -5 & 0 \\ 0 & 6 & 5 & -31 & 32 & 14 \end{bmatrix} }[/math] | Countercata |
| 14/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 & 37 \\ 0 & 6 & 5 & 22 & -21 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & -3 & 9 & 0 \\ 0 & 6 & 5 & 22 & -21 & 14 \end{bmatrix} }[/math] | Catakleismic |
| 19/72 | [math]\displaystyle{ \begin{bmatrix} 72 & 42 & 23 & 58 & 33 & 50 \\ 0 & 6 & 5 & 22 & 51 & 14 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 1 & -3 & -10 & 0 \\ 0 & 6 & 5 & 22 & 51 & 14 \end{bmatrix} }[/math] | Catalytic |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 & 37 \\ 0 & 1 & -8 & -14 & 23 & 20 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & 25 & -33 & -28 \\ 0 & 1 & -8 & -14 & 23 & 20 \end{bmatrix} }[/math] | Cassandra |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 & 37 \\ 0 & 1 & -8 & 39 & -30 & 20 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & -59 & 51 & -28 \\ 0 & 1 & -8 & 39 & -30 & 20 \end{bmatrix} }[/math] | Helena |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 & 37 \\ 0 & 1 & -8 & 39 & -30 & -33 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & -59 & 51 & 56 \\ 0 & 1 & -8 & 39 & -30 & -33 \end{bmatrix} }[/math] | Helenoid |
| 31/53 | [math]\displaystyle{ \begin{bmatrix} 53 & 31 & 17 & 43 & 24 & 37 \\ 0 & 1 & -8 & -14 & -30 & -33 \end{bmatrix} }[/math] | [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 15 & 25 & 51 & 56 \\ 0 & 1 & -8 & -14 & -30 & -33 \end{bmatrix} }[/math] | Helenus |
References
- ↑ 1.0 1.1 Erv Wilson, On the Construction of Harmonic Templates. 1992
- ↑ Naren Ratan, Another look at Wilson's keyboard mapping system. Xenharmonikon Online, 2026