Overtonium

Overtonium / Tuning

The tuning system

Three separate axes. TUNE decides how the overtone series is spelled, STRETCH decides whether it is a series at all, and the temperament decides what the keyboard underneath is tuned to. They combine rather than overlap.

TUNE, from equal to just

For harmonic n, the just interval above the fundamental is 1200 * log2(n) cents. Overtonium rounds that to the nearest semitone to get the equal-tempered position, and the remainder is the cent offset the TUNE knob dials in.

semitoneOffset(n, blend) = round(1200*log2(n)/100) + blend * (1200*log2(n) mod 100) / 100

At blend = 1 this is exactly n times the fundamental, so the stack fuses into one timbre. At blend = 0 every partial is on a semitone of the chromatic scale and the same stack reads as a chord. Nothing is written down as a constant, but rounded to whole cents the derivation reproduces the familiar table, which the test suite asserts so it cannot quietly drift.

n Semitones Cents Interval n Semitones Cents Interval
1 0 0 prime/octave 17 49 +5 minor second
2 12 0 prime/octave 18 50 +4 major second
3 19 +2 fifth 19 51 -2 minor third
4 24 0 prime/octave 20 52 -14 major third
5 28 -14 major third 21 53 -29 fourth
6 31 +2 fifth 22 54 -49 tritone
7 34 -31 minor seventh 23 54 +28 tritone
8 36 0 prime/octave 24 55 +2 fifth
9 38 +4 major second 25 56 -27 minor sixth
10 40 -14 major third 26 56 +41 minor sixth
11 42 -49 tritone 27 57 +6 major sixth
12 43 +2 fifth 28 58 -31 minor seventh
13 44 +41 minor sixth 29 58 +30 minor seventh
14 46 -31 minor seventh 30 59 -12 major seventh
15 47 -12 major seventh 31 59 +45 major seventh
16 48 0 prime/octave 32 60 0 prime/octave

The two big offsets are the ones worth knowing by ear. The seventh partial lands 31 cents flat of a minor seventh and the eleventh 49 cents flat of a tritone, which is to say halfway between two keys. Those are the partials that make a just-tuned stack sound unlike anything a keyboard can play.

Stretch

Nothing real rings at integer multiples of anything. A string with any bending stiffness has partials at n * f0 * sqrt(1 + B * n^2), sharp of the harmonic and increasingly so up the series, and it is that, not the hammer or the soundboard, that makes a piano sound like a piano rather than like a sawtooth. It is also what a tuner is matching when they stretch the octaves: tune the top of the instrument to the theory and it beats against its own overtones.

STRETCH is that stiffness, dialled by what it does to the top partial rather than by its own value, which lives between 0.00003 and 0.008 and means nothing to anyone. At +150 cents, which is a real piano:

Partial 2 8 16 32
Cents sharp of harmonic +0.6 +10.2 +40.0 +150.0

The bottom of the series barely moves and the top of it walks away, which is the shape that matters. Push further and the partials stop agreeing on a fundamental, and the sound stops being a note with a timbre and becomes a bell. Negative pulls them inward instead, which no physical string does and which is worth having anyway.

It is a separate axis from TUNE rather than more of it, and the two combine: equal temperament with heavy stretch is a different object from just intonation with the same stretch. Zero is the plain harmonic series.

Tuning the keyboard

Everything above is about where a partial sits over the note you played. This is about where that note sits. Settings carries six temperaments.

Temperament Major third Fifth What it is
Equal 400.00 700.00 the reference everything else is measured against
Just (major) 386.31 701.96 pure by construction, chosen interval by interval
Pythagorean 407.82 701.96 every fifth pure, the third pays for it
Quarter-comma meantone 386.31 696.58 fifths narrowed a quarter comma, which makes the third pure
Werckmeister III 390.22 696.09 four fifths narrowed, no wolf, every key playable
Young 392.18 698.04 six narrowed by a sixth, gentler again

They are derived from the circle of fifths rather than copied out as tables of cents. Almost every historical temperament is described by how much each of the twelve fifths is narrowed, so that is what the code says, and the pitch classes fall out of it. The two commas it is all built from come out at 23.460 and 21.506 cents, which are the published figures, and the tests assert the property that defines each temperament rather than the numbers that happen to result: meantone's third pure to a thousandth of a cent, Pythagorean's fifth likewise, Werckmeister at its characteristic 390.2.

Root

Picks which pitch class the temperament is built on, since an unequal temperament is only in tune in the keys near its centre, and that is the point of it. It is greyed out for equal temperament, which has no centre to have.

Reference pitch

415 through 466 Hz. A stays exactly there in every temperament, because the offsets are taken relative to A's own: a tuner tunes A first and works outwards. Only the other eleven notes move.

None of the three travels with a preset. A temperament is a property of the music you are playing rather than of any one sound in it: you set it once and work, and having a patch drag you back to equal in the middle of that would be no help. That includes Init, which clears the patch rather than the session.

Tracking

Without TRACK, a patch has the same spectrum at every pitch. Nothing real does. Play up a piano and the top of the series thins out, not because the note changed but because the body has a rolloff that stays where it is while the partials climb up through it.

TRACK is that rolloff, in dB per octave above a fixed corner of 1 kHz, which is around C6. It is measured against the fundamental rather than absolutely, and that is the part that matters: taken absolutely it would be a shelf, making high notes quieter rather than duller, which is not the thing worth having. Normalised, the fundamental keeps its level at every pitch and only the spectrum above it thins.

The consequence falls out of where the corner sits. A bass note has most of its series below 1 kHz and keeps nearly all of it. A treble note whose fundamental is already above the corner loses the full slope across every partial it has. At 6 dB per octave, the 32nd partial keeps 57% of its level at A1 and 4% at A5. Zero is off, and off is exact.

Drift, the fourth kind of detuning

Per channel rather than global, and random rather than periodic. DRIFT gives a partial a smooth random walk of up to 25 cents, redrawn as the note plays, which is the cassette warble the earlier instruments in this line got from tape. Every partial draws from its own stream, so a stack with drift on it never quite settles, and no two notes drift the same way.

It is the reason a held chord keeps moving without any modulation being dialled in, and it is why the pitch lamp on the PITCH MOD rule reads a needle rather than a pulse: what it shows is where modulation and drift together have the partial at this instant.