back to list

A method for optimally distributing any comma

🔗David C Keenan <d.keenan@xx.xxx.xxx>

12/9/1999 7:38:36 AM

Tempering secrets revealed! See

http://dkeenan.com/Music/DistributingCommas.htm

All comments, questions and corrections gratefully received.

Regards,
-- Dave Keenan
http://dkeenan.com

🔗Paul H. Erlich <PErlich@xxxxxxxxxxxxx.xxxx>

12/10/1999 12:46:50 PM

Dave Keenan's page http://dkeenan.com/Music/DistributingCommas.htm
says,

>but it does not seem amenable to minimising the RMS (or sum of squares)
error.

Actually, that is even easier, since squared error is a differentiable
function. Then one can simply use calculus to minimize the function, as I've
done for diatonic (meantone) and decatonic (22-equal-like) tunings.

What you describe in your page must be a linear programming algorithm (in
the mathematical sense of programming, not the computer science sense).

>So 1/6-comma meantone with 1/6 comma wide octaves is the optimum when
ninths and classic >minor sevenths are included (classic = 5-limit).

Dave, I'm not sure "1/6-comma meantone with 1/6 comma wide octaves" is
well-defined. Is there a better way to describe this tuning?

🔗David C Keenan <d.keenan@xx.xxx.xxx>

12/12/1999 4:33:07 PM

In TD433.18 Paul H. Erlich wrote:
>Dave Keenan's page http://dkeenan.com/Music/DistributingCommas.htm
>says,
>
>>but it does not seem amenable to minimising the RMS (or sum of squares)
>error.

>Actually, that is even easier, since squared error is a differentiable
>function. Then one can simply use calculus to minimize the function, as
>I've done for diatonic (meantone) and decatonic (22-equal-like) tunings.

Of course many people would say that "simply use calculus" is an oxymoron. WOuld you like to give a worked example for one of the cases in my web page. Say the meantone case where we are willing to temper the octave and we want to minimise the RMS error over all the intervals in 4:5:6:9, and their inversions except 8:9 and 9:10, and including the octave.

>What you describe in your page must be a linear programming algorithm (in
>the mathematical sense of programming, not the computer science sense).

I don't know. I did an introductory linear programming course at university. I wouldn't say it *is* one, but it might be equivalent to one.

I have not given a proof of its optimality. I have better things to do. I'll wait for someone to find a counterexample instead. ;-)

>>So 1/6-comma meantone with 1/6 comma wide octaves is the optimum when
>ninths and classic >minor sevenths are included (classic = 5-limit).
>
>Dave, I'm not sure "1/6-comma meantone with 1/6 comma wide octaves" is
>well-defined. Is there a better way to describe this tuning?

I can't think of a better way. It seems completely specified to me (I adopted it from Herman Miller). "Meantone" tells us that

2 * octave_error - 4 * fifth_error + major_third_error = syntonic_comma

The "1/6-comma" preceding the word "meantone" tells us that the fifths are that much narrower than just. "1/6-comma wide octaves" is self explanatory and from the above equation we find that the major thirds must be just.

I suppose, since just major thirds are usually associated with 1/4-comma meantone, it might be wise to redundantly mention the error in the major thirds as well. e.g. "1/6-comma meantone with 1/6 comma wide octaves and just major thirds".
-- Dave Keenan
http://dkeenan.com

🔗Paul H. Erlich <PErlich@xxxxxxxxxxxxx.xxxx>

12/13/1999 2:52:05 PM

I wrote,

>>Actually, that is even easier, since squared error is a differentiable
>>function. Then one can simply use calculus to minimize the function, as
>>I've done for diatonic (meantone) and decatonic (22-equal-like) tunings.

Dave Keenan wrote,

>Of course many people would say that "simply use calculus" is an oxymoron.
WOuld you like to >give a worked example for one of the cases in my web
page. Say the meantone case where we >are willing to temper the octave and
we want to minimise the RMS error over all the intervals in >4:5:6:9, and
their inversions except 8:9 and 9:10, and including the octave.

OK. Meantone with tempered octaves means we are going to have two
independent variables -- the logarithmic size of octave (call it u) and the
logarithmic size of fifth (call it v). So this is a multivariate calculus
problem.

First, let's express each of the intervals of interest in terms of u and v:

1:2 = perfect octave = one octave up = u
2:3 = perfect fifth = one fifth up = v
3:4 = perfect fourth = one octave up, one fifth down = u - v
3:5 = major sixth = three fifths up, one octave down = 3*v - u
4:5 = major third = four fifths up, two octaves down = 4*v - 2*u
4:9 = major ninth = two fifths up = 2*v
5:6 = minor third = two octaves up, three fifths down = 2*u - 3*v
5:8 = minor sixth = three octaves up, four fifths down = 3*u - 4*v
5:9 = minor seventh = two octaves up, two fifths down = 2*u - 2*v

I'm assuming that for some reason you don't care about 1:3, 1:4, 1:6, 1:8,
1:9, 2:5, 2:9, or 3:8.

Now let's write down our squared error function:

sqerr = (u - 1)^2 + (v - log(3/2)/log(2))^2 + (u - v - log(4/3)/log(2))^2 +
(3*v - u - log(5/3)/log(2))^2 + (4*v - 2*u - log(5/4)/log(2))^2 + (2*v -
log(9/4)/log(2))^2 + (2*u - 3*v - log(6/5)/log(2))^2 + (3*u - 4*v -
log(8/5)/log(2))^2 + (2*u - 2*v - log(9/5)/log(2))^2

We set the partial derivative with respect to each variable equal to zero,
using the chain rule, and divide through by 2:

d(sqerr)/du = (u - 1) + (u - v - log(4/3)/log(2)) - (3*v - u -
log(5/3)/log(2)) - 2*(4*v - 2*u - log(5/4)/log(2)) + 2*(2*u - 3*v -
log(6/5)/log(2)) + 3*(3*u - 4*v - log(8/5)/log(2)) + 2*(2*u - 2*v -
log(9/5)/log(2)) = 0/2;

d(sqerr)/dv = (v - log(3/2)/log(2)) - (u - v - log(4/3)/log(2)) + 3*(3*v - u
- log(5/3)/log(2)) + 4*(4*v - 2*u - log(5/4)/log(2)) + 2*(2*v -
log(9/4)/log(2)) - 3*(2*u - 3*v - log(6/5)/log(2)) - 4*(3*u - 4*v -
log(8/5)/log(2)) - 2*(2*u - 2*v - log(9/5)/log(2)) = 0/2.

Collecting terms:

u*(1 + 1 + 1 + 4 + 4 + 9 + 4) - v*(1 + 3 + 8 + 6 + 12 + 4) = (1 + 2 + 4 + 2
+ 9) + (log(3)*(-1 + 1 + 2 + 4) + log(5)*(-1 - 2 - 2 - 3 - 2))/log(2);

v*(1 + 1 + 9 + 16 + 4 + 9 + 16 + 4) - u*(1 + 3 + 8 + 6 + 12 + 4) = (-1 - 2 -
8 - 4 - 3 - 12) + (log(3)*(1 + 1 - 3 + 4 - 3 - 4) + log(5)*(3 + 4 + 3 + 4 +
2))/log(2).

Adding and dividing through by 2:

12*u - 17*v = 9 + (3*log(3) - 5*log(5))/log(2);

30*v - 17*u = -15 + (-2*log(3) + 8*log(5))/log(2).

Solving the first equation for u:

u = (17*v + 9 + (3*log(3) - 5*log(5))/log(2))/12.

Plugging this into the second equation:

30*v - 17*(17*v + 9 + 3*(log(3) - 5*log(5))/log(2))/12 = -15 + (-2*log(3) +
8*log(5))/log(2)

Multiplying both sides by 12:

360*v - 289*v = 153 - 180 + (51*log(3) - 24*log(3) - 85*log(5) +
96*log(5))/log(2)

v = (-27 + (27*log(3) + 11*log(5))/log(2))/71
[= 698.6230�]
= (-71 - 4*11)/71 + (71 - 4*11)/71*log(3)/log(2) + 11/71*log(5)/log(2)
= log(3)/log(2) - 1 - 4*11/71*log(3)/log(2) + 11/71*log(5)/log(2) + 4*11/71
= log(3/2)/log(2) - 11/71*log(81/80)/log(2)

So the fifths are those of 11/71-comma meantone.

Plugging back into the equation for u:

u = (17*(-27 + (27*log(3) + 11*log(5))/log(2))/71 + 9 + (3*log(3) -
5*log(5))/log(2))/12

u = -459/852 + 639/852 + (459/852 + 213/852)*log(3)/log(2) + (187/852 -
355/852)*log(5)/log(2)
=(15 + (56*log(3) - 14*log(5))/log(2))/71
[=1204.2407�]
= (71 - 4*14)/71 + 4*14/71*log(3)/log(2) - 14/71*log(5)/log(2)
= 1 + 4*14/71*log(3)/log(2) - 14/71*log(5)/log(2) - 4*14/71
= 1 + 14/71*log(81/80)/log(2)

So the octaves are stretched by 14/71 comma.

>>Dave, I'm not sure "1/6-comma meantone with 1/6 comma wide octaves" is
>>well-defined. Is there a better way to describe this tuning?

>I can't think of a better way. It seems completely specified to me (I
adopted it from Herman Miller). "Meantone" tells us that

>2 * octave_error - 4 * fifth_error + major_third_error = syntonic_comma

>I suppose, since just major thirds are usually associated with 1/4-comma
meantone, it might be wise to redundantly mention the error in the major
thirds as well. >e.g. "1/6-comma meantone with 1/6 comma wide octaves and
just major thirds".

See the confusion Herman's terminology creates? Perhaps it is better for now
to describe it as a 2-dimensional tuning base on 1/6-comma narrow fifths and
1/6-comma wide octaves. That way no one will assume that this is a stretched
tuning, or that the fourths are 1/6-comma wide, or that the major thirds are
1/3-comma wide. . . .