Day 13 of ∞All days

Monday, 16 November 2026

14 equal steps to the octave

14-EDO, first expedition: a timbre where 12 of 13 steps land in consonance (an ordinary instrument: 0; Sethares' construction: 6).

Fourteen equal steps: two seven-tone circles, neutral thirds everywhere.

The numbers

An ordinary instrument
0 of 13 steps land
Sethares’ construction
6 of 13 steps land
Tonight’s search
12 of 13 steps land, a new record
The rule it found
snap the first few low‑order partials exactly to the nearest scale step, then blend higher partials with a stretched harmonic series.
Programs tried
76 programs, 63 valid, across 12 generations
Also works for
7-EDO (6 of 6), 8-EDO (7 of 7), 9-EDO (8 of 8), 10-EDO (9 of 9), 11-EDO (9 of 10)
The piece
Day 13 — Two Circles of Seven

Tonight’s film

Read the program
const PARAMS = 4; // [coreCount, tilt, pull, stretch]

function timbre(target, p) {
  const notes = [1, ...target.steps];          // scale degrees within one period
  const period = target.period;               // octave ratio
  const maxRatio = 40;
  const maxPartial = 30;                      // + fundamental stays ≤ 32

  // ---- parameters -------------------------------------------------
  const coreCount = Math.round(p[0] * 8);      // 0‑8 low‑order forced‑snap partials
  const tiltExp   = 0.5 + 1.5 * p[1];          // amplitude roll‑off exponent
  const pull      = Math.max(0, Math.min(1, p[2])); // blend weight for non‑core
  const stretch   = 1 + 0.2 * p[3];            // max 20 % logarithmic stretch

  // helper: nearest scale ratio (any octave) to a given ratio r
  function nearestScale(r) {
    let best = r, bestDist = Infinity;
    const maxOct = Math.floor(Math.log(maxRatio / Math.min(...target.steps)) / Math.log(period));
    for (let oct = 0; oct <= maxOct; oct++) {
      const base = Math.pow(period, oct);
      for (const n of notes) {
        const cand = n * base;
        if (cand > maxRatio) continue;
        const d = Math.abs(Math.log(cand / r));
        if (d < bestDist) { bestDist = d; best = cand; }
      }
    }
    return best;
  }

  const partials = [{ ratio: 1, amp: 0 }]; // placeholder for fundamental

  for (let k = 2; k <= maxPartial; k++) {
    // logarithmic stretch of the k‑th harmonic
    const logOct = Math.log(k) / Math.log(period);
    const stretched = k * Math.pow(stretch, logOct);

    const nearest = nearestScale(stretched);

    // forced snap for the first `coreCount` partials
    const blend = (k - 2 < coreCount) ? 1 : pull;

    const ratio = Math.exp((1 - blend) * Math.log(stretched) + blend * Math.log(nearest));
    if (ratio < 1 || ratio > maxRatio) continue; // safety

    const amp = 1 / Math.pow(k, tiltExp);
    partials.push({ ratio, amp });
  }

  // enforce fundamental loudness (≥ 20 % of the loudest non‑fundamental)
  let maxAmp = 0;
  for (let i = 1; i < partials.length; i++) if (partials[i].amp > maxAmp) maxAmp = partials[i].amp;
  partials[0].amp = Math.max(0.2 * maxAmp, 0.5 * maxAmp);

  // cap at 32 partials (including the fundamental)
  return partials.slice(0, 32);
}

Consonance here is measured with Sethares’ model of sensory dissonance, not by ear. A step lands when it sits at the bottom of a valley in the timbre’s dissonance curve. Perfect harmony is out of reach — pure fifths and thirds never close into one scale — which is why the search does not end.

Every morning, what the night found.

One email a day at 7am Singapore time, with the discovery, the music and the film.