JI-ify

Chords in 12-TET spelling → every just-intonation reading, with HEJI, cents, Hz, tuning routes and playback.

Manual ↗

Chords

Ctrl/⌘+Enter also analyzes. Spelling matters: D♯ and E♭ get different ratios. With several chords, pick the one to show with the chips in the score.
Performer window ↗
Play a chord on the keyboard and it is read and tuned at once; the sustain pedal captures it to the list.

Settings

Help and reference

The manual walks through the tool from the beginning. This block is the short version, then the reference.

Start here

  1. Type one chord per line, lowest note first, as note names with octave numbers (C4 = middle C), and press Analyze. Or pick one of the examples.
  2. The cards under the score list the ways the chord can be tuned (its readings), the recommended one first. Each row gives a note's ratio to the root, its accidental in words, its distance from 12-TET in cents, and its frequency.
  3. ♪ Score on a card, or a chip under the staff, puts that reading on the staff. ▶ Play plays it; 12-TET → JI plays the piano's version first, then the tuned one.
  4. With two or more chords the staff shows them all; click one to focus it. Notes shared by neighbouring chords are held at the same pitch, and the caption under each chord says how far it now sits from the piano.
  5. If the progression ends away from where it began, the line under the staff says by how much and offers ways to deal with it.

The cards: ways a chord can be "in tune", and the marks

most fused: all notes are low harmonics of one fundamental, so the chord sounds as one spectrum; measured by the largest harmonic number. simplest dyads: every pair of notes forms a simple, tunable interval, whether or not they share a fundamental (the "complexity" figure, lower is simpler). simplest route: the most complex interval on the tuning route is simpler than in the other readings. least retuning: smallest total movement from 12-TET. fewest signs: fewest HEJI comma signs to engrave. open strings: the most notes that stand in a simple ratio (odd part up to 15, within 3¢) to an open string of their player, violin G3 D4 A4 E5, viola C3 G3 D4 A4, cello C2 G2 D3 A3, tuned in pure fifths from the page's A4; ties go to the simpler ratios. The per-note column open string names the string and the ratio (5/4 × A4), so the note can be tuned as a double stop or by resonance. The overtone family is ranked by fusion; every other family by complexity. A mark is relative to the chord's own readings.

Shortlist view

The recommended reading is the purest one (lowest dyad complexity); the alternatives are the most fused reading and the best of another family. Equally pure readings are ordered by fewest comma signs. The cards state facts (signs per note, the most complex interval on the route, the note farthest from the piano, primes, respellings) and do not grade a reading as easy or hard: that is for the players. One weighted sum of those facts remains, as the live pick easiest to read for MIDI input: 1.5 × the most comma signs on any one note + 0.5 × signs per note + 1.3 × the most complex interval on the route (Tenney height of the interval as sounded, 7/4 = 4.95, 16/9 = 7.17, 19/16 = 12.1; a note within 6¢ of 12-TET counts as 3, since it is simply played as on the piano) + 2 per respelled note + the largest move from the piano in cents ÷ 20 + 2 if a prime above 7 is used (+3 above 13) + 3 × the reading's complexity above the chord's best, as a fraction; lowest wins.

The staff: HEJI signs and what they are measured from

Letter = Pythagorean pitch; each sign is one comma, up or down, for one prime. Derived from the comma definitions, so confirm glyphs against the Plainsound legend before engraving.

Signs are measured from a 1/1. In the linked view that is the segment's first root, so signs the whole chord shares say where this chord's root fell (a root a 7·23 ratio away puts ↓7 ↑23 on every note). A chord that follows a 12-TET chord, or a reset, is its own 1/1: a tempered neighbour offers no ratio to measure from, so a link change there moves the chord (cents, Hz) without changing its signs; the column's caption states the reference it is measured from (1/1 A2 = 109.0 Hz). Spell from under the staff chooses what plays as well as what is written. Absolute: the chords are linked, chord 1's root is the one 1/1, drift is carried from chord to chord and every comma a link adds shows as signs. Relative: each chord stands on its own with its root at the piano's pitch, exactly as its card sounds, spelled from that root (as typed) or from whichever chord note reads cheapest (fewest signs: signs, then re-lettered notes); links, drift and the verdict do not apply, and a common tone that differs between two neighbouring chords shows its slip on the tie. Cents and Hz do not change, only the declared reference, which the title then states (spelled as typed, B♭2 = 118.33 Hz as 1/1).

Progression (two or more chords)

Chords are linked in the order typed; with two or more chords the score becomes the progression, and the focused chord's link is set right under the staff. A common tone (same written note, or the same pitch class an octave away) is held at the same frequency; when several are shared, the one whose hold breaks the others least is chosen, and the breaks are reported with the comma they amount to. With no common tone the root moves by the simplest just ratio within tolerance of the tempered motion, spelled as you spelled the roots (C→F♯ gives 10/7, C→G♭ gives 7/5). Each root's position against 12-TET is tracked as an exact ratio, so the net drift of a progression that returns to its first root comes out as a named comma (the I–vi–ii–V–I pump in 5-limit returns 80/81, a syntonic comma flat). A chord left at 12-TET is fixed; a reset link re-anchors the next root at its tempered pitch. Suggest searches the readings of every chord (beam width 40) for the path minimising Σ|breaks| + 8·(each reading's complexity above its chord's best, as a fraction); the drift-avoiding variant adds 0.5¢ of cost per cent of root drift at every chord.

Reference

How the figures above are worked out, and the parts that need more than a browser.

Root

Suggested by Parncutt's root-support weights: a chord tone a unison, fifth, major third, minor seventh or major second above the candidate supports it by 10, 5, 3, 2, 1; the bass gets 1.5 extra. Type any pitch class to try an absent root.

Cents and Hz

Deviations from 12-TET with the chosen note held at its tempered pitch. To anchor elsewhere, add one constant to every value.

Complexity

For each interval, the exponents of its primes above 2 times log2 of the prime, with primes above 7 weighted more (×1.6 for 11 and 13, up to ×2.3 for 31). Summed over all pairs, counting pairs with the root twice and with the bass one and a half times. Tuning routes and the "most complex interval" figures use the same height counting the 2s as well, so an interval's actual width matters.

Playback

An additive tone (24 harmonics, 1/n amplitudes with a gentle high-frequency roll-off, no vibrato). The level is scaled by the number of voices (n−0.75) with a mild tilt that lifts high notes and tames low ones, and a limiter at −3 dBFS guards the output, so a full chord does not clip. Single notes are therefore a little louder than the chord, per voice.

Live MIDI, performer window, Max

MIDI in listens to a keyboard (Chrome on your own machine, or inside Max's jweb); the chord you hold is read and tuned at once by the live-pick rule, and the sustain pedal (CC 64) captures it to the list. The performer window shows only the selected chord, large, and follows the main window through this browser's storage; inside Max it can be driven directly with a show message. For iPads, run node server.js in the repository: it serves this page and the performer display on the local network and prints one address per player (/perf?player=1 … 4, 1 = the lowest note); see the README. When the page runs inside jweb, every selection is sent out as selection <json> and hz …, and the page accepts chords, midi, capture, select, focus and show messages; see max/README-max.md in the repository.