Lattice MOS-Fit Playground

Start from a just lattice. Find the MOS scales that hold every tone of the lattice within a tolerance. An MOS is a chain of one generator with two step sizes, and equal temperaments are the MOS with one step size. The fit has three controls: the generator, the level (how many notes) and the murchana (which chain position is the 1/1). Within 2 cents counts as at least as good as 12-ET.

LEGEND

What the errors mean: 12-ET against its own lattice

Every error on this page is the distance in cents from a just tone to the nearest scale degree. For a reference, here is 12-ET fitted to the harmonics 3, 5, 7, 9 and 11. The fifth is good. The major third is poor. The harmonic seventh is bad. The tolerance slider in station 3 starts at 2 cents, which is the quality of 12-ET's fifth.

STATION 1

Choose the harmonic lattice

The lattice supplies the harmony. Its tones are the targets of the fit in station 3.

The page reduces each tone to one octave and sorts them. It removes duplicates.

#ratiocents
tones
6
smallest step
—
step classes
—
exact triads P / S
—
STATION 2

Choose a generator

A generator g in octaves. The chain is g, 2g, 3g and so on, reduced to one octave. The generator and its complement 1 − g make the same scales, read from the other end.

generator, octaves
—
generator, cents
—
complement
—
MOS sizes ≤ 60
—

How to read the chart: the axis is the note count N. A dot at N means that N consecutive generators, reduced to one octave, make a scale with exactly two step sizes, L and s. Those scales are the MOS of this generator, and their N values are the levels. The page finds them by the scale tree. It walks the Stern–Brocot tree toward g. Each fraction p/q on the path is an MOS with q notes. The fraction p/q is also the equal temperament that the MOS approximates: q-ET, with p steps per generator. Erv drew this walk by hand as the "zig-zag pattern" on his pages.

levelNp/qET generator ¢L ¢s ¢L : s
STATION 3

Fit an MOS to the lattice

Two searches. The first table takes the station 2 generator and, for each level, finds the murchana that holds the lattice best. The second table is the free search: for each N it finds the best generator of all, with its murchana. Select a row to see the scale against the lattice, then rotate its murchana.

What the fit searches, in Wilson's terms. A scale here is a chain: N consecutive generators, reduced to one octave. The octave is the period, and it does not change. The generator g runs over 0 to 600 cents in the free search, and its complement covers the rest. The note count N is the level. The "only MOS" switch keeps the N values that are levels on the scale tree. The window start is the murchana. The chain contains the lattice's 1/1 at one of its N degrees. The search tries all N positions, which is the same as trying every mode of the chain. For each N the free search is exact. For a tolerance ε, each tone and each degree k allow g to lie in an interval of half-width ε/|k|. A sweep over the interval endpoints finds the first g where some window of N degrees holds every tone. A bisection on ε then finds the smallest ε that works. A final refinement moves g to minimize the largest tone error.

What the fit does not do. It does not change the period. It does not place the lattice's 1/1 between two degrees. It fits tones and not triads, and it reports the triads that survive so you can see the difference. The count objective (CPSFIT-003) ran offline, and its fits are station 2 presets. It uses one generator, so it is rank 2 with the octave. A lattice that needs two generators, such as a 7-limit CPS at a small N, gets a large error here.

2 cents is below the 12-ET error of 3/2 (1.96 cents) and far below its error of 5/4 (13.7 cents).

Press Run. Large lattices at large N take a few seconds.

Selected chain

notes / level
—
generator ¢
—
largest tone error
—
tones within tolerance
—
triads kept P / S (of exact)
—
val: generator counts of the primes
—
kernel: commas the chain tempers out (under 60 cents)
—
Pin two chains to compare them on one ruler.
Scala text of the selected chain (copy it into the plugin)

No chain selected.

Move the slider to rotate the mode. Each step drops one tone from one end of the chain and adds one at the other end. The step pattern rotates with it, and the lattice errors show which modes hold the lattice.

Compare: chain A against chain B

Staircase: the smallest largest-error at each N

free searchstation 2 generatorfamily search, first level within toleranceequal temperamentsdashed line: tolerance

Move over a point to read it. Click a point to select that chain.

Chains of the station 2 generator,

Ntypelevelmurchana (1/1 at degree)max errmean errcapturedtriads kept

Every N is listed with the generator that makes the largest lattice error as small as possible at that N. The max error column is that smallest possible error, so it is often above the tolerance. A row above the tolerance says that no chain of N notes holds the lattice any closer. The page highlights rows within the tolerance and lists them first.

Family search: golden, silver, bronze or equal-tempered generators

A golden generator is one whose scale-tree path alternates forever from some point. Its levels then grow like Fibonacci numbers and the step ratio L : s tends to φ. Erv listed 64 of them in 1993. The formula is g = (a + φc) / (b + φd) for the two path fractions a/b and c/d where the alternation starts. Silver uses 1 + √2 in place of φ, so the path turns every two steps: Erv's "2-zig/2-zag". Bronze uses (3 + √13) / 2. Equal temperaments are the paths that stop. This search tries every such generator up to a seed denominator bound and reports the first level that holds the lattice.

Press Run. Golden with complexity up to 36 tries about 400 generators. Complexity is the smallest seed denominator pair that makes the generator, so the simple nobles come first.

generator ¢octavesseedscomplexityErv 64first level within tolmurchanamax errcapturedtriads kept

Free search: best generator for each N

Ntypelevelmurchana (1/1 at degree)generatorcentsmax errmean errcapturedtriads kept
BACKGROUND

What the mathematics says

A chain is N consecutive multiples of one generator, reduced to one octave. When the chain has exactly two step sizes it is an MOS, and N is a level of that generator. The levels are the denominators on the Stern–Brocot path toward g. Erv called this path the scale tree and drew it as a zig-zag on each of his generator pages.

Erv Wilson, "Scale Tree" and the Meru pages, 1993–1997.

An equal temperament is the MOS with one step size. N-ET is the N-note chain of the generator 1200/N cents. Treating ET as a separate category is a preference of the musician, not a fact of the mathematics. This page shows ET rows separately because some artists prefer ET.

Marcus Hobbs, 2026-10-11.

Murchana is the mode of the chain. The chain holds the lattice's 1/1 at one of its N generator positions. Moving that position by one drops a tone from one end and adds one at the other end, which rotates the step pattern. For a fifth generator at N = 7 the seven positions give the seven diatonic modes, Lydian through Locrian.

Checked on this page: meta-meantone at N = 7 gives LLLsLLs, LLsLLLs, LLsLLsL, LsLLLsL, LsLLsLL, sLLLsLL, sLLsLLL.

Inverting the generator inverts the lattice. The chain of 1 − g is the chain of g reflected about 1/1. So a lattice fits the complement generator exactly when its reflection fits g, at the mirrored murchana, with the same errors, and with proportional and subcontrary triads swapped. For a CPS built from factors F, the reflection of CPS(n, k) is CPS(n, n − k) transposed by the product of F. The transposition matters. The chain is pinned to contain the lattice's 1/1, so a transposition by an interval that is not a chain degree changes the fit. The dekany CPS(5, 3) gets different fits from CPS(5, 2) at 10 of the 20 note counts where both are feasible. One fit of a dekany solves its reflection. It does not solve its partner.

CPSFIT-003, experiments/lattice, 2026-10-11. The exact reflection reproduced every rung of CPS(5, 2) with P and S swapped. This corrects the earlier claim on this page that one fit solves both dekanies.

Counting the triads changes the answer. With the number of exact lattice triads within 2 cents as the objective, the best generator agrees with the tone fit at no N up to 22, and with the worst-triad fit only where every triad already survives. The hexany keeps 10 of 12 from N = 16: the miracle generator moved to 116.68 cents, with one tone out at 5.2 cents. At N = 18 to 21 the chain of 77.82 cents keeps 10 of 12, where miracle kept 6 and orwell kept 8. The dekany 1·3·5·7·9 fits a schismatic chain of fourths at N = 26, 498.07 cents, keeping 32 of its 41 triads, and reaches 37 at N = 35. The frozen scorer counts triads of the image, so it can exceed the lattice's count when the tempering creates new ones. The page reports the lattice's count.

CPSFIT-003, experiments/lattice, 2026-10-11. Gate G-032 is the ear check.

The free search gives a staircase of smallest errors. For the hexany it is 18.85 cents at N = 11 and 13.73 at N = 12 to 14. It is 4.82 at N = 15, 4.77 at 16 to 17 and 3.27 at 18. It is 2.57 at N = 19 to 21, 1.37 at 22 to 30 and 0.74 at 31. Every optimum from N = 11 up is a val: an integer mapping of the primes 3, 5, 7 to generator counts. The N = 15 fit at 502.86 cents is a septimal meantone and is Erv's 0.418935 generator to 0.14 cents. The N = 22 fit at 193.79 cents has kernel 2401/2400 and 3136/3125. No equal temperament below 73 notes holds the hexany within 2 cents.

CPSFIT-001, experiments/lattice, 2026-10-10.

Fitting tones is not fitting triads. A prime mistuned in all three tones of a triad cancels in the mean condition. So a chain with large tone errors can keep triads. A chain with small tone errors can lose them. At N = 22 the tone fit keeps 10 of the hexany's 12 triads at 2 cents. Minimizing the worst triad instead moves the generator to 193.91 cents, keeps all 12, and lets one tone out to 2.22 cents. The worst triad is still not the count: at N = 18 to 21 the chain with the smaller worst triad keeps fewer triads. This page reports tones and triads side by side.

CPSFIT-001 and CPSFIT-002, experiments/lattice, 2026-10-10.

A golden generator is a noble number: its scale-tree path alternates forever from some point. The formula is g = (a + φc) / (b + φd) for the two path fractions where the alternation starts. The levels then grow like Fibonacci numbers. The step ratio L : s tends to φ at every level, so the MOS looks the same at every depth. Erv listed 64 of them in 1993, with the path of each. This page regenerates all 64 from the formula. Silver generators use 1 + √2 and turn every two steps, which is Erv's 2-zig/2-zag page, and √2 − 1 is the pure silver number. Equal temperaments are the paths that stop.

Erv Wilson, "64 Golden Generators for Two-Interval Patterns (MOS)", 1993, with his calculator program. Verified 2026-10-11: 64 of 64 reproduced.

Erv's recurrence generators, which he found by optimizing proportional and subcontrary triads, sit next to golden generators. 0.418935 is 0.09 cents from the golden generator seeded by 18/43 and 13/31. 0.415227 is 0.07 cents from one. Meta-meantone is 0.11 cents from one. 0.328173 is 0.17 cents from one. 0.238186 is 0.61 cents from one. The harmonic search and the melodic search nearly agree on where the good generators are.

Measured 2026-10-11 against all noble numbers with seed denominators up to 60.

The hexany needs the primes 3, 5 and 7, which is rank 4 with the octave. One generator and the octave is rank 2. So the hexany fits a rank-2 chain only with error, or only at a large N where the chain's commas vanish. A fit with two generators is rank 3 and is the natural next search.

Open question. See the options below.
OPTIONS

Next lines of research

Where this is going. The goal is music that no one has heard, and that still makes sense because it follows a model of how we hear pitch. The target object is the eikosany: a CPS(6, 3) on any six seeds A to F, fitted by one generator into one MOS. Every subset the eikosany contains (its dekanies, hexanies and tetrads) must be playable inside that same MOS. The fit must keep the triads, proportional and subcontrary first, and not only the tones. A chain that holds all 20 tones and loses the triads is not a fit. The path to the musician is Wilsonic: Scala export first, a design later.

  1. Triads are the objective. CPSFIT-003 made the count of surviving proportional and subcontrary triads the objective and it changed the answer at every N below full survival. Next: bring that search onto this page, so the free search reports the count-optimal chain beside the tone-optimal one. Then run it on the eikosany. That lattice has 20 tones and uses the prime 11, so the mapping and kernel code must grow from 7-limit to 11-limit. Open controls from gate G-032: a sweep of the 20 cent tone cap (5, 10, 20), and a fit that lets the chain origin float. Geometric triads are a possible third class to count.
  2. Fit the eikosany and its subsets at once. Score each embedded subset CPS inside the candidate chain. The SUBSET-MEL-000 census lists those subsets. Then ask which chain keeps the most triads in the whole and in the most subsets. The subset doctrine says the music lives in the subsets, so a chain that holds the eikosany but breaks its hexanies fails the musician.
  3. Any seeds, any generator. The page already takes a custom CPS and a custom generator. The fit must stay exact for six arbitrary seeds. That means primes beyond 7 in the val and kernel, and a search that scales to 20 tones.
  4. Golden as an aesthetic axis, triads as the objective. Run the golden and silver family search with the triad count as its score. Report the trade-off: how many triads a noble generator gives up against the free optimum at the same N. A noble chain looks the same at every level, which is a musical quality of its own. So the page should let a musician choose "noble only" or "best triads" and hear both. This needs ear evaluations.
  5. Erv's hand-found generators against the golden ones, thoroughly. Erv found his recurrence generators by optimizing proportional and subcontrary triads by hand. The first five measured sit 0.07 to 0.61 cents from golden generators. Measure every generator in the archive against the nearest golden and silver generator, with the triad counts of both. The archive means the Meru pages, Fig 12, the 1997 sheets and the letters, and each figure is cited. The question is whether optimizing for these triads lands on noble numbers as a law. If it does, golden becomes a search space and not only an aesthetic.
  6. Hear the fits. Six chains sit in Wilsonic's user Scala library. They are the hexany at N = 15, 16, 18 and 22 (two versions) and the dekany at N = 26. Gates G-029, G-031 and G-032 wait on the ear. The count chains ask one question from two sides. Do ten triads with one tone out at 5 cents sound better than six triads at 4.8 cents?
  7. Murchana is a control, not an axis. It gives the fit one more degree of freedom and names the mode. The page keeps the slider and the list of murchanas that hold the lattice. It gets no research line of its own.
  8. Inversion, kept small. For the self-symmetric CPS (hexany, eikosany, CPS(8, 4)) a generator below the fifth and its complement fit the same lattice up to a transposition. The page states this and the transposition caveat. It halves no search across CPS(n, k) and CPS(n, n − k) unless the fit becomes transposition-free.
  9. Rank 3. One generator and the octave is rank 2. A 7-limit lattice needs rank 4 to be exact, so a rank-2 chain holds it only with error or at a large N. Two generators and the octave (rank 3) is the next step, and it is the D'Alessandro method applied to a general seed. Lower priority until the rank-2 triad fits are heard.
  10. Quotient the ties. When an N-chain of g holds the lattice, the 2N-chain of g/2 holds it too with the same errors. Report one representative per family so the staircase reads cleanly.
HANDOFF

Prompt for the next session

This text describes the current state of the page in plain language. Copy it into Claude to continue the work.