Automatically Generated Temperaments

I've written a Python script to systematically find equal temperaments consistent within a given odd limit. It then takes each pair of temperaments and works out the linear temperament consistent with them. Then it sorts them according to a rough and ready scoring system and prints out the best 10. Now online!

Everything's in a zip file now. You get C, Ocaml and Pyrex in addition to the pure Python. Most of what's below is out of date.

The output starts with a list of the consistent temperaments. Then you get a list of all the degenerate ones. These are where both belong to the same temperament class. In the older files, you also get a list of all the pairs of temperaments. I added this because the program takes a while to run on my Revo, and I wanted some evidence it was doing something.

Here's an example of a temperament from the list:

21/76

basis:
(0.5, 0.138177039353)

mapping:
([2, 0], ([4, 11, 7, 13, 11], [-3, -23, -5, -22, -13]))

primeApprox:
([94, 58], [(149, 92), (218, 135), (264, 163), (325, 201), (348, 215)])

highest interval width: 26
notes required: 53
highest error: 0.003259  (3.911 cents)

The first line shows you the MOS generator/equivalence interval ratio. In this example the equivalence interval is a fraction of an octave. The number of steps to the octave is taken to be the sum of the two ETs fed in.

The basis is the equivalence interval and generator described in terms of octaves. In this case the equivalence interval is a tritone. The generator is always the smallest possible. It's optimized for the minimax error.

The mapping describes the prime vectors in terms of the equivalence interval and generator. The octave lies apart from the rest because most of the calculations are octave-equivalent.

The prime approx is the same thing, but in terms of step sizes in the two defining ETs. The way the program works, this is always the most complex pair that got fed in. I might change that sometime.