### story

Discussion regarding piano tuning is already widespread on the internet. This YouTube video from Minute Physics provides a decent introduction to the topic.

I ended up writing a short MATLAB script to plot some of these different tuning systems and see if I could hear the difference. Here are some of the things I tried. Most of these have actual names in music theory: I’ve tried to link to their Wikipedia page when possible.

### introduction

Firstly, here are the standard just intervals for reference.

Since we’re basing things off the octave (2:1), it’s useful to express other intervals in terms of their base 2 logarithm. This translates all musical intervals to a real number. It seems intuitive to take intervals modulo 1 (i.e. the same note across octaves are identified). This has a group structure isomorphic to $$\mathbb{R}/\mathbb{Z}$$.

For a visualization respecting the group structure, all the notes within an octave are plotted on a circle. The standard 12-tone equal temperament (12-TET) is labeled around the circle for easy comparison.

### harmonic generator

Let’s choose some justly tuned intervals and compare the notes they generate to the familiar 12-TET scale.

The minor 2nd is the basic unit and will generate approximations to the 12-TET scale within the first order Unfortunately, it’s off by over a semitone by the time it completes the entire octave

Here’s the circle with the justly tuned perfect 5th as a generator. This is one way to visualize Pythagorean tuning.

Here’s a standard major scale using justly tuned major and minor 2nds.

Here’s what A major sounds like using different tunings. The three iterations of A major are tuned using equal temperament, just major and minor 2nds and the third iteration plays both together so the beats can be heard.

Let’s extend these a bit for fun. Here’s how the perfect 5th (3:2) drifts around the circle.

Here’s a minor 3rd (6:5). To be honest, I’m including this mainly because it looks cool. This is because the 19th element in the geometric series $$\left(\frac{6}{5}\right)^n$$ nearly approximates a power of 2 creating a near-orbit (let me know if there’s a better term for this) of size 20.

It might be interesting to find other near-orbits.

That is,

$n \log_2{r} \approx 1\pmod 1$

Of course the most interesting near-orbits are those where $$n$$ is small (i.e. the number of notes in the orbit are small) and $$r$$ is a ratio of relatively small integers.

Quick note – we know that is impossible to generate an exact orbit with $$r \in \mathbb{Q}$$ since $$\forall p \in \mathbb{Z}, p>1 \implies \sqrt[p]{2} \notin \mathbb{Q}$$ (this is why we have to turn to irrationals to tune our pianos in the first place).

The standard 12-TET is the case where $$n=12$$ and $$r=\sqrt[12]{2}$$.

### discussion

I’m not sure if this post lends itself to any practical use, but I think these diagrams are pretty.