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
  • perfect fourth: 4/3
  • 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
F4/3N/A
F#/Gb45/3244th
G3/22nd
G#/Ab51/3250th
A27/1626th
A#/Bb57/3256th
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  = 51/32
B      = 15/8

Relative to E, the G#/Ab is:

(51/32) / (5/4) = 51/40 = 1.275

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    = 51/32 = 1.59375
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 rootroot 1/117/169/819/16major third 5/4fourth 4/345/32fifth 3/251/3227/1657/3215/8
C130.813 Hz0.000 cents138.989 Hz+4.955 cents147.164 Hz+3.910 cents155.340 Hz-2.487 cents163.516 Hz-13.686 cents174.417 Hz-1.955 cents183.955 Hz-9.776 cents196.219 Hz+1.955 cents208.483 Hz+6.910 cents220.747 Hz+5.865 cents233.010 Hz-0.532 cents245.274 Hz-11.731 cents
C#/Db138.989 Hz+4.955 cents147.675 Hz+9.911 cents156.362 Hz+8.865 cents165.049 Hz+2.468 cents173.736 Hz-8.731 cents185.318 Hz+3.000 cents195.453 Hz-4.821 cents208.483 Hz+6.910 cents221.513 Hz+11.866 cents234.543 Hz+10.820 cents247.573 Hz+4.423 cents260.604 Hz-6.776 cents
D147.164 Hz+3.910 cents156.362 Hz+8.865 cents165.560 Hz+7.820 cents174.758 Hz+1.423 cents183.955 Hz-9.776 cents196.219 Hz+1.955 cents206.950 Hz-5.866 cents220.747 Hz+5.865 cents234.543 Hz+10.820 cents248.340 Hz+9.775 cents262.137 Hz+3.378 cents275.933 Hz-7.821 cents
D#/Eb155.340 Hz-2.487 cents165.049 Hz+2.468 cents174.758 Hz+1.423 cents184.466 Hz-4.974 cents194.175 Hz-16.173 cents207.120 Hz-4.442 cents218.447 Hz-12.263 cents233.010 Hz-0.532 cents247.573 Hz+4.423 cents262.137 Hz+3.378 cents276.700 Hz-3.019 cents291.263 Hz-14.218 cents
E163.516 Hz-13.686 cents173.736 Hz-8.731 cents183.955 Hz-9.776 cents194.175 Hz-16.173 cents204.395 Hz-27.373 cents218.021 Hz-15.641 cents229.944 Hz-23.463 cents245.274 Hz-11.731 cents260.604 Hz-6.776 cents275.933 Hz-7.821 cents291.263 Hz-14.218 cents306.592 Hz-25.418 cents
F174.417 Hz-1.955 cents185.318 Hz+3.000 cents196.219 Hz+1.955 cents207.120 Hz-4.442 cents218.021 Hz-15.641 cents232.556 Hz-3.910 cents245.274 Hz-11.731 cents261.626 Hz0.000 cents277.977 Hz+4.955 cents294.329 Hz+3.910 cents310.680 Hz-2.487 cents327.032 Hz-13.686 cents
F#/Gb183.955 Hz-9.776 cents195.453 Hz-4.821 cents206.950 Hz-5.866 cents218.447 Hz-12.263 cents229.944 Hz-23.463 cents245.274 Hz-11.731 cents258.687 Hz-19.553 cents275.933 Hz-7.821 cents293.179 Hz-2.866 cents310.425 Hz-3.911 cents327.671 Hz-10.308 cents344.917 Hz-21.508 cents
G196.219 Hz+1.955 cents208.483 Hz+6.910 cents220.747 Hz+5.865 cents233.010 Hz-0.532 cents245.274 Hz-11.731 cents261.626 Hz0.000 cents275.933 Hz-7.821 cents294.329 Hz+3.910 cents312.724 Hz+8.865 cents331.120 Hz+7.820 cents349.515 Hz+1.423 cents367.911 Hz-9.776 cents
G#/Ab208.483 Hz+6.910 cents221.513 Hz+11.866 cents234.543 Hz+10.820 cents247.573 Hz+4.423 cents260.604 Hz-6.776 cents277.977 Hz+4.955 cents293.179 Hz-2.866 cents312.724 Hz+8.865 cents332.270 Hz+13.821 cents351.815 Hz+12.775 cents371.360 Hz+6.378 cents390.905 Hz-4.821 cents
A220.747 Hz+5.865 cents234.543 Hz+10.820 cents248.340 Hz+9.775 cents262.137 Hz+3.378 cents275.933 Hz-7.821 cents294.329 Hz+3.910 cents310.425 Hz-3.911 cents331.120 Hz+7.820 cents351.815 Hz+12.775 cents372.510 Hz+11.730 cents393.205 Hz+5.333 cents413.900 Hz-5.866 cents
A#/Bb233.010 Hz-0.532 cents247.573 Hz+4.423 cents262.137 Hz+3.378 cents276.700 Hz-3.019 cents291.263 Hz-14.218 cents310.680 Hz-2.487 cents327.671 Hz-10.308 cents349.515 Hz+1.423 cents371.360 Hz+6.378 cents393.205 Hz+5.333 cents415.050 Hz-1.064 cents436.894 Hz-12.263 cents
B245.274 Hz-11.731 cents260.604 Hz-6.776 cents275.933 Hz-7.821 cents291.263 Hz-14.218 cents306.592 Hz-25.418 cents327.032 Hz-13.686 cents344.917 Hz-21.508 cents367.911 Hz-9.776 cents390.905 Hz-4.821 cents413.900 Hz-5.866 cents436.894 Hz-12.263 cents459.889 Hz-23.463 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 of the generated split points:

chord contextnotefixed C JIrecursive JIdifference
E majorG#/Ab208.483 Hz204.395 Hz-34.283 cents
F majorA220.747 Hz218.021 Hz-21.506 cents
A majorC#/Db277.977 Hz275.933 Hz-12.777 cents
G7F348.834 Hz349.515 Hz+3.378 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 you left hand you can determine the current key 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