back to list

Worst equal temperaments

🔗Graham Breed <gbreed@gmail.com>

5/13/2005 1:24:13 PM

Following a discussion on MakeMicroMusic, I've been looking for equal
temperaments with poor approximations to just intonation. There are
two details that might not be obvious:

1) You have to ignore consistency. We aren't interested in chords,
but that no intervals sound familiar. So you always take the nearest,
even when looking for the RMS.

2) The maximin search has very small peaks. So, my original method
of using a spreadsheet is inadequate because it's likely to miss
peaks, or get unmanageably large.

Here are the worst 20 results for some 5-limit ratios, along with 9:8
and octave equivalents. The first column is the number of steps to a
2:1 octave, the second the step size in cents, and the last column the
smallest weighted error.

8.39 143.0 3.3
10.03 119.7 2.9
8.02 149.6 2.8
10.70 112.2 2.7
13.96 85.9 2.6
8.25 145.4 2.6
12.97 92.5 2.5
8.64 138.8 2.5
9.97 120.3 2.5
9.02 133.0 2.4
13.03 92.1 2.4
8.69 138.1 2.4
14.03 85.5 2.2
10.52 114.0 2.2
15.97 75.2 2.0
10.97 109.4 2.0
10.48 114.5 1.9
16.47 72.9 1.9
8.98 133.6 1.9
10.75 111.7 1.9

Here are the results with 7:4 and octave equivalents added

8.39 143.0 3.3
8.02 149.6 2.8
13.96 85.9 2.6
8.25 145.4 2.6
12.97 92.5 2.5
9.02 133.0 2.4
13.03 92.1 2.4
14.03 85.5 2.2
10.04 119.6 2.1
10.97 109.4 2.0
16.47 72.9 1.9
8.98 133.6 1.9
10.75 111.7 1.9
16.53 72.6 1.9
10.71 112.1 1.8
11.02 108.9 1.8
10.17 117.9 1.8
10.47 114.6 1.8
10.08 119.1 1.8
9.12 131.6 1.7

Finally, here's the Python code I used, with comments so that you
should be able to reconstruct the indentation if it gets corrupted.
Usually "View Source" gets round this.

import math

def prodpeaks(ratios, min, max, step=0.001):
weighted = prodweight(ratios)
def errorfn(x):
return besterror(x, weighted)
return peaks(errorfn, min, max, step)

def peaks(fn, min, max, inc):
prev = fn(min-inc)
curr = fn(min)
result = []
x = min
while x <= max:
next = fn(x+inc)
if curr>prev and curr>next:
result.append((fn(x), x))
#endif
x += inc
prev = curr
curr = next
#endloop
result.sort()
result.reverse()
return result

def besterror(edo, ratios):
return min([
errorweight(ratio, weight, edo)
for (ratio, weight) in ratios])

def errorweight(ratio, weight, edo):
nearest = math.floor(edo*ratio+0.5)
error = math.fabs(nearest/edo - ratio)
return error/weight

def prodweight(ratiolist):
result = []
log2 = math.log(2)
for n, d in ratiolist:
nlog = math.log(n)/log2
dlog = math.log(d)/log2
result.append((nlog-dlog, nlog+dlog))
#endloop
return result

if __name__=='__main__':
ratios = [(9,8), (3, 2), (4,3), (5,4), (8,5), (6,5), (5,3),
(2,1), (9,4), (5,2), (8,3), (3,1), (4,1),
(9,2), (5,1), (6,1), (8,1), (9,1)]
#7-limit bonus
ratios += [(7,4), (7,2), (7,1)]
for error, edo in prodpeaks(ratios, 8, 19)[:20]:
print "%5.2f %5.1f %3.1f" % (edo, 12e2/edo, error*1000)

🔗Carl Lumma <ekin@lumma.org>

5/13/2005 2:51:07 PM

>Following a discussion on MakeMicroMusic, I've been looking
>for equal temperaments with poor approximations to just
>intonation.

If we want to make it so things stay bad despite modulation,
equal-step does seem to be the way to go (also it presumably
makes guitar fretting easier, and the original thread
pertained to guitar).

Next I thought one ought to weight the errors according to
which consonances they miss -- bad octaves should be more
important than bad fifths, for example. I'm not sure how
you selected your targets, Graham, but using a filter that
assumes octave equivalence (like odd- or prime-limit) seems
like a mistake.

The obvious way to get the weightings and the right targets
at the same time seems to be to use harmonic entropy. Choose
s and an region of the log-frequency line instead of an
odd- or prime-limit.

Represent equal-step scales as comb filters taking one
parameter, A, the step size. Then, for all A 10 < A < 200,
plot the intergral of each scale over the harmonic entropy
curve. Start with A to the nearest half-cent, maybe, and
zoom in on the peaks if necessary.

-Carl

🔗Graham Breed <gbreed@gmail.com>

5/15/2005 2:40:02 AM

> If we want to make it so things stay bad despite modulation,
> equal-step does seem to be the way to go (also it presumably
> makes guitar fretting easier, and the original thread
> pertained to guitar).

Equal temperaments are the easiest scales to do the calculations for.
They also have the smallest number of distinct intervals for a given
number of notes, which makes it less likely that they hit a "good"
interval.

> Next I thought one ought to weight the errors according to
> which consonances they miss -- bad octaves should be more
> important than bad fifths, for example. I'm not sure how
> you selected your targets, Graham, but using a filter that
> assumes octave equivalence (like odd- or prime-limit) seems
> like a mistake.

Yes, I weight them, which I suppose makes sense. The idea is to avoid
familiar consonances, and so if the listener is familiar with the
5-limit, let's avoid the 5-limit. You can easily plug in different
intervals if you prefer.

> The obvious way to get the weightings and the right targets
> at the same time seems to be to use harmonic entropy. Choose
> s and an region of the log-frequency line instead of an
> odd- or prime-limit.

That sounds like a lot of trouble for an obscure problem with little
psychoacoustic backing.

Graham

🔗Carl Lumma <ekin@lumma.org>

5/15/2005 5:39:27 AM

>> If we want to make it so things stay bad despite modulation,
>> equal-step does seem to be the way to go (also it presumably
>> makes guitar fretting easier, and the original thread
>> pertained to guitar).
//
They also have the smallest number of distinct intervals for a given
>number of notes, which makes it less likely that they hit a "good"
>interval.

Yes, that's what I mean by "stay bad despite modulation".

>> Next I thought one ought to weight the errors according to
>> which consonances they miss -- bad octaves should be more
>> important than bad fifths, for example. I'm not sure how
>> you selected your targets, Graham, but using a filter that
>> assumes octave equivalence (like odd- or prime-limit) seems
>> like a mistake.
>
>Yes, I weight them, which I suppose makes sense. The idea is to avoid
>familiar consonances, and so if the listener is familiar with the
>5-limit, let's avoid the 5-limit. You can easily plug in different
>intervals if you prefer.
>
>> The obvious way to get the weightings and the right targets
>> at the same time seems to be to use harmonic entropy. Choose
>> s and an region of the log-frequency line instead of an
>> odd- or prime-limit.
>
>That sounds like a lot of trouble for an obscure problem with little
>psychoacoustic backing.

No trouble at all, if you already have the stuff to calculate
harmonic entropy. I think it's an interesting problem, and some
interesting scales could result. Certainly plenty of effort has
been spent writing atonal/dissonant music.

-Carl

🔗Gene Ward Smith <gwsmith@svpal.org>

5/15/2005 12:47:21 PM

--- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...> wrote:

> That sounds like a lot of trouble for an obscure problem with little
> psychoacoustic backing.

I was thinking of suggesting zeros of the Riemann zeta function
exhibiting Lehmer's phenomenon, meaning finding a pair (they come in
pairs) where the derivatives were also small. How's that for going to
a lot of trouble for an obscure problem with little psychoacoustic
backing?