What is this about?

Recursive just intonation is a novel toy-tuning system that I came up with during my high school physics classes, It’s very easy to predict why it won’t become popular. That said I find it interesting and both mathematically and musically beautiful, so I decided to write this blogpost (listening examples further below).

Equal Temperament vs Just Intonation

Equal temperament gives us one frequency table. Every C# is the same C#, every G is the same G, and every semitone is the same distance from the last one. That is very convenient, at the cost of shaving almost every interval a little. The intervals are close enough to simple ratios that they work, but all of them are not exact.

Just intonation goes the other way. It treats notes as relationships to a root, then builds those relationships from simple frequency ratios:

  • octave: 2/1
  • perfect fifth: 3/2
  • major third: 5/4
  • major chord: 4:5:6, or 1/1, 5/4, 3/2

Those ratios sound still and locked-in because their waveforms repeat against each other quickly. In a just major chord, the consonance comes directly from the exact 4:5:6 relationship.

12-TET

In 12-tone equal temperament, the ratio between adjacent semitones is:

2^(1/12) = 1.059463...

The frequency of a note n semitones above some reference note is:

frequency(n) = reference * 2^(n/12)

The nice property is composability:

2^(1/12) * 2^(1/12) = 2^(2/12)

Going up two semitones one step at a time lands at the same frequency as jumping up two semitones directly. This is why transposition is easy in equal temperament. There is only one global grid.

Just Intonation

The annoying part is that just intonation normally needs a root. A 5/4 major third above C is E. A 5/4 major third above E is G#/Ab. Those two facts cannot both fit into one fixed 12-note keyboard unless we allow the same pitch name to mean different frequencies in different harmonic contexts.

For a C-based just-intonation scale, the 12 pitch classes could be (if chosen from the overtone series):

pitchratio from CNth overtone
C1/10th
C#/Db17/1616th
D9/88th
D#/Eb19/1618th
E5/44th
F21/1621st
F#/Gb11/810th
G3/23rd
G#/Ab13/812th
A27/1626th
A#/Bb7/46th
B15/814th
C2/11st

This already makes a C major chord exact:

C = 1/1
E = 5/4
G = 3/2

But an E major chord on the same fixed C just keyboard has a problem:

E      = 5/4
G#/Ab  = 13/8
B      = 15/8

Relative to E, the G#/Ab is:

(13/8) / (5/4) = 13/10 = 1.3

A just major third should be 5/4 = 1.25. So the E major chord has a fifth that works and a third that is too high by about 34.3 cents. That is not a tiny rounding error. It is enough to make the chord feel tense.

What The Waves Look Like

Nice mathematical ratios are pleasant to our ears. x + 2*x, where x is some frequency, sounds nice because it has a short period:

A tone and its octave: two sine waves at a base frequency f and 2f. The whole pattern repeats every 1/f seconds, so the ear can lock onto it easily.

While, for example, x + 13/12*x has a much longer period:

A tone and a narrow nearby step: two sine waves at f and 13/12 f. The combined wave needs 12/f seconds to repeat, so it takes much longer to settle than the octave example.

A just major chord is 4:5:6, or 1:1.25:1.5. In 12-TET, the same chord is closer to 500:630:749, or 1:1.260:1.498.

Two major chords: the just version uses exact 4:5:6 ratios, while the 12-TET version uses the familiar piano/guitar approximation. They are close, but the 12-TET peaks do not quite return to the same places.

12 Just Pianos | Recursive Just Intonation

Here is what I call recursive just intonation:

Keep the roots on a C-based just-intonation keyboard, but give every chord root its own just-intonated keyboard.

I think of it as 12 pianos: one just piano rooted on C, one on C#/Db, one on D, and so on. The root of each piano is taken from the original C just-intonation scale. Once a chord chooses a root, all of its notes come from the piano rooted on that note.

This is “recursive” in the simple algorithmic sense: use a just-ratio table to choose the chord root, then use the same ratio table again inside that root.

For an E major chord:

E      = C * 5/4
G#/Ab  = E * 5/4 = C * 25/16
B      = E * 3/2 = C * 15/8

Now the E major chord is internally just:

E : G# : B = 1 : 5/4 : 3/2 = 4 : 5 : 6

The cost is that G#/Ab is no longer globally stable. Fixed-C just intonation puts G#/Ab at 51/32 from C. Recursive just intonation puts the G#/Ab inside E major at 25/16 from C.

fixed C just G#/Ab    = 13/8 = 1.625
recursive E-major G#  = 25/16 = 1.5625

Those are different notes hiding under the same name.

The general formula is:

recursive_frequency(root, degree) =
    C_frequency * J[root] * J[degree]

where J[x] is the just-ratio table above, with octave correction whenever the index crosses C again.

The table below is the “12 pianos” idea written out as frequencies. To keep the numbers concrete, I set the C root to 130.813 Hz.

How to read it:

  • The left column chooses the chord root, or “which piano” you are using.
  • The top row chooses the interval above that root. These are ratios, not note names.
  • The cell tells you the frequency to play for that local interval.
  • The color and small label inside the cell show the resulting pitch name. Cells with the same pitch name share a color.
  • The cents line shows how far that frequency is from 12-TET for the same pitch name.

For example, an E major chord uses the E row and the 1/1, 5/4, and 3/2 columns. That gives 163.516 Hz, 204.395 Hz, and 245.274 Hz. In another octave, multiply or divide the whole row by 2.

local rootCC#/DbDD#/EbEFF#/GbGG#/AbAA#/BbB
C130.813 Hz0.000 cents138.989 Hz4.955 cents147.164 Hz3.910 cents155.340 Hz-2.487 cents163.516 Hz-13.686 cents171.692 Hz-29.219 cents179.868 Hz-48.682 cents196.219 Hz1.955 cents212.571 Hz40.528 cents220.747 Hz5.865 cents228.922 Hz-31.174 cents245.274 Hz-11.731 cents
C#/Db260.604 Hz-6.776 cents138.989 Hz4.955 cents147.675 Hz9.911 cents156.362 Hz8.865 cents165.049 Hz2.468 cents173.736 Hz-8.731 cents182.423 Hz-24.264 cents191.109 Hz-43.727 cents208.483 Hz6.910 cents225.856 Hz45.483 cents234.543 Hz10.820 cents243.230 Hz-26.219 cents
D257.538 Hz-27.264 cents275.933 Hz-7.821 cents147.164 Hz3.910 cents156.362 Hz8.865 cents165.560 Hz7.820 cents174.758 Hz1.423 cents183.956 Hz-9.776 cents193.153 Hz-25.309 cents202.351 Hz-44.772 cents220.747 Hz5.865 cents239.142 Hz44.438 cents248.340 Hz9.775 cents
D#/Eb262.137 Hz3.378 cents271.845 Hz-33.661 cents291.263 Hz-14.218 cents155.340 Hz-2.487 cents165.049 Hz2.468 cents174.758 Hz1.423 cents184.466 Hz-4.974 cents194.175 Hz-16.173 cents203.884 Hz-31.706 cents213.593 Hz-51.169 cents233.010 Hz-0.532 cents252.428 Hz38.041 cents
E265.714 Hz26.841 cents275.933 Hz-7.821 cents286.153 Hz-44.860 cents306.593 Hz-25.418 cents163.516 Hz-13.686 cents173.736 Hz-8.731 cents183.956 Hz-9.776 cents194.175 Hz-16.173 cents204.395 Hz-27.373 cents214.615 Hz-42.905 cents224.835 Hz-62.368 cents245.274 Hz-11.731 cents
F257.538 Hz-27.264 cents278.999 Hz11.309 cents289.730 Hz-23.354 cents300.461 Hz-60.393 cents321.922 Hz-40.950 cents171.692 Hz-29.219 cents182.423 Hz-24.264 cents193.153 Hz-25.309 cents203.884 Hz-31.706 cents214.615 Hz-42.905 cents225.345 Hz-58.438 cents236.076 Hz-77.901 cents
F#/Gb247.318 Hz-97.364 cents269.801 Hz-46.727 cents292.285 Hz-8.154 cents303.527 Hz-42.817 cents314.768 Hz-79.856 cents337.252 Hz-60.413 cents179.868 Hz-48.682 cents191.109 Hz-43.727 cents202.351 Hz-44.772 cents213.593 Hz-51.169 cents224.835 Hz-62.368 cents236.076 Hz-77.901 cents
G257.538 Hz-27.264 cents269.801 Hz-46.727 cents294.329 Hz3.910 cents318.856 Hz42.483 cents331.120 Hz7.820 cents343.384 Hz-29.219 cents367.911 Hz-9.776 cents196.219 Hz1.955 cents208.483 Hz6.910 cents220.747 Hz5.865 cents233.010 Hz-0.532 cents245.274 Hz-11.731 cents
G#/Ab265.714 Hz26.841 cents278.999 Hz11.309 cents292.285 Hz-8.154 cents318.856 Hz42.483 cents345.428 Hz81.055 cents358.713 Hz46.393 cents371.999 Hz9.354 cents398.570 Hz28.796 cents212.571 Hz40.528 cents225.856 Hz45.483 cents239.142 Hz44.438 cents252.428 Hz38.041 cents
A262.137 Hz3.378 cents275.933 Hz-7.821 cents289.730 Hz-23.354 cents303.527 Hz-42.817 cents331.120 Hz7.820 cents358.713 Hz46.393 cents372.510 Hz11.730 cents386.307 Hz-25.309 cents413.900 Hz-5.866 cents220.747 Hz5.865 cents234.543 Hz10.820 cents248.340 Hz9.775 cents
A#/Bb257.538 Hz-27.264 cents271.845 Hz-33.661 cents286.153 Hz-44.860 cents300.461 Hz-60.393 cents314.768 Hz-79.856 cents343.384 Hz-29.219 cents371.999 Hz9.354 cents386.307 Hz-25.309 cents400.614 Hz-62.348 cents429.230 Hz-42.905 cents228.922 Hz-31.174 cents243.230 Hz-26.219 cents
B260.604 Hz-6.776 cents275.933 Hz-7.821 cents291.263 Hz-14.218 cents306.593 Hz-25.418 cents321.922 Hz-40.950 cents337.252 Hz-60.413 cents367.911 Hz-9.776 cents398.570 Hz28.796 cents413.900 Hz-5.866 cents429.230 Hz-42.905 cents459.889 Hz-23.463 cents245.274 Hz-11.731 cents

We now have a chord-contextual tuning system. Pitch classes split according to harmonic function.

What It Sounds Like

I picked a progression that visits chords where fixed-C just intonation has audible trouble. In the recursive version, each chord retunes around its own root.

The first two columns use the same progression: once as pure sine waves, then again with a simple harmonic timbre. The third keeps a sustained C underneath the progression, so the tradeoff between a global reference pitch and chord-local purity becomes easier to hear.

tuning systemsine wave progressionharmonic timbre progressionC drone progression
12-TET
Stable pitch classes, heard without extra harmonics.
Stable pitch classes, compromised intervals.
The equal-tempered progression against a fixed C reference.
fixed C just intonation
C stays beautiful; remote chords lean hard.
C stays beautiful; the added harmonics make the leaning easier to hear.
Fixed-C tuning stays tied to the drone while the harmony travels.
recursive just intonation
Each chord retunes around its own C-derived root.
Chord-local roots with the simple harmonic timbre.
The drone exposes when chord-local roots move away from global C.

What If The Roots Come From 12-TET?

Another way to build the 12 pianos is to take the row roots from 12-TET, then build a just-intoned scale on top of each one:

hybrid_frequency(root, degree) =
    C_frequency * 2^(root / 12) * J[degree]

So the root grid keeps equal temperament’s transposition symmetry, while each row still has just local intervals. The tradeoff is that the row roots no longer come from the original C-based just scale; they are the familiar piano frequencies with just chords hanging from them.

12-TET roots with just-intoned chord tones on each root.

There is also a stripped-down example that alternates a fixed-C pitch with its recursive chord-local version, then plays both at once so the beating is easier to hear:

The stripped-down pitch split demo: fixed C just intonation first, recursive just intonation second, then both together with the recursive offset marked in cents.
Pitch-name splits: same nominal note, different chord context.

more audio examples:

mozarts dies irae.
some composition I came up with for this blog post.

Some split points:

chord contextnotefixed C JIrecursive JIdifference
E majorG#/Ab212.571 Hz204.395 Hz-67.900 cents
F majorA220.747 Hz214.615 Hz-48.770 cents
A majorC#/Db277.978 Hz275.934 Hz-12.777 cents

Why This Is Nice

The nice part is that every major chord can be made into a clean 4:5:6 relationship, even if the chord root is not C. E major does not inherit C’s G#/Ab; it gets its own G#/Ab. F major does not inherit C’s A; it gets its own A.

That lines up with how I hear harmony. When a chord arrives, the ear can accept the chord root as a local center. Recursive just intonation follows that local center instead of forcing every chord to negotiate with one global keyboard.

It is also a useful programming model. A chord can be rendered as:

root_frequency = base_frequency * global_just_ratio[root]
note_frequency = root_frequency * local_just_ratio[chord_degree]

The same pure function works for any root.

Why This Is Bad

The bad part shows up as soon as the chord changes: the same note name can move.

In 12-TET, G#/Ab is one frequency per octave. In fixed C just intonation, G#/Ab is also one frequency per octave, just a different one. In recursive just intonation, G#/Ab depends on why you are playing it.

A few consequences fall out of that:

  • A melody can wobble if a held pitch is reinterpreted by the next chord.
  • Enharmonic spelling starts to matter, but a 12-key interface usually hides it.
  • Modulation becomes a negotiation between smooth voice-leading and pure local chords.
  • Instruments with fixed frets, keys, or holes cannot do this without pitch bending or multiple samples per pitch class.

So this is not a replacement for equal temperament. Equal temperament is still the practical compromise that lets every key share one physical instrument.

Practical Uses

One day I will make a keyboard on which with your left hand you can determine the current key/context and with your right hand you play notes that are dynamically retuned according to the table, until then the practical applications remain few.

My Other Music Work

Visualize and Listen to Polyrhythms in a Shader