back to list

weighted error -- on the way to a test

🔗Carl Lumma <ekin@lumma.org>

5/23/2006 4:20:25 PM

Here's a start at a synthetic test of tenney-weighted error.
I show chords, then unweighted max, mad, and rms error.
Anybody care to:

1. Check these numbers?
2. Supply numbers for TOP error per Paul Erlich's 'Middle Path' paper?

I hope at least the last group will differ on weighted error.

(0 386 702 969) JI

(0 381 702 964) 2 flat by 5 ((5 max)
(3.3333333333333335 mad)
(4.08248290463863 rms))
(0 386 697 964) 2 flat by 5 " "
(0 381 697 969) 2 flat by 5 " "

(0 391 702 974) 2 sharp by 5 " "
(0 386 707 974) 2 sharp by 5 " "
(0 391 707 969) 2 sharp by 5 " "

(0 376 702 959) 2 flat by 10 ((10 max)
(6.666666666666667 mad)
(8.16496580927726 rms))
(0 386 692 959) 2 flat by 10 " "
(0 376 692 969) 2 flat by 10 " "

(0 396 702 979) 2 sharp by 10 " "
(0 386 712 979) 2 sharp by 10 " "
(0 396 712 969) 2 sharp by 10 " "

(0 386 709 962) 1 sharp, 1 flat by 7 ((14 max)
(7.0 mad)
(8.082903768654761 rms))
(0 393 695 969) 1 sharp, 1 flat by 7 " "
(0 386 695 976) 1 flat, 1 sharp by 7 " "
(0 379 709 969) 1 flat, 1 sharp by 7 " "

(0 386 702 984) 1 sharp by 15 ((15 max) (7.5 mad) (10.606601717798213 rms))
(0 386 702 954) 1 flat by 15 " "
(0 386 717 969) 1 sharp by 15 " "
(0 386 687 969) 1 flat by 15 " "

-Carl

🔗Gene Ward Smith <genewardsmith@coolgoose.com>

5/23/2006 7:03:24 PM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@...> wrote:
>
> Here's a start at a synthetic test of tenney-weighted error.
> I show chords, then unweighted max, mad, and rms error.
> Anybody care to:
>
> 1. Check these numbers?
> 2. Supply numbers for TOP error per Paul Erlich's 'Middle Path' paper?

What does this have to do with TOP error?

🔗Carl Lumma <ekin@lumma.org>

5/23/2006 8:00:00 PM

>> Here's a start at a synthetic test of tenney-weighted error.
>> I show chords, then unweighted max, mad, and rms error.
>> Anybody care to:
>>
>> 1. Check these numbers?
>> 2. Supply numbers for TOP error per Paul Erlich's 'Middle Path' paper?
>
>What does this have to do with TOP error?

I want to compare them.

-Carl

🔗Graham Breed <gbreed@gmail.com>

5/24/2006 3:19:29 AM

Carl Lumma wrote:
> Here's a start at a synthetic test of tenney-weighted error.
> I show chords, then unweighted max, mad, and rms error.
> Anybody care to:
> > 1. Check these numbers?
> 2. Supply numbers for TOP error per Paul Erlich's 'Middle Path' paper?
> > I hope at least the last group will differ on weighted error.
> > (0 386 702 969) JI

max 0.313713864834
rms 0.208766112031
mad 0.177602176774
top 0.0985642891599
twrms 0.0861018914155

As a control, because you're expecting a lot more precision out than you put in.

The max, rms and mad are functions of the errors in the notes you gave, relative to 4:5:6

TWRMS is the Tenney-weighted optimal prime root mean squared wrror. So like TOP but with RMS instead of max-abs.

Plain errors are in cents and weighted errors are in cents/octave

> (0 381 702 964) 2 flat by 5 ((5 max)
> (3.3333333333333335 mad)
> (4.08248290463863 rms))

max 5.31371386483
rms 4.14435170677
mad 3.39487315619
top 1.15953358819
twrms 0.986861379617

> (0 386 697 964) 2 flat by 5 " "

0.0 386.0 697.0 964.0
max 4.95500086539
rms 3.99749184755
mad 3.36487373312
top 1.49760923907
twrms 1.22353308374

> (0 381 697 969) 2 flat by 5 " "

0.0 381.0 697.0 969.0
max 5.31371386483
rms 4.19594634422
mad 3.48093608703
top 1.59617336461
twrms 1.35156824478

> (0 391 702 974) 2 sharp by 5 " "

0.0 391.0 702.0 974.0
max 5.17409353087
rms 4.03048990112
mad 3.30179293355
top 0.994093404941
twrms 0.898616298064

> (0 386 707 974) 2 sharp by 5 " "

0.0 386.0 707.0 974.0
max 5.17409353087
rms 4.17618951212
mad 3.51093551011
top 1.65697032957
twrms 1.36110426315

> (0 391 707 969) 2 sharp by 5 " "

0.0 391.0 707.0 969.0
max 5.04499913461
rms 3.97674919863
mad 3.30179293355
top 1.55840621716
twrms 1.28585816192

> (0 376 702 959) 2 flat by 10 ((10 max)
> (6.666666666666667 mad)
> (8.16496580927726 rms))

max 10.3137138648
rms 8.22441804522
mad 6.72820648952
top 2.23925091432
twrms 1.92835976115

> (0 386 692 959) 2 flat by 10 " "

max 9.95500086539
rms 8.07772444357
mad 6.69820706645
top 3.08113543955
twrms 2.51972045101

> (0 376 692 969) 2 flat by 10 " "

0.0 376.0 692.0 969.0
max 10.3137138648
rms 8.27657426059
mad 6.81426942037
top 3.17969905812
twrms 2.67248321154

> (0 396 702 979) 2 sharp by 10 " "

0.0 396.0 702.0 979.0
max 10.1740935309
rms 8.11045299165
mad 6.63512626688
top 2.06801347549
twrms 1.8337494104

> (0 386 712 979) 2 sharp by 10 " "

0.0 386.0 712.0 979.0
max 10.1740935309
rms 8.2565651288
mad 6.84426884344
top 3.22805640272
twrms 2.64674500148

> (0 396 712 969) 2 sharp by 10 " "

0.0 396.0 712.0 969.0
max 10.0449991346
rms 8.05722150753
mad 6.63512626688
top 3.12949280503
twrms 2.59504241897

> (0 386 709 962) 1 sharp, 1 flat by 7 ((14 max)
> (7.0 mad)
> (8.082903768654761 rms))

0.0 386.0 709.0 962.0
max 7.04499913461
rms 5.66637533528
mad 4.72820648952
top 3.43528624684
twrms 2.8568925315

This one's very different!

> (0 393 695 969) 1 sharp, 1 flat by 7 " "

0.0 393.0 695.0 969.0
max 6.95500086539
rms 5.57101929262
mad 4.60512684381
top 3.63615730219
twrms 2.99308426419

> (0 386 695 976) 1 flat, 1 sharp by 7 " "

0.0 386.0 695.0 976.0
max 7.17409353088
rms 5.77171469081
mad 4.81426942037
top 3.47444343365
twrms 2.86008182373

> (0 379 709 969) 1 flat, 1 sharp by 7 " "

0.0 379.0 709.0 969.0
max 7.31371386483
rms 5.8638079738
mad 4.84426884344
top 3.79532436109
twrms 3.11161939905

> (0 386 702 984) 1 sharp by 15 ((15 max) (7.5 mad) (10.606601717798213 rms))

0.0 386.0 702.0 984.0
max 15.1740935309
rms 8.76267759297
mad 5.17760217677
top 2.76404579287
twrms 2.57022909998

> (0 386 702 954) 1 flat by 15 " "

0.0 386.0 702.0 954.0
max 14.8259064691
rms 8.56169655972
mad 5.06153982286
top 2.66056585073
twrms 2.46897181605

> (0 386 717 969) 1 sharp by 15 " "

0.0 386.0 717.0 969.0
max 15.0449991346
rms 8.68870385245
mad 5.17760217677
top 4.795028329
twrms 4.48092505528

> (0 386 687 969) 1 flat by 15 " "

0.0 386.0 687.0 969.0
max 14.9550008654
rms 8.63675818484
mad 5.1476027537
top 4.76740396362
twrms 4.44317053554

Graham

🔗Carl Lumma <ekin@lumma.org>

5/24/2006 7:35:44 AM

>> (0 386 702 969) JI
>
>max 0.313713864834
>rms 0.208766112031
>mad 0.177602176774
>top 0.0985642891599
>twrms 0.0861018914155
>
>As a control,

Yes, that's good.

>because you're expecting a lot more precision out than you
>put in.

One doesn't have to consider that "JI" in fact. It's just another
chord in the test, which will be ranked by listeners and by the
error functions.

>The max, rms and mad are functions of the errors in the notes you gave,
>relative to 4:5:6

What else would they be?

>TWRMS is the Tenney-weighted optimal prime root mean squared wrror.
>So like TOP but with RMS instead of max-abs.
>
>Plain errors are in cents and weighted errors are in cents/octave

I'm confused. First, are these dyadic measures, and second, where
are octaves coming from? Bear in mind that I totally forget how
Paul calculates TOP error in his paper (he was doing prime-limit
tunings, not chords, I guess...). I've misplaced my copy and I
was up hunting for it last night in this mess of boxes to no avail.

>> (0 381 702 964) 2 flat by 5 ((5 max)
>> (3.3333333333333335 mad)
>> (4.08248290463863 rms))
>
>max 5.31371386483

This is relative to JI, then, not to the chord called "JI"
at the top.

>rms 4.14435170677
>mad 3.39487315619
>top 1.15953358819
>twrms 0.986861379617

So I can't quite tell if my numbers were right, but it looks
like they were. Whatever we do, we have to get TOP and TWRMS
in the same units as the others.

>> (0 386 709 962) 1 sharp, 1 flat by 7 ((14 max)
>> (7.0 mad)
>> (8.082903768654761 rms))
>
>0.0 386.0 709.0 962.0
>max 7.04499913461

Are you doing dyadic (pairwise)? Because 7:6 should be
about 14 cents flat here.

>> (0 393 695 969) 1 sharp, 1 flat by 7 " "
>
>0.0 393.0 695.0 969.0
>max 6.95500086539

Ditto 6:5.

-Carl

🔗Graham Breed <gbreed@gmail.com>

5/24/2006 8:07:10 AM

Carl Lumma wrote:

>>The max, rms and mad are functions of the errors in the notes you gave, >>relative to 4:5:6
> > What else would they be?

4:5:6:7 rather. I could take errors of all intervals within the chord. I could extrapolate to a full 7-limit tuning, and take the errors of that, which should give the same result. I could extrapolate to the 9-limit, which would be different. I could take some other tuning as the target, even.

>>TWRMS is the Tenney-weighted optimal prime root mean squared wrror.
>>So like TOP but with RMS instead of max-abs.
>>
>>Plain errors are in cents and weighted errors are in cents/octave
> > I'm confused. First, are these dyadic measures, and second, where
> are octaves coming from? Bear in mind that I totally forget how
> Paul calculates TOP error in his paper (he was doing prime-limit
> tunings, not chords, I guess...). I've misplaced my copy and I
> was up hunting for it last night in this mess of boxes to no avail.

The unweighted measures are dyadic relative to the root.

The prime tunings are extrapolated assuming pure octaves, and then the whole scale stretch is optimized. I suppose I could do that differently as well but it's tricky.

The TOP error is valid for a whole prime limit, and can be calculated from any sufficient subset. I assume this one will do. My calculation is much easier given the primes because then the sizes match the weighting. So that's how I did it.

>>>(0 381 702 964) 2 flat by 5 ((5 max)
>>> (3.3333333333333335 mad)
>>
>>max 5.31371386483
> > > This is relative to JI, then, not to the chord called "JI"
> at the top.

Yes.

>>rms 4.14435170677
>>mad 3.39487315619
>>top 1.15953358819
>>twrms 0.986861379617
> > > So I can't quite tell if my numbers were right, but it looks
> like they were. Whatever we do, we have to get TOP and TWRMS
> in the same units as the others.

You can't, because they're weighted.

>>>(0 386 709 962) 1 sharp, 1 flat by 7 ((14 max)
>>> (7.0 mad)
>>> (8.082903768654761 rms))
>>
>>0.0 386.0 709.0 962.0
>>max 7.04499913461
> > > Are you doing dyadic (pairwise)? Because 7:6 should be
> about 14 cents flat here.

No, no 7:6

>>>(0 393 695 969) 1 sharp, 1 flat by 7 " "
>>
>>0.0 393.0 695.0 969.0
>>max 6.95500086539
> > > Ditto 6:5.

Indeed.

Graham

🔗Carl Lumma <ekin@lumma.org>

5/24/2006 8:18:06 AM

>>>Plain errors are in cents and weighted errors are in cents/octave
>>
>> I'm confused. First, are these dyadic measures, and second, where
>> are octaves coming from? Bear in mind that I totally forget how
>> Paul calculates TOP error in his paper (he was doing prime-limit
>> tunings, not chords, I guess...). I've misplaced my copy and I
>> was up hunting for it last night in this mess of boxes to no avail.
//
>The prime tunings are extrapolated assuming pure octaves, and then the
>whole scale stretch is optimized. I suppose I could do that differently
>as well but it's tricky.
>
>The TOP error is valid for a whole prime limit, and can be calculated
>from any sufficient subset. I assume this one will do. My calculation
>is much easier given the primes because then the sizes match the
>weighting. So that's how I did it.

I guess I'll have to wait until I find that paper.

>>>rms 4.14435170677
>>>mad 3.39487315619
>>>top 1.15953358819
>>>twrms 0.986861379617
>>
>>
>> So I can't quite tell if my numbers were right, but it looks
>> like they were. Whatever we do, we have to get TOP and TWRMS
>> in the same units as the others.
>
>You can't, because they're weighted.

I guess you're right. I realize it isn't necessary though, since
they'll be used to make separate rankings, that will be compared
against the experimental ranking.

>> This is relative to JI, then, not to the chord called "JI"
>> at the top.
>
>Yes.

Then the chords themselves should be recalculated to lie
equidistant on either side of the contral (in that case, exact JI).
I just thought it'd be easier with round cents.

>>>>(0 386 709 962) 1 sharp, 1 flat by 7 ((14 max)
>>>> (7.0 mad)
>>>> (8.082903768654761 rms))
>>>
>>>0.0 386.0 709.0 962.0
>>>max 7.04499913461
>>
>>
>> Are you doing dyadic (pairwise)? Because 7:6 should be
>> about 14 cents flat here.
>
>No, no 7:6

?

-Carl

🔗Gene Ward Smith <genewardsmith@coolgoose.com>

5/24/2006 11:17:52 PM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@...> wrote:

> Bear in mind that I totally forget how
> Paul calculates TOP error in his paper (he was doing prime-limit
> tunings, not chords, I guess...). I've misplaced my copy and I
> was up hunting for it last night in this mess of boxes to no avail.

What is it you want TOP error of?

🔗Carl Lumma <ekin@lumma.org>

5/24/2006 11:33:38 PM

>> Bear in mind that I totally forget how
>> Paul calculates TOP error in his paper (he was doing prime-limit
>> tunings, not chords, I guess...). I've misplaced my copy and I
>> was up hunting for it last night in this mess of boxes to no avail.
>
>What is it you want TOP error of?

The chords in question. I can think of several ways to do it,
such as weighting each dyad's error by its log(TenneyHeight), but
I thought I'd re-read Paul's approach for inspiration before
committing to anything.

Graham claims he can find the associated TOP tuning and give
the TOP error of that. But for some reason I'm not 100% if
that's what he's given me, what "cents per octave" means, etc.

Any suggestions?

-Carl

🔗Graham Breed <gbreed@gmail.com>

5/25/2006 6:20:10 AM

Carl Lumma wrote:
>>>Bear in mind that I totally forget how
>>>Paul calculates TOP error in his paper (he was doing prime-limit
>>>tunings, not chords, I guess...). I've misplaced my copy and I
>>>was up hunting for it last night in this mess of boxes to no avail.
>>
>>What is it you want TOP error of?
> > The chords in question. I can think of several ways to do it,
> such as weighting each dyad's error by its log(TenneyHeight), but
> I thought I'd re-read Paul's approach for inspiration before
> committing to anything.

You can't have the TOP error of a chord, at least the chords you gave. The current definition of "TOP" is either

Tenney OPtimal

or

Tempered Octaves, Please!

Well, within what parameters are we supposed to optimize your chords? And how can we temper the octaves when there are no octaves!?

Weighting each dyad n/d by log(n*d) (with n/d in its lowest terms) will give you the weighted error. You can then get a max weighted error, rms weighted error, mean weighted error, etc. You can't talk about TOP unless you have a consistent, regular tuning for all intervals within the prime limit.

(Error here as absolute value of deviation)

Paul's approach in the paper is to give a quote from tuning-math...

> Graham claims he can find the associated TOP tuning and give
> the TOP error of that. But for some reason I'm not 100% if
> that's what he's given me, what "cents per octave" means, etc.

I can reconstruct the regular temperament (or whatever it is) by assuming the octaves are pure, and then stretch them to get the TOP. But that's probably not what you want.

"Cents per octave" are the units Paul uses in the paper, and so I use for consistency. He doesn't call them that, but he doesn't call them anything. It means you take the error in cents, and the weighting in octaves. So for n*d it's |1200*log2(n/d) - actual_interval_size_in_cents| / log2(n*d). The top is cents and the bottom is octaves.

It's easy to show this by dimensional analysis. n*d is a frequency ratio. 1200*log2(n/d) is a pitch difference in cents. log2(n/d) is a pitch difference in octaves. log(n/d) = log(n) - log(d) so log(n) and log(d) must have the same units as log(n/d). Therefore log2(n) and log2(d) must have units of octaves. log(n*d) = log(n) + log(d). log(n*d) must have the same units as log(n) and log(d). Therefore log2(n*d) must have units of octaves. Therefore log2(TenneyHeight) has dimensions of octaves and Paul's TOP has dimensions of cents per octave, whether he intended it or not.

It makes some sense. Two octaves will have twice the error of one octave. So as octaves share in the tempering, this gives you some idea of how the overall tempering compares to the tempering of that octave. a TOP error of 1 cent/octave is as bad as the octave being 1 cent out of tune, according to the Tenny weighting. Other intervals will tend to be more out of tune, so the TOP error in cents/octave is lower than the unweighted errors.

How bad will the error in 5/4 be? Well, the Tenney height of 5/4 is 5*4=20. That's somewhere between 16 and 32, and so between 4 and 5 octaves above whatever 1 is. That means you can expect the error of 5/4 to be 4 and a bit times the average (of whatever kind) weighted error in cents/octave.

If the error and the weighting have the same units, the TOP error becomes dimensionless. This is theoretically simple but gives a small number that doesn't mean much. Hence we use cents/octave instead for public consumption.

More in my forthcoming monograph on weighted errors and complexities I suppose :P

> Any suggestions?

Stick to weighted errors, which you seem to know how to do. They're fiddly for me because I'm set up for temperaments, not chords.

Graham

🔗Carl Lumma <ekin@lumma.org>

5/25/2006 9:24:48 AM

>Well, within what parameters are we supposed to optimize your chords?
>And how can we temper the octaves when there are no octaves!?
>
>Weighting each dyad n/d by log(n*d) (with n/d in its lowest terms) will
>give you the weighted error. You can then get a max weighted error, rms
>weighted error, mean weighted error, etc. You can't talk about TOP
>unless you have a consistent, regular tuning for all intervals within
>the prime limit.

Yes, the weighted error is sufficient. My original message
said "tenney-weighted error". I suppose both mean and rms
would be useful, though they may not give different rankings.

>> Graham claims he can find the associated TOP tuning and give
>> the TOP error of that. But for some reason I'm not 100% if
>> that's what he's given me, what "cents per octave" means, etc.
>
>I can reconstruct the regular temperament (or whatever it is) by
>assuming the octaves are pure, and then stretch them to get the TOP.
>But that's probably not what you want.

Ah. No, I don't think so.

>"Cents per octave" are the units Paul uses in the paper, and so I use
>for consistency. He doesn't call them that, but he doesn't call them
>anything. It means you take the error in cents, and the weighting in
>octaves. So for n*d it's |1200*log2(n/d) -
>actual_interval_size_in_cents| / log2(n*d). The top is cents and the
>bottom is octaves.

Yes, it's a good point. Perhaps ATE is the answer.

>If the error and the weighting have the same units, the TOP error
>becomes dimensionless. This is theoretically simple but gives a small
>number that doesn't mean much. Hence we use cents/octave instead for
>public consumption.

Referring to ATE?

-Carl

🔗Carl Lumma <ekin@lumma.org>

5/25/2006 7:53:02 PM

>>> This is relative to JI, then, not to the chord called "JI"
>>> at the top.
>>
>>Yes.
>
>Then the chords themselves should be recalculated to lie
>equidistant on either side of the contral (in that case, exact JI).
>I just thought it'd be easier with round cents.

In order to do weighted error with "round cents", one has
to know which identities are being approximated. Even though
we know in this case they're 4 5 6 7, it was a dumb idea to
round the central chord.

-Carl

🔗Carl Lumma <ekin@lumma.org>

5/25/2006 8:00:58 PM

>>"Cents per octave" are the units Paul uses in the paper, and so I use
>>for consistency. He doesn't call them that, but he doesn't call them
>>anything. It means you take the error in cents, and the weighting in
>>octaves. So for n*d it's |1200*log2(n/d) -
>>actual_interval_size_in_cents| / log2(n*d). The top is cents and the
>>bottom is octaves.
>
>Yes, it's a good point. Perhaps ATE is the answer.

Can anybody tell me if these are the mean dyadic
tenney-weighted and Absolute TOP Errors of 4:5:6:7
in 12-equal?

(3.858075562602391 tenney-weighted)
(0.0032150629688353274 ate)

-Carl

🔗Gene Ward Smith <genewardsmith@coolgoose.com>

5/25/2006 11:22:49 PM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@...> wrote:

> Can anybody tell me if these are the mean dyadic
> tenney-weighted and Absolute TOP Errors of 4:5:6:7
> in 12-equal?
>
> (3.858075562602391 tenney-weighted)
> (0.0032150629688353274 ate)

Why don't you give some definitions?

🔗Carl Lumma <ekin@lumma.org>

5/25/2006 11:40:44 PM

At 11:22 PM 5/25/2006, you wrote:
>--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@...> wrote:
>
>> Can anybody tell me if these are the mean dyadic
>> tenney-weighted and Absolute TOP Errors of 4:5:6:7
>> in 12-equal?
>>
>> (3.858075562602391 tenney-weighted)
>> (0.0032150629688353274 ate)
>
>Why don't you give some definitions?

The top number is supposed to be the mean of
log2(n*d)/error-in-cents for all dyads in
4:5:6:7 (not octave-equivalent).

The bottom number is supposed to be
log_[n*d](error-as-factor) for the same dyads
(this was, after all, your idea).

-Carl