back to list

Weighting schemes and RMS vs. Max Abs

🔗Dave Keenan <d.keenan@xx.xxx.xxx>

4/20/1999 8:16:55 PM

Message: 23
Date: Mon, 19 Apr 1999 03:56:44 -0400
From: Brett Barbaro <barbaro@noiselabs.com>
Subject: Re: RMS error vs. Maximum Absolute error

Hey Paul E., that was a dirty trick impersonating your room mate for so
long. :-) How about changing the "Real Name" field in his mailer when you
use it and back agin when you're finished. Or just duplicate the mailer
into another folder and leave it that way.

[Me, Dave Keenan]
>> Another good point, however my objection still stands, albeit with less
>> extreme examples.

[Paul Erlich]
>Such as?

OK I guess I'm splitting hairs here, but in the meantone spectrum it's hard
for me to see why anyone would prefer (as a 5-limit approximation) the RMS
optimum to the Max Abs optimum, or even the last one shown below.

2:3 4:5 5:6
---------------
-5.8 -1.7 -4.1 RMS opt
-5.4 0.0 -5.4 Max Abs opt (1/4 comma)
-5.2 0.6 -5.8 the other side of 1/4 comma with same max abs as RMS opt

But maybe that's really a problem with equal weighting. Weighting the fifth
more strongly would have the same effect.

>Actually, the Plomp-with-harmonic-overtones dissonance curves I've seen
>_are_ V-shaped around the simple
>ratios. Don't you have spreadsheets on you webpage to produce these
>curves? (I tried downloading them but my
>version of Excel didn't recognize them.)

Yes, you're right, they are discontinuous in the derivative.

I found that the reciprocal of the whole-number-limit is a crude
approximation of the absolute value of the slope near the bottom of the
notch. This justifies tolerances for low complexity ratios in proportion to
their whole-number-limit. Weights are inversely proportional to tolerances.

> So I'm thinking maybe they are 4th power curves
> or 6th power (or any positive power (greater than 2) of the absolute
> deviation)

These curves are too flat -- having a zero second derivative,

Huh? Don't all these (power and exponential) curves have a zero second
derivative for x = 0. None are zero everywhere.

they look much more like a mesa than anything
in the HE curves.

Ok.

>> or maybe they are the exponential of the absolute deviation
>> exp(|x|)
>
>That's pointy and would suggest something like MAD.
>
>> or inverse Gaussian exp(x^2).
>
>In my paper (http://www-math.cudenver.edu/~jstarret/22ALL.pdf), accuracy
is in fact calculated using a
>Gaussian for each interval, and using the geometric mean of the accuracies
so that even one really bad
>interval makes the whole tuning look bad (a quality that you express a
desire for above). That turns out to
>be related monotonically to straight RMS, so results in the same solutions
for optimization problems as RMS.

Of course it does. But I wasn't talking about taking their _geometric_
mean. Analogous to Root-Mean-Squared I intended 4th root of mean of fourth
powers, or log of mean of exponentials. All arithmetic means. But I see now
that these are too extreme (essentially the same as Max Abs). Can you do a
power law curve-fit to your HE minima for say 2:3 and 4:5.

>> Consider the relative rates of beating of the dyads in a chord. [...] I
suppose we could say that since
>> this is the component that is important
>> for the more complex ratios
>
>No -- I would say the opposite. If it weren't for beating/roughness, the
tolerance for the simpler ratios
>would be quite wide.

Yes, the roughness of approximations to complex intervals has little to do
with their audible beats. And you are correct.

I propose the following weighting formula, given a (non octave equivalent)
ratio a:b

Max( 6/Max(a,b), (a*b)/30) )

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

🔗Brett Barbaro <barbaro@xxxxxxxxx.xxxx>

4/20/1999 1:43:33 AM

Dave Keenan wrote:
>
>Hey Paul E., that was a dirty trick impersonating your room mate for so
>long. :-)

I've e-mailed you from this address before (on weekends) so I figured you'd
know it was me.

>How about changing the "Real Name" field in his mailer when you
>use it and back agin when you're finished. Or just duplicate the mailer
>into another folder and leave it that way.

How do I do either of these things? (I'm using Microsoft Outlook Express.)

>[Me, Dave Keenan]
>>> Another good point, however my objection still stands, albeit with less
>>> extreme examples.
>
>[Paul Erlich]
>>Such as?
>
>OK I guess I'm splitting hairs here, but in the meantone spectrum it's hard
>for me to see why anyone would prefer (as a 5-limit approximation) the RMS
>optimum to the Max Abs optimum, or even the last one shown below.
>
> 2:3 4:5 5:6
>---------------
>-5.8 -1.7 -4.1 RMS opt
>-5.4 0.0 -5.4 Max Abs opt (1/4 comma)
>-5.2 0.6 -5.8 the other side of 1/4 comma with same max abs as RMS opt

The only reason no one would prefer it is because they're all so similar.

>
>But maybe that's really a problem with equal weighting. Weighting the fifth
>more strongly would have the same effect.

Oh yeah, that's another reason.

>>Actually, the Plomp-with-harmonic-overtones dissonance curves I've seen
>>_are_ V-shaped around the simple
>>ratios. Don't you have spreadsheets on you webpage to produce these
>>curves? (I tried downloading them but my
>>version of Excel didn't recognize them.)
>
>Yes, you're right, they are discontinuous in the derivative.
>
>I found that the reciprocal of the whole-number-limit is a crude
>approximation of the absolute value of the slope near the bottom of the
>notch. This justifies tolerances for low complexity ratios in proportion to
>their whole-number-limit. Weights are inversely proportional to tolerances.
>
>
>> So I'm thinking maybe they are 4th power curves
>> or 6th power (or any positive power (greater than 2) of the absolute
>> deviation)
>
>These curves are too flat -- having a zero second derivative,
>
>Huh? Don't all these (power and exponential) curves have a zero second
>derivative for x = 0. None are zero everywhere.

A parabola or a Gaussian have a finite second derivative for x=0.

>
>they look much more like a mesa than anything
>in the HE curves.
>
>Ok.
>
>>> or maybe they are the exponential of the absolute deviation
>>> exp(|x|)
>>
>>That's pointy and would suggest something like MAD.
>>
>>> or inverse Gaussian exp(x^2).
>>
>>In my paper (http://www-math.cudenver.edu/~jstarret/22ALL.pdf), accuracy
>is in fact calculated using a
>>Gaussian for each interval, and using the geometric mean of the accuracies
>so that even one really bad
>>interval makes the whole tuning look bad (a quality that you express a
>desire for above). That turns out to
>>be related monotonically to straight RMS, so results in the same solutions
>for optimization problems as RMS.
>
>Of course it does. But I wasn't talking about taking their _geometric_
>mean. Analogous to Root-Mean-Squared I intended 4th root of mean of fourth
>powers, or log of mean of exponentials. All arithmetic means.

I know, but don't you agree that geometric mean satisfies the criteria that
you yourself deemed important?

>But I see now
>that these are too extreme (essentially the same as Max Abs). Can you do a
>power law curve-fit to your HE minima for say 2:3 and 4:5.

I think a Gaussian fits them wonderfully, almost by definition. Maybe I'll
try some numerics sometime.

>>> Consider the relative rates of beating of the dyads in a chord. [...] I
>suppose we could say that since
>>> this is the component that is important
>>> for the more complex ratios
>>
>>No -- I would say the opposite. If it weren't for beating/roughness, the
>tolerance for the simpler ratios
>>would be quite wide.
>
>Yes, the roughness of approximations to complex intervals has little to do
>with their audible beats. And you are correct.
>
>I propose the following weighting formula, given a (non octave equivalent)
>ratio a:b
>
>Max( 6/Max(a,b), (a*b)/30) )

Interesting . . .

>The error weighting function:
>
>Error_weight(a:b) = Max( 6/Max(a,b), (a*b)/30) ), when a:b in lowest terms,
>
>predicts approximately the same level of tolerance for each of the
>following errors:
>
>Intvl Error (cents)
>1:1 3
>1:2 6
>2:3 9 (10c considered a wolf)
>4:5 15 (14c in 12-tET)
>5:6 18 (16c in 12-tET)
>4:7 19
>5:7 15 (17.5c in 12-tET and 22-tET
>6:7 13
>4:9 15
>5:9 12
>7:9 9

7:9 seems to have more leeway on the sharp side that on the flat side (even
ignoring the "stretching" that seems to be preferred for all intervals).

>4:11 12
>5:11 10
>6:11 8
>7:11 7
>9:11 5
>
>Anyone want to object to these or tweak the numbers a bit? Note that we are
>only looking for a crude rule of thumb. Anything that we can even roughly
>agree on will be an improvement over equal-weighting, or those two opposing
>schemes.
>
>Propose your own list of intervals and errors if you wish. e.g. If 10 cents
>from a 2:3 is a borderline wolf fifth, how many cents error makes an
>equally "wolfy" major third, minor third, etc. or an equally useful/useless
>(because of indistinguishability from other nearby ratios) 7:9, 6:11, etc.

It would be good to get diverse opinions on these questions.
>
>How much difference is there (in _relative_ weighting of errors) when we
>consider the intervals standing alone as opposed to standing in chords?

All the arguments we've used so far apply to intervals standing alone. I
think some intervals that would be "wolfy" on their own sound fine when
hidden in chords. I've discussed harmonic entropy reasons for this; there
may be others.

>I've been assuming that the intervals occur most often in subsets of the
>hexad 4:5:6:7:9:11, since it's in the most consonant chords that we are
>most concerned about the consonance of the intervals.

Come again?

🔗Paul H. Erlich <PErlich@Acadian-Asset.com>

4/21/1999 1:52:06 PM

Dave Keenan wrote,

>>I've been assuming that the intervals occur most often in subsets of the
>>hexad 4:5:6:7:9:11, since it's in the most consonant chords that we are
>>most concerned about the consonance of the intervals.

I wrote,

>Come again?

In the light of day your sentence suddenly makes sense to me. But again, all
our considerations have assumed that the intervals are played alone. The
context of chords like this hexad will tend to increase the tolerance of
each interval (which is why I think, for example, that the poor 7:5 of
22-tET doesn't imply poor 4:5:6:7s). For example, an 11:9 is very hard to
comprehend on its own because there are so many nearby ratios, so you had
better tune it accurately, but in the context of 4:5:6:7:9:11, each of the
notes of the 11:9 has quite a bit of leeway in tuning because their function
as the 9th harmonic and 11th harmonic is unmistakable. For some reason, this
is true of the lowest identities as well, where roughness, not tonalness, is
the operative constraint on tuning -- some of the fifths on my off-meantone
piano are yucky on their own, but complete the triad and they sound fine.

🔗Dave Keenan <d.keenan@uq.net.au>

4/21/1999 7:27:21 PM

[Paul Erlich wrote:]
>I've e-mailed you from this address before (on weekends) so I figured you'd
>know it was me.

I thought so at first. But then when you didn't say anything I started to
wonder. What clinched it was when "Brett" misused the term "wolf". _That_
couldn't have been Erlich. :-)

>>How about changing the "Real Name" field in his mailer when you
>>use it and back agin when you're finished. Or just duplicate the mailer
>>into another folder and leave it that way.
>
>How do I do either of these things? (I'm using Microsoft Outlook
>Express.)

It took me a long time to find it (I use Eudora). See the menu:
Tools/Accounts/Mail/Properties. I'm not sure if the duplication thing will
work with Outlook. But the idea is to find the folder that Outlook is in,
and duplicate the whole folder. Then rename the new copy of the Outlook
application to "Paul's Outlook", and/or make a shortcut to it with that
name and put it on the desktop.

>>Huh? Don't all these (power and exponential) curves have a zero second
>>derivative for x = 0. None are zero everywhere.
>
>A parabola or a Gaussian have a finite second derivative for x=0.

Yes, sorry. For some reason I was reading and writing _second_ derivative
but thinking _first_. You mean "finite and non-zero" whereas the V shape
has an infinite second derivative at x=0 and the other powers have zero.
Exponential also has a finite non-zero second derivative at x=0. Why is
this important?

>I know, but don't you agree that geometric mean satisfies the criteria
>that you yourself deemed important?

Not at all. Geometric mean alone, is equivalent to exponential of mean of
logs. This goes in the _opposite_ direction to what I intended, and is why
it _undoes_ the effect of applying the exp(x^2) before taking the mean. I
mistakenly called exp(x^2) "inverse Gaussian" earlier, I should have
written "reciprocal Gaussian".

>I think a Gaussian fits them wonderfully, almost by definition. Maybe
>I'll try some numerics sometime.

You mean a reciprocal Gaussian. So why not use

sqrt(log(arith_mean(exp(sq(x)))))?

[def sq(x) = x^2]

This behaves like Max-Abs when errors are very different and like RMS when
errors are similar. A beautiful blending I should think. We just need to
agree on the log base. I expect it will be something like 1.01. But this
must be determined in conjunction with the weights we end up using (their
absolute, as opposed to relative, values). Here's where curve fits on some
HE minima would give use a useful (if second-hand) justification. Do they
actually imply different weights at all, or are they all just the same
reciprocal Gaussian at bottom?

It is interesting (but irrelevant I think) that a slight rearrangement
leads to

log(sqrt(arith_mean(sq(exp(x)))))

which is proportional to the log of the RMS _frequency_ deviation.

>7:9 seems to have more leeway on the sharp side that on the flat side (even
>ignoring the "stretching" that seems to be preferred for all intervals).

Yes, there are others like that too (maybe even in the opposite
direction?). But I figure that's getting into too fine detail and we can
just use the mean of the sharp and flat tolerances. I assume you agree that
stretch, if it's applied at all, should be applied _after_ the
otherwise-optimum tuning is found, so it need not affect our weights.

>>If 10 cents
>>from a 2:3 is a borderline wolf fifth, how many cents error makes an
>>equally "wolfy" major third, minor third, etc. or an equally useful/useless
>>(because of indistinguishability from other nearby ratios) 7:9, 6:11, etc.
>
>It would be good to get diverse opinions on these questions.

Ok folks. Start sending 'em in.

>All the arguments we've used so far apply to intervals standing alone. I
>think some intervals that would be "wolfy" on their own sound fine when
>hidden in chords. I've discussed harmonic entropy reasons for this; there
>may be others.

Yes indeed. But my question was, how does this affect the _relative_
weighting of the intervals. Can we assume that putting them in chords
affects them all roughly equally, so that, for example, the error in the
fifth remains roughly 5/3 times as important as the error in the major third.

>>I've been assuming that the intervals occur most often in subsets of the
>>hexad 4:5:6:7:9:11, since it's in the most consonant chords that we are
>>most concerned about the consonance of the intervals.
>
>Come again?

Try: "... since it's in the most consonant chords that we are most
concerned about the _errors_ in the intervals." When designing octave-based
tunings one must consider which inversion of each interval to optimise the
tuning for. For example I would choose to base the weighting on 4:7 rather
than 7:8 (or 2:7) because 4:7 occurs in 4:5:6:7:9:11. For the same reason I
would weight for 6:7 rather than 3:7.

This is fun!

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

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

4/22/1999 1:38:31 PM

>Yes, sorry. For some reason I was reading and writing _second_ derivative
>but thinking _first_. You mean "finite and non-zero" whereas the V shape
>has an infinite second derivative at x=0 and the other powers have zero.
>Exponential also has a finite non-zero second derivative at x=0.

But exponential doesn't have a zero first derivative at x=0.

>Why is
>this important?

Because you're trying to match the character of the dissonance curve near
the simple ratios.

>>I know, but don't you agree that geometric mean satisfies the criteria
>>that you yourself deemed important?

>Not at all. Geometric mean alone, is equivalent to exponential of mean of
>logs. This goes in the _opposite_ direction to what I intended, and is why
>it _undoes_ the effect of applying the exp(x^2) before taking the mean. I
>mistakenly called exp(x^2) "inverse Gaussian" earlier, I should have
>written "reciprocal Gaussian".

Yes, but in the context of my accuracy values, computed using a normal
Gaussian, it goes in the _same_ direction as what you intended. This is
because accuracy has a maximum at the just ratio, while these other
functions have a minimum.

>>I think a Gaussian fits them wonderfully, almost by definition. Maybe
>>I'll try some numerics sometime.

>You mean a reciprocal Gaussian.

No I don't! As I said, the reciprocal Gaussian is too flat.

>log(sqrt(arith_mean(sq(exp(x)))))

>which is proportional to the log of the RMS _frequency_ deviation.

That can't be exactly right.

>>7:9 seems to have more leeway on the sharp side that on the flat side
(even
>>ignoring the "stretching" that seems to be preferred for all intervals).

>Yes, there are others like that too (maybe even in the opposite
>direction?). But I figure that's getting into too fine detail and we can
>just use the mean of the sharp and flat tolerances.

I don't know about that.

>I assume you agree that
>stretch, if it's applied at all, should be applied _after_ the
>otherwise-optimum tuning is found, so it need not affect our weights.

That I agree with.

>Yes indeed. But my question was, how does this affect the _relative_
>weighting of the intervals. Can we assume that putting them in chords
>affects them all roughly equally, so that, for example, the error in the
>fifth remains roughly 5/3 times as important as the error in the major
third.

We can't assume anything.

>Try: "... since it's in the most consonant chords that we are most
>concerned about the _errors_ in the intervals." When designing octave-based
>tunings one must consider which inversion of each interval to optimise the
>tuning for. For example I would choose to base the weighting on 4:7 rather
>than 7:8 (or 2:7) because 4:7 occurs in 4:5:6:7:9:11. For the same reason I
>would weight for 6:7 rather than 3:7.

I wouldn't want to compromise the tuning of the 7:8 or the 3:7 because
tuning them right may be even more important in the chords in which they
appear, than tuning 4:7 and 6:7 right is important in 4:5:6:7:9:11. The
latter is pretty clear and so can withstand quite a bit of distortion.

🔗monz@xxxx.xxx

4/22/1999 10:38:33 AM

[Paul Erlich:]
> The context of chords like this hexad will tend to increase
> the tolerance of each interval ...<snip>...
> For some reason, this is true of the lowest identities as well,
> where roughness, not tonalness, is the operative constraint
> on tuning -- some of the fifths on my off-meantone piano
> are yucky on their own, but complete the triad and they sound
> fine.

I'm confused now - isn't it tonalness that causes this effect?
I mean, isn't it because of tonalness that notes which
sound dissonant in dyads 'sound fine' when in the context
of a triad?

Joseph L. Monzo....................monz@juno.com
http://www.ixpres.com/interval/monzo/homepage.html
|"...I had broken thru the lattice barrier..."|
| - Erv Wilson |
--------------------------------------------------

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

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

4/23/1999 12:00:39 PM

I wrote,

>> The context of chords like this hexad will tend to increase
>> the tolerance of each interval ...<snip>...
>> For some reason, this is true of the lowest identities as well,
>> where roughness, not tonalness, is the operative constraint
>> on tuning -- some of the fifths on my off-meantone piano
>> are yucky on their own, but complete the triad and they sound
>> fine.

Joe Monzo wrote,

>I'm confused now - isn't it tonalness that causes this effect?
>I mean, isn't it because of tonalness that notes which
>sound dissonant in dyads 'sound fine' when in the context
>of a triad?

That's true in the context of higher-limit intervals and chords -- for
example, the rather dissonant dyad 11:9 'sounds fine' in the context of
4:5:6:7:9:11 because of tonalness. But what Dave Keenan and I seem to have
come to is that for simple intervals like the fifth, roughness is a much
more stringent constraint than tonalness. In other words, while a fifth of
720 cents has virtually no chance of being interpreted as any ratio other
than 3/2, and so its tonalness is strong, with most timbres the roughness is
too much to bear. Now adding a major third above the root (at, say, 400
cents) makes for a pretty nice triad (in fact, it's that of 15-tET); the
dissonance of the fifth is alleviated somewhat. But since the tonalness of
the fifth was strong to begin with, and it was only its roughness that made
it unacceptable, the good sound of the triad poses a bit of a puzzle.
Perhaps it's the average roughness per interval, rather than the total
roughness, that better represents that component of dissonance. What do you
think, Bill Sethares?

🔗Carl Lumma <clumma@xxx.xxxx>

4/23/1999 10:28:54 PM

>But since the tonalness of the fifth was strong to begin with, and it was
only >its roughness that made it unacceptable, the good sound of the triad
poses a >bit of a puzzle. Perhaps it's the average roughness per interval,
rather than >the total roughness, that better represents that component of
dissonance. What >do you think, Bill Sethares?

I think my one just interval observation can explain this.

-C.

🔗Brett Barbaro <barbaro@xxxxxxxxx.xxxx>

4/23/1999 4:41:31 PM

I wrote:

> >But since the tonalness of the fifth was strong to begin with, and it was
> only >its roughness that made it unacceptable, the good sound of the triad
> poses a >bit of a puzzle. Perhaps it's the average roughness per interval,
> rather than >the total roughness, that better represents that component of
> dissonance. What >do you think, Bill Sethares?

Carl Lumma wrote:

> I think my one just interval observation can explain this.

So you consider 320 cents a just interval? And what was that observation again?

🔗Carl Lumma <clumma@xxx.xxxx>

4/25/1999 3:36:06 PM

>>I think my one just interval observation can explain this.
>
>So you consider 320 cents a just interval? And what was that observation
>again?

No, but it may be close enough to help the triad by the effect I mention...

I find RMS to be good enough conceptually and empirically for most
purposes. Can you site a counter-example, Dave?

The only thing I noticed is: The distribution of (the same RMS) error
across a chord can change the sound of the chord.

In particular, it may be better, when the RMS error is in a certain range,
to keep one or more interval just and heap all the error onto the other(s)
than to spread the error out. I haven't had time to test this, but it
could make sense -- the just interval(s) help lock down the periodicity of
the chord.

For 5-limit triads, I think all 3 intervals can be weighted equally in this
context. Larger chords get tricky because of the more complex interval
relationships -- 7/5 should not be as important as 7:4 in the otonal
tetrad, for example.

There is also the question of what range the RMS error has to be in for
this to work...

-C.

🔗Dave Keenan <d.keenan@xx.xxx.xxx>

4/26/1999 8:41:05 AM

Carl Lumma <clumma@nni.com>:

>I find RMS to be good enough conceptually and empirically for most
>purposes. Can you site a counter-example, Dave?

No. It's good enough. Weighting the fifths at about 5/3 times the thirds
makes me happy enough with RMS.

I won't be responding to the list much for the next week or so.

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

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

4/26/1999 3:01:11 PM

Carl Lumma wrote,

>>>I think my one just interval observation can explain this.

I wrote,

>>So you consider 320 cents a just interval? And what was that observation
>>again?

Carl replied,

>No, but it may be close enough to help the triad by the effect I mention...

>I find RMS to be good enough conceptually and empirically for most
>purposes. Can you site a counter-example, Dave?

Carl, you seem to be contradicting yourself. If the 6:5 being within 5 cents
of just intonation is so important, then it seems not RMS but MAD or some
weighting that puts more emphasis on the smaller errors would be more
appropriate. Compare the 15-tET major triad with one whose pitches are 0 395
720. Which one has lower RMS error? Which one has a
close-enough-just-interval?

>In particular, it may be better, when the RMS error is in a certain range,
>to keep one or more interval just and heap all the error onto the other(s)
>than to spread the error out. I haven't had time to test this, but it
>could make sense -- the just interval(s) help lock down the periodicity of
>the chord.

OK, but then you have no reason to stick to RMS error.

>For 5-limit triads, I think all 3 intervals can be weighted equally in this
>context. Larger chords get tricky because of the more complex interval
>relationships -- 7/5 should not be as important as 7:4 in the otonal
>tetrad, for example.

Why is it that 6:5 can lock down the periodicity but 7:5 can't?