Diophantine Harmony

A playground for one sentence. The sentence has two halves. The page shows that the two halves do not depend on each other.

Harmony is a Diophantine condition between k·g and log2 of the primes. Nobility is a condition on the continued fraction of g itself. The two are independent.

I wrote this sentence on 2026-10-14, after GOLD-002. That experiment showed that every generator is within one cent of some golden generator at complexity 60, because the golden generators are dense. So the statement "Erv's generator is near a golden one" has no content at that depth. The sentence above is what survives. On this page the harmony half is amber, the nobility half is violet, and the generator chain is teal.

station 1

One generator, two readouts

Select a generator g. The circle is one octave. The amber marks are the targets: 1200·log2(p), folded into the octave. The teal dots are the chain: k·g for each k from −K to K. The harmony question is: for each target, does a chain dot fall within ε of it? The nobility question is: what is the continued fraction of g/1200? Change the targets and see which readout changes.

The presets are the Wilsonic lattices. The last button moves the targets to random positions. The violet readout does not change.

Diophantine readout (harmony)

targetcentsbest kerrorwithin ε

Continued-fraction readout (nobility)

station 2

The landscape

The landscape shows every generator from 0 to 600 cents. The amber line is the worst error over the targets, with |k| ≤ K, on a log scale. The dips are where harmony is possible. The shaded bands are the survival segments, where the worst error is less than ε. The violet ticks are the golden generators with complexity up to Q. Move the targets to random positions and the dips move. The ticks do not move, because they depend on g only.

worst target errorper-target errorsurvival segment (≤ ε)golden tick

Click the landscape to send that generator to station 1. The table below lists the segments. GOLD-003 tests this question: does a segment contain a golden generator of complexity ≤ Q more often than a random segment of the same width?

segment (cents)widthworst errorgolden inside (complexity ≤ Q)
station 3

Independence, as a cloud

The cloud shows 2000 random generators. The horizontal axis is the distance from each generator to the nearest golden generator of complexity ≤ Q, in cents. The vertical axis is the worst target error with |k| ≤ K. If nobility predicted harmony, the cloud would tilt. The page shows the correlation below the chart. The large violet points are the golden generators. The amber squares are the CPSFIT-003 count winners on the hexany, EG4 and the dekany.

The sentence, one line at a time

What a chain can play. Every pitch in a generator chain is k·g + m·1200 cents, for integers k and m. That is the complete menu. The chain has no other pitches.

What a just interval is. 1200·log2(3/2) equals 1200·log2(3) − 1200. 1200·log2(5/4) equals 1200·log2(5) − 2400. Every just interval is an integer combination of a few fixed irrational numbers, the logs of the primes, plus whole octaves.

What harmony demands. "The chain plays 5/4" means this: there are integers k and m such that k·g + m·1200 is within ε of 1200·log2(5). The unknowns are integers. The constants are real numbers. An inequality of that shape is a Diophantine approximation. That is the full content of the sentence. The prime logs are the targets, and integer multiples of g must reach them.

An example you know. Quarter-comma meantone has g = 696.578 cents. The table gives the integer k that reaches each prime, the octave count m, and the error.

primetarget (cents)kmk·g + m·1200error
31901.96111896.58−5.38
52786.31402786.310.00
73368.8310−33365.78−3.05

The three integers 1, 4, 10 are the val. They are the solution of the Diophantine problem. A comma is a place where two different solutions give the same pitch.

Nobility is the same question with a different target. The continued fraction of g/1200 measures how close k·g ever comes to a whole number of octaves. That is a Diophantine question about k·g with the target 0. A generator whose chain almost closes at k = 12, 19 or 31 behaves like an equal temperament there. Its large and small steps become almost equal, and the MOS degenerates. A noble generator keeps its multiples as far from whole octaves as a number of that size can. Hurwitz's theorem names φ as the extreme case.

So the two halves share one left-hand side. Harmony wants k·g near log2 3, log2 5 and log2 7. Nobility wants k·g far from 0. No arithmetic connects "far from 0" with "near 1.58496". The number 1.58496 is only the log of 3, and the continued fraction of g has no information about it. That is the full content of "no mechanism".

Why no one wrote it this way. Erv had both halves. The scale tree is the continued fraction of g, so it is the nobility half. The lattices are the prime logs, so they are the harmony half. He kept them on separate sheets. The vocabulary for the harmony half as integer solutions, vals and kernels, came from regular temperament theory in the early 2000s. The vocabulary for the nobility half, badly approximable numbers, came from number theory. The sentence is what you get when you write both halves as one inequality.

Two consequences. The targets do not have to be primes. Any set of just intervals works, which is why the target box on this page accepts ratios. And the triad analyzer adds one more layer in linear frequency, the sum and difference coincidences. The sentence covers the first layer only.

What I think the sentence means

The harmony half. A generator chain plays the just interval p/q when some integer multiple of the generator falls within the tolerance of 1200·log2(p/q), modulo the octave. This is a simultaneous inhomogeneous Diophantine approximation. One real number g must approximate several fixed real targets with small integer multipliers. The multipliers are the val. The primes set the targets. This condition does not refer to the continued fraction of g.

The nobility half. A noble number has a continued fraction that ends in ones only. This makes it the hardest kind of number to approximate with rationals. The same property has three musical consequences. Its MOS ladder grows as slowly as possible. Every level has a large-to-small step ratio near φ. The Gral keyboard of its chain keeps the same cell shape at every depth. All of this concerns g and the rationals. None of it concerns the primes.

Why there is no mechanism. Move the targets and the dips in station 2 move. The ticks stay. No equation takes the continued fraction of g and returns the distance from k·g to log2 3. GOLD-002 measured the consequence. At complexity 60 the golden generators are about one cent apart, so every generator is near one. The near generators fit triads no better than the far generators.

What Erv did, on this reading. A triad-optimal generator is a survival segment. The segment is the full interval of g over which the kept triads stay within tolerance. Harmony cannot choose a point inside the segment. So the choice inside the segment is free. A golden generator inside the segment gives the melodic properties at no harmonic cost. The testable statement is this: the golden generator lies inside the segment. The statement "the optimum is within one cent of a golden generator" has no content at depth, because the golden generators are dense. GOLD-003 arm A found two of Erv's shallow golden generators inside count-optimal segments, at 317.170 and 503.786 cents. The expected number by chance was 0.24. This is a hint. The independence described above is the reason it cannot be more than a hint.

For Wilsonic. The generator-family selector is an aesthetic choice. The "golden" setting should do this: select the golden generator inside the survival segment when one exists. When none exists, it should show the triad cost of a move out of the segment. The setting must not act as a harmonic filter.