Tuning musical instruments is weird and beautiful and fascinating and complicated and annoying. For as long as people have been thinking about how music works, they’ve been wrestling with various incarnations and shadows of something that feels like an impossibility theorem. One of the earliest such results, which dates back to both ancient Greece and ancient China, is the fact that 2192^{19} is almost but not quite equal to 3123^{12}. The ratio 312/219=5314415242881.013643^{12} / 2^{19} = \frac{531441}{524288} \approx 1.01364 is called the Pythagorean comma. It’s the frequency difference between a stack of 12 perfectly tuned fifths (with frequency ratio 32\frac{3}{2}) and 7 perfect octaves (with frequency ratio 21\frac{2}{1}). The Pythagorean comma is about 23.46 cents. If you go to a piano and pluck out a sequence of twelve perfect fifths, you end up at a note seven octaves above where you started, and you’ll hit all twelve notes of the chromatic scale once along the way; this is the circle of fifths. But if these perfect fifths were tuned exactly, we would end up a Pythagorean comma above the note we would expect. (And in fact, this is one reason why we have enharmonic names for notes. In Pythagorean tuning, B# is not the same as C, because B# is a stack of 12 perfect fifths above C.) Another way to measure this frequency ratio is in cents, which is a logarithmic scale with 1200 cents per octave, so that 100 cents is the size of an equal-tempered semitone.

Comma pumps

One of the downstream effects of this inconsistency (noticed at least by the 17th century) is the existence of comma pumps. A comma pump is a chord progression that forces the pitch center to shift by a comma if performed in just intonation. If you perform a sequence of chords, with each one tuned correctly, you’ll return to the original chord at the end but the pitches will all be slightly higher or lower than in the original chord. Online sources don’t usually do a great job of explaining how this works, either making it sound too complex or mystical, or ignoring the things that make it work. The thing that makes this forced (rather than just evidence that you’ve gone out of tune) is common-tone voice leading. If you play one chord followed by another, and those chords have some notes in common, you should probably play the shared notes at exactly the same pitch. If those chords have fixed tunings (e.g. major triads are correctly tuned when the frequencies of their pitches form the ratio 4:5:64:5:6), the frequencies of all the remaining notes are determined by their relationship with the shared notes. So if you have a sequence of chords where each pair shares at least one note, and expect all the chords to be justly tuned, you have no choice about where the tuning ends up at the end.

As an example, let’s look at the chord progression Cmaj-Fmaj-Dmin-Gmaj-Cmaj (I-IV-ii-V-I in C major). We’ll consider the ratio of the root of each chord to our initial C as we move along the progression:

  • Fmaj (F-A-C) shares the pitch C with Cmaj (C-E-G), so the root of Fmaj needs to be a perfect fifth below or a perfect fourth above C; that’s a ratio of 43\frac{4}{3}.
  • Dmin (D-F-A) shares both F and A with Fmaj, so its root should be a minor third below F, a ratio of 56\frac{5}{6}.
  • Gmaj (G-B-D) shares the pitch D with Dmin, so its root needs to be a perfect fourth above D, another 43\frac{4}{3}.
  • Finally, Cmaj shares the pitch G with Gmaj, so its root needs to be a perfect fifth below G, a ratio of 23\frac{2}{3}.

Multiplying these all together we have 43564323=255234=8081\frac{4}{3} \cdot \frac{5}{6} \cdot \frac{4}{3} \cdot \frac{2}{3} = \frac{2^5 \cdot 5}{2 \cdot 3^4} = \frac{80}{81} (-21.51 cents). The C we came back to at the end of the progression is slightly lower in pitch than the one we started with! The difference here is called the syntonic comma, usually defined as the difference between four perfect fifths (32)4\left(\frac{3}{2}\right)^4 and two octaves plus a major third 22542^2 \cdot \frac{5}{4}. Here’s what that sounds like:

The descent is not subtle (a longer progression would probably make it harder to detect), but it’s hard to decide exactly where things go wrong. It’s like the reverse of the Penrose staircase: instead of descending a continuous downhill path and somehow returning back to the same spot, you follow a path that’s supposed to loop back to the beginning and find yourself slightly lower than you started.

Holonomy

If you’re like me, impossible figures should make you think about algebraic topology. If comma pumps are like musical impossible figures, where’s the topology? Here’s one approach: given a set of chords, we can form a voice leading graph where we have one vertex for each chord, and an edge between any two chords that share a note. (Or, if you want to be pickier, you can require them to share two notes.) Paths in this graph are admissible chord progressions, and a cycle is a chord progression that returns to the original chord. If we now assign each chord a tuning, we can annotate each (oriented) edge by the frequency ratio between their roots induced by the choice of tuning.1 This is a gadget with many different names. You could call it a gain graph with gain group Q+×\mathbb{Q}^\times_{+}. Or you could think of this data as providing an element of C1(G;Q+×)C^1(G;\mathbb{Q}^\times_+). Or, somewhat less precisely but more evocatively, you could think of this as a flat connection for a discrete fiber bundle with structure group Q+×\mathbb{Q}^\times_+. You could even construct a cellular sheaf from this data, although it turns out that’s less convenient to work with.

The point is that now every loop in the graph (i.e. any chord progression) has an associated holonomy (i.e. a change in root pitch frequency) given by taking the product of the root ratios for every edge it traverses. This gives us a map Φ:π1(G)Q+×\Phi: \pi_1(G) \to \mathbb{Q}^\times_+; since the target is abelian this map factors through H1(G;Z)H_1(G;\mathbb{Z}) and is determined by its values there, so we may as well just descend to homology. Any chord progression that is not a comma pump is in the kernel of this holonomy map. So H1(G;Z)/kerΦH_1(G;\mathbb{Z}) / \ker \Phi classifies the possible comma pumps for a given family of chords.

This algebraic fact gives us some additional insight into how many comma pumps can exist. Just intonation tuning is often performed in a “prime limit,” which restricts the prime factors that can appear in the numerator and denominator of a pitch ratio. 5-limit just intonation allows for factors of 2, 3, and 5. This means that all frequency ratios involved live in a subgroup of Q+×\mathbb{Q}^\times_+, one isomorphic to Z3\mathbb{Z}^3, with one factor for each prime. The mathematical tuning community, for its own whimsical reasons, has decided to call this representation the group of monzos, and writes them as kets: for example, 4  4  1\lvert-4\; 4\; {-1}\rangle represents 8180\frac{81}{80} as a 5-limit monzo. It’s also common to ignore octave differences, meaning we take the quotient Q+×/2\mathbb{Q}^\times_+ / \langle 2 \rangle, or just drop the first factor of Zn\mathbb{Z}^n. Let’s call this monzo subgroup Λ\Lambda, since we can think of it as a lattice.

By construction, the map H1(G;Z)/kerΦΛH_1(G;\mathbb{Z}) / \ker \Phi \to \Lambda is injective. So there are at most rank Λ\text{rank } \Lambda independent comma pumps. A chord family tuned in 5-limit JI can have at most two independent comma pumps, a family tuned in 7-limit JI can have at most three, and so on. Note that Φ\Phi is generally not surjective. If it were, it would mean that there is a single chord progression that when followed, results in a root pitch that is, say, a perfect fifth above the starting point. (The quotient Λ/im Φ\Lambda / \text{im } \Phi can be thought of as a temperament: it collapses the commas into unisons. This is one of the central pieces of mathematical tuning theory.)

Geometric realizations

At least sometimes, we can find a nice family of 2-cells whose boundary spans kerΦ\ker \Phi, giving us a cell complex XX with 1-skeleton GG such that H1(X;Z)H_1(X;\mathbb{Z}) is the space of comma pumping chord progressions. The generating cells should be bounded by something like minimal comma-free chord progressions. This is the case for the triads of the major diatonic scale.2 They form a graph like this:

Diagram of the triads of the major scale, forming a Möbius strip

Each of the triangles in this graph can be filled in (just multiply the ratios around the boundary, taking into account orientation). Gluing the ends together gives us a Möbius strip, which has H1(X;Z)=ZH_1(X;\mathbb{Z}) = \mathbb{Z}. So there is at most one class of comma pumps within this family of chords. In fact, our comma pump from earlier is here: it’s I-IV-ii-V-I in C major. Multiplying ratios along the path gives us (up to octave equivalence and inversion) the syntonic comma 8081\frac{80}{81}. Every comma pump progression you can generate with this set of chords moves the root pitch by a syntonic comma (or a power thereof). For instance, you can follow the circle of fifths-like progression I-IV-vii°-iii-vi-ii-V-I. This progression never repeats a chord, but it pumps (8081)2\left(\frac{80}{81}\right)^2. This is because it’s a cycle that follows the boundary of the Möbius strip, which is twice a generator of H1H_1.

What if we look at all major and minor triads on the chromatic scale? To keep the drawing simple, we’ll only allow voice leading between chords with two shared notes.3 (Note that we are assuming enharmonic equivalence here, which is again not typically how just intonation theory works.)

This is the dual graph of Euler’s Tonnetz, a triangular lattice where vertices correspond with notes and 2-simplices correspond with chords. There are two root intervals available (three if you count the unison between the major and minor chord on the same root): a minor third and a major third. The natural dual cell structure combined with enharmonic and octave equivalence makes this into a torus. This again lets us conclude that there are at most two independent comma pumps available. And there are two independent comma pumps:

  • Amaj-Amin-Fmaj-Fmin-C#maj-C#min-Amaj pumps 128125=7  0  3\frac{128}{125} = \lvert 7\; 0 \; {-3}\rangle (41.06 cents). This is the (lesser) diesis or augmented comma, the difference between a stack of three major thirds and an octave.
  • Cmaj-Cmin-Ebmaj-Ebmin-F#maj-F#min-Amaj-Amin-Cmaj pumps 648625=3  4  4\frac{648}{625} = \lvert 3\; 4\; {-4} \rangle (62.57 cents), which is the greater diesis or diminished comma. This is the difference between a stack of four minor thirds and an octave.

The monzos are linearly independent, and we can see on the diagram that the corresponding comma pumps are independent generators of H1H_1.

These comma pumps are not too surprising—the chord roots move uniformly in major or minor thirds. But where’s the syntonic comma? Well, 8180=648625/128125\frac{81}{80} = \frac{648}{625} / \frac{128}{125}. (Or equivalently in cents, 21.51=62.5741.0621.51 = 62.57 - 41.06.) Because Φ\Phi is a group homomorphism, we can construct a chord progression that pumps the syntonic comma by addition in H1H_1: subtract the progression that pumps the augmented comma from the progression that pumps the diminished comma. Then we can produce a simplified homologous cycle by homotopy across 2-cells. One example progression would be Cmaj-Emin-Gmaj-Bmin-Dmaj-Dmin-Fmaj-Amin-Cmaj.

What else?

There are a lot of other interesting questions to ask inside this framework; maybe I’ll do some of them next:

  • More exotic chord families. For instance, what happens when you introduce chord families with harmonic sevenths (as in barbershop music)? Chords from symmetric scales like the diminished scale?
  • Alternate chord tunings. Performers may want to select tunings on the fly to avoid the possibility of a comma pump. We could model this by adding a complex mapping down onto our chord complex, whose fibers correspond with alternate tunings, with the central question being whether we can lift a cycle in the base complex to a holonomy-free one.
  • Inverse problems. What must be true in order to produce a chord family with no comma pumps, or a family that has progressions pumping a specific interval?
  • Torsion. All the holonomy we see here generates a free subgroup of Q+×/2\mathbb{Q}^\times_+ / \langle 2 \rangle. The quotient doesn’t introduce any torsion here, but if we lift to R+×/2\mathbb{R}^\times_+ / \langle 2 \rangle there could be commas that when stacked equal an octave. The most likely way to get this is by tempering intervals to an EDO (equal division of the octave) scale that doesn’t temper out a particular comma.
  1. There’s a subtlety here: once we have assigned tunings to chords, there’s a possibility that intervals fail to match between two chords that share more than one note. We can either require that we assign consistent tunings, or remove edges where the tunings are inconsistent between the chords. 

  2. There’s a bit of fussiness around the diminished vii° chord. There isn’t a standard just tuning of this chord, and to make this work out as a Möbius strip, I’ve chosen 25:30:36 (two stacked pure minor thirds), which is definitely not the tuning most people would reach for. If you use another tuning, the vii°-ii transition isn’t allowed because the intervals don’t match, so the complex ends up with a hole. This would normally introduce another generator to H1H_1, but it turns out that another more complex 2-cell shows up to kill that generator. 

  3. If we allow voice leading with only one shared note, every 2-cell in the complex becomes a K6K_6. Filling in all the higher-dimensional simplices gives a space that is homotopy equivalent to a torus, so all the same conclusions still hold, and the comma pumps are actually significantly simpler.