back to list

For Monz: derivation of MIRACLE generator (warning: unnecessary math content)

🔗paul@stretch-music.com

5/12/2001 11:41:42 PM

I'm going to do the 9-limit optimization here, since Dave Keenan
already did the 7-limit and 11-limit ones computationally.

Let's first see how each prime interval is generated (all logs will
be base-2):

3/2 ~= g^6 -> -1+log(3) = 6*g

5/8 ~= g^(-7) -> -3+log(5) = -7*g

7/8 ~= g^(-2) -> -3+log(7) = -2*g

Now we write our squared error terms for all 10 9-limit interval
classes (treating 9:3 as separate from 3:1 to give this interval the
extra weight it deserves):

Sum-of-squared-error
=
(log(3) - 6*g - 1)^2 [sq. err. term for 3:1]
+
(log(5) + 7*g - 3)^2 [sq. err. term for 5:1]
+
(log(5/3) + 13*g - 2)^2 [sq. err. term for 5:3]
+
(log(7) + 2*g - 3)^2 [sq. err. term for 7:1]
+
(log(7/3) + 8*g - 2)^2 [sq. err. term for 7:3]
+
(log(7/5) - 5*g)^2 [sq. err. term for 7:5]
+
(log(9) - 12*g - 2)^2 [sq. err. term for 9:1]
+
(log(9/3) - 6*g - 1)^2 [sq. err. term for 9:3]
+
(log(9/5) - 19*g + 1)^2 [sq. err. term for 9:5]
+
(log(9/7) - 14*g + 1)^2 [sq. err. term for 9:7]

The derivative of this sum-of-squared errors with respect to g is

2*(log(3) - 6*g - 1)*(-6) [term for 3:1]
+
2*(log(5) + 7*g - 3)*7 [term for 5:1]
+
2*(log(5/3) + 13*g - 2)*13 [term for 5:3]
+
2*(log(7) + 2*g - 3)*2 [term for 7:1]
+
2*(log(7/3) + 8*g - 2)*8 [term for 7:3]
+
2*(log(7/5) - 5*g)*(-5) [term for 7:5]
+
2*(log(9) - 12*g - 2)*(-12) [term for 9:1]
+
2*(log(9/3) - 6*g - 1)*(-6) [term for 9:3]
+
2*(log(9/5) - 19*g + 1)*(-19) [term for 9:5]
+
2*(log(9/7) - 14*g + 1)*(-14) [term for 9:7]

Now let's set this equal to zero. We can drop the "2*"s in front of
everything. Collecting similar terms:

log(3)*( -6 - 13 - 8 - 24 - 6 - 38 - 28)
+
log(5)*(7 + 13 + 5 + 19)
+
log(7)*(2 + 8 - 5 + 14)
+
g*(6^2 + 7^2 + 13^2 + 2^2 + 8^2 + 5^2 + 12^2 + 6^2 + 19^2 + 14^2)
+
6 - 21 - 26 - 6 - 16 + 24 + 6 - 19 - 14
=
0.

A little arithmetic, and you get:

log(3)*(-123) + log(5)*44 + log(7)*19 + g*1084 - 66 = 0.

Solving for g,

g = (123*log(3) - 44*log(5) - 19*log(7) + 66)/1084 octave

= 0.0972747305300404 octave

= 116.729676636048 cents.

Hope I didn't make any errors!

🔗monz <joemonz@yahoo.com>

5/12/2001 11:57:50 PM

--- In tuning@y..., paul@s... wrote:

/tuning/topicId_22626.html#22626

> I'm going to do the 9-limit optimization here, since
> Dave Keenan already did the 7-limit and 11-limit ones
> computationally.
>
> Let's first see how each prime interval is generated (all
> logs will be base-2):
>
> 3/2 ~= g^6 -> -1+log(3) = 6*g
>
> 5/8 ~= g^(-7) -> -3+log(5) = -7*g
>
> 7/8 ~= g^(-2) -> -3+log(7) = -2*g
>
>
> Now we write our squared error terms for all 10 9-limit interval
> classes ... <snip>

Thanks, Paul... even tho I don't understand any of it. :)

"It's all Greek to me"... well, actually, I understand
ancient Greek quite a bit better than this!

Wouldn't it be fairly straightforward to write an algorithm
that does this, following the method you illustrated in
your post? Maybe Robert can whip it up quickly...?

Then the user could just plug in the intervals he wants to
approximate, along with any other parameters, and POOF!
- out comes the generator.

-monz
http://www.monz.org
"All roads lead to n^0"

🔗paul@stretch-music.com

5/13/2001 12:03:04 AM

--- In tuning@y..., "monz" <joemonz@y...> wrote:
>
> Thanks, Paul... even tho I don't understand any of it. :)

Hey Monz . . . it's really the same in form as the Woolhouse
derivation.
>
> "It's all Greek to me"... well, actually, I understand
> ancient Greek quite a bit better than this!
>
>
> Wouldn't it be fairly straightforward to write an algorithm
> that does this, following the method you illustrated in
> your post? Maybe Robert can whip it up quickly...?

I bet he could . . .

🔗Dave Keenan <D.KEENAN@UQ.NET.AU>

5/13/2001 12:25:03 AM

--- In tuning@y..., paul@s... wrote:
> I'm going to do the [unweighted RMS] 9-limit optimization here,
since Dave Keenan
> already did the 7-limit and 11-limit ones computationally.
...
> = 116.729676636048 cents.
>
> Hope I didn't make any errors!

Nope. Doing it numerically to 6 significant digits I get

116.730 cents.

Well done.

Almost indistinguishable from the 11-limit RMS optimum isn't it?

🔗monz <joemonz@yahoo.com>

5/13/2001 12:33:38 AM

--- In tuning@y..., paul@s... wrote:

/tuning/topicId_22626.html#22629

> --- In tuning@y..., "monz" <joemonz@y...> wrote:
> >
> > Thanks, Paul... even tho I don't understand any of it. :)
>
> Hey Monz . . . it's really the same in form as the Woolhouse
> derivation.

Yup - I recognized that. But I don't grok this kind of
thing quickly - I really have to go thru it step by step.
Thanks for making the comparison in case I had missed it.

Lest this seem too much like a private conversation, here's
the link to my Woolhouse paper to which Paul refers:
http://www.ixpres.com/interval/monzo/woolhouse/essay.htm#temp

-monz
http://www.monz.org
"All roads lead to n^0"

🔗monz <joemonz@yahoo.com>

5/13/2001 12:38:32 AM

--- In tuning@y..., "monz" <joemonz@y...> wrote:

> Lest this seem too much like a private conversation, here's
> the link to my Woolhouse paper to which Paul refers:
> http://www.ixpres.com/interval/monzo/woolhouse/essay.htm#temp
>

Well, the calculus Paul showed me here is actually much further
down, about 3/4 of the way down the page, after the underlined
heading: "Woolhouse's derivation of 7/26-comma 'optimal' meantone".

This is the part of my webpage that's similar to Paul's post
on how to calculate the Miracle generator.

-monz
http://www.monz.org
"All roads lead to n^0"