I think Paul had the right idea with a logarithmic weighting, if we

want 9 to be exactly half as important as 3, so that 2n steps to 9

and n to 3 amount to the same thing. However, what about taking the

weight over a tonality diamond, and using Paul's L1 metric?

We can make Np into a lattice (in fact, we can make all positive

rational numbers into a lattice in an infinite-dimensional Banach

space if we want to) by setting ||q|| where q = 2^e2 3^e3 ... p^ep to

||q|| = |log(2) e2| + |log(3) e3| + ... + |log(p) ep|

The base of the logarithm doesn't matter--we are free to use octaves

or cents if we stick to that choice. Once we have a norm (for this

defines a norm on the real vector space with basis {e2, e3, ..., ep})

we have a metric, defined by d(p, q) = ||p/q||. (This is usually

written additively, as d(p, q) = ||p - q||, but our "addition" is

multiplication here.)

We can define a measure associated to a generator g and interval of

equivlance E by

max_{q in diamond} |ord(q)|/||q||,

where ord(q) is the exponent such that g^ord(q) ~ q mod E. This is

pretty close to what Paul suggested.