back to list

Scalar complexity of tempered intervals

🔗Graham Breed <gbreed@gmail.com>

10/29/2010 6:03:38 AM

Say you have a temperament with a mapping M. Its scalar
complexity is the determinant of M~*W*W*M in GP terms,
where W is the matrix for Tenney weighting, M has vals as
columns, and M~ has vals as rows. You can then define an
equal temperament mapping in the temperament by X, so that
the val is M*X. The scalar complexity of that mapping is
(M*X)~*W*W*M*X = X~*M~*W*W*M*X.

The middle part, M~*W*W*M, is an r by r matrix for a rank r
temperament. You can call it an operator for scalar
complexity. It defines an inner product on tempered
intervals that gives identical results to scalar complexity.

So the question is, can we do the same thing to find the
scalar complexity of an interval in the temperament. We
know that intervals are dual to vals. Generally, dual
quadratic forms are related by the inverses of there
operator matrices. (This is something Gene mentioned on
the list a long time ago.) So you'd expect the scalar
complexity of an interval in the temperament to be

interval * inverse(M~*W*W*M) * interval

I showed in other messages that this is identical to Gene's
badness using a projection matrix of vals. So, what Gene's
badness is equivalent to the scalar complexity of tempered
intervals.

Of course, Gene doesn't like the term, so we won't call it
that. I'll suggest Tenney-Euclidean complexity, or
TE-complexity. We can then replace TOP-RMS error with the
TE error of a temperament class, and scalar badness with
simple TE badness. The net result would be a reduction in
terminology, so maybe it's a winner.

Graham

🔗genewardsmith <genewardsmith@sbcglobal.net>

10/29/2010 11:49:09 AM

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

> Of course, Gene doesn't like the term, so we won't call it
> that. I'll suggest Tenney-Euclidean complexity, or
> TE-complexity. We can then replace TOP-RMS error with the
> TE error of a temperament class, and scalar badness with
> simple TE badness. The net result would be a reduction in
> terminology, so maybe it's a winner.

Wow, terminology I like! I hope you have no objection to me sticking it on the Xenwiki, though I still wonder why you don't like "relative error".

🔗Graham Breed <gbreed@gmail.com>

10/29/2010 11:53:32 AM

"genewardsmith" <genewardsmith@sbcglobal.net> wrote:

> Wow, terminology I like! I hope you have no objection to
> me sticking it on the Xenwiki, though I still wonder why
> you don't like "relative error".

I don't object to "relative error" and I wasn't aware of
the term when I started talking about "simple badness" or
whatever. It is useful to think of it as a limiting case
of Cangwu badness, though.

I remember you coming up with a similar formula, using
wedgies, and not understanding it because you called it a
kind of error.

Graham

🔗Mike Battaglia <battaglia01@gmail.com>

11/2/2010 12:30:36 PM

On Fri, Oct 29, 2010 at 9:03 AM, Graham Breed <gbreed@gmail.com> wrote:
>
> Of course, Gene doesn't like the term, so we won't call it
> that. I'll suggest Tenney-Euclidean complexity, or
> TE-complexity. We can then replace TOP-RMS error with the
> TE error of a temperament class, and scalar badness with
> simple TE badness. The net result would be a reduction in
> terminology, so maybe it's a winner.

This seems like a good start for a psychoacoustic dissonance model
that I'm building. I'm looking for a decent spreading function to
distribute the complexity of a dyad outward in dyad space. I'm a bit
confused here as to the math here though, how would the complexity
change as an interval is tempered? For example, let's say that you
start with 3/2, and let's say it's not tempered at all.

Now let's temper it, and plot the error of this interval (e) vs its
resultant TE-complexity (c):
- At e=0, I assume that c would be equal to sqrt(3*2).
- What happens as e tends to negative infinity?
- What happens as it tends towards positive infinity?
- What "shape" does it trace out between e=-inf and e=inf? I assume
the global minimum would be sqrt(3*2).
- Will the shape look the same for every dyad, but be shifted up and
down so that the global minimum changes? e.g., if we're saying the
TE-complexity function is c(d,e), where d is the rational dyad and e
is the error -- is c(5/4,e) = c(3/2,e) - sqrt(3*2) + sqrt(5*4)?

-Mike

🔗genewardsmith <genewardsmith@sbcglobal.net>

11/2/2010 4:38:38 PM

--- In tuning-math@yahoogroups.com, Mike Battaglia <battaglia01@...> wrote:

> Now let's temper it, and plot the error of this interval (e) vs its
> resultant TE-complexity (c):
> - At e=0, I assume that c would be equal to sqrt(3*2).
> - What happens as e tends to negative infinity?
> - What happens as it tends towards positive infinity?

I don't know how to answer this question because I don't know what you mean by negative error or how error is a function of complexity.

🔗Graham Breed <gbreed@gmail.com>

11/3/2010 1:23:11 AM

On 2 November 2010 23:30, Mike Battaglia <battaglia01@gmail.com> wrote:
> On Fri, Oct 29, 2010 at 9:03 AM, Graham Breed <gbreed@gmail.com> wrote:
>>
>> Of course, Gene doesn't like the term, so we won't call it
>> that. I'll suggest Tenney-Euclidean complexity, or
>> TE-complexity. We can then replace TOP-RMS error with the
>> TE error of a temperament class, and scalar badness with
>> simple TE badness. The net result would be a reduction in
>> terminology, so maybe it's a winner.
>
> This seems like a good start for a psychoacoustic dissonance model
> that I'm building. I'm looking for a decent spreading function to
> distribute the complexity of a dyad outward in dyad space. I'm a bit
> confused here as to the math here though, how would the complexity
> change as an interval is tempered? For example, let's say that you
> start with 3/2, and let's say it's not tempered at all.

The tuning isn't a parameter in the complexity function. The optimal
TE (TOP-RMS) error is probably implied somewhere. But it looks like
interval sizes are there in the defining matrix (Gram matrix or
whatever) that I call a metric. You can approximate it by taking some
near-orthogonal intervals (maybe the Hermite basis, or Gene's
permutation of it, but ideally the TLLL (Tenney-weighted LLL-reduced)
basis) and setting the diagonals of the metric to whatever function of
their sizes matches the inverse of the mapping-space metric. Then you
can see what happens by plugging in numbers.

> Now let's temper it, and plot the error of this interval (e) vs its
> resultant TE-complexity (c):
> - At e=0, I assume that c would be equal to sqrt(3*2).

Only if it's one of the orthogonal intervals. Maybe 3:1 would be
log(sqrt(3)). You need the log (the base is arbitrary).

With untempered TE complexity, the error of 3:2 will be roughly
log(3*2). But not quite, because this is a Euclidean space. It'll
actually be sqrt(log(3)**2 + log(2)**2) where **2 is "squared".

> - What happens as e tends to negative infinity?

Error can't be negative. Deviation can. What would happen is that
the function becomes meaningless. You'll have to look at it.

> - What happens as it tends towards positive infinity?

Probably the same as negative infinity, because the sign disappears
when you calculate the error from the deviation.

> - What "shape" does it trace out between e=-inf and e=inf? I assume
> the global minimum would be sqrt(3*2).

Don't know.

> - Will the shape look the same for every dyad, but be shifted up and
> down so that the global minimum changes? e.g., if we're saying the
> TE-complexity function is c(d,e), where d is the rational dyad and e
> is the error -- is c(5/4,e) = c(3/2,e) - sqrt(3*2) + sqrt(5*4)?

No. You'll have to look at the actual algebra. Download Pari/GP if
you want to use my functions.

Graham

🔗Mike Battaglia <battaglia01@gmail.com>

11/3/2010 9:52:22 PM

On Tue, Nov 2, 2010 at 7:38 PM, genewardsmith
<genewardsmith@sbcglobal.net> wrote:
>
> --- In tuning-math@yahoogroups.com, Mike Battaglia <battaglia01@...> wrote:
>
> > Now let's temper it, and plot the error of this interval (e) vs its
> > resultant TE-complexity (c):
> > - At e=0, I assume that c would be equal to sqrt(3*2).
> > - What happens as e tends to negative infinity?
> > - What happens as it tends towards positive infinity?
>
> I don't know how to answer this question because I don't know what you mean by negative error

Sorry, I meant deviation.

> or how error is a function of complexity.

In my example the complexity of a tempered interval is a function of
its error. e.g., I thought Graham was saying that as an interval is
tempered more, its complexity goes up. Am I misunderstanding?

-Mike

🔗Mike Battaglia <battaglia01@gmail.com>

11/3/2010 9:59:35 PM

On Wed, Nov 3, 2010 at 4:23 AM, Graham Breed <gbreed@gmail.com> wrote:
>
> The tuning isn't a parameter in the complexity function. The optimal
> TE (TOP-RMS) error is probably implied somewhere. But it looks like
> interval sizes are there in the defining matrix (Gram matrix or
> whatever) that I call a metric. You can approximate it by taking some
> near-orthogonal intervals (maybe the Hermite basis, or Gene's
> permutation of it, but ideally the TLLL (Tenney-weighted LLL-reduced)
> basis) and setting the diagonals of the metric to whatever function of
> their sizes matches the inverse of the mapping-space metric. Then you
> can see what happens by plugging in numbers.

This is so far over my head that I'm completely lost. I'm going to
have start back at square 1.

> > Now let's temper it, and plot the error of this interval (e) vs its
> > resultant TE-complexity (c):
> > - At e=0, I assume that c would be equal to sqrt(3*2).
>
> Only if it's one of the orthogonal intervals. Maybe 3:1 would be
> log(sqrt(3)). You need the log (the base is arbitrary).

I remember at one point I knew why log was involved. I'll take your
word for it now.

> With untempered TE complexity, the error of 3:2 will be roughly
> log(3*2). But not quite, because this is a Euclidean space. It'll
> actually be sqrt(log(3)**2 + log(2)**2) where **2 is "squared".

OK, this I get.

> Error can't be negative. Deviation can. What would happen is that
> the function becomes meaningless. You'll have to look at it.

I think I had your idea wrong. The math is a bit over my head so I'm
trying to understand it conceptually first. Let's say you're in
quarter comma meantone without any tempered octaves or anything.

-Does the complexity of 5/4 change vs if you're in JI?
-Does the complexity of 81/64 go up (because of the added error) or
down (because it turns into 5/4) in this system?

> Probably the same as negative infinity, because the sign disappears
> when you calculate the error from the deviation.

I figured as much.

-Mike

🔗Graham Breed <gbreed@gmail.com>

11/4/2010 3:17:38 AM

Mike Battaglia <battaglia01@gmail.com> wrote:
> On Wed, Nov 3, 2010 at 4:23 AM, Graham Breed
> <gbreed@gmail.com> wrote:

> > Only if it's one of the orthogonal intervals. Maybe 3:1
> > would be log(sqrt(3)). You need the log (the base is
> > arbitrary).
>
> I remember at one point I knew why log was involved. I'll
> take your word for it now.

Logarithms are involved because we have to add
intervals. 3:2 is 3:1 plus 1:2 or 3:1 minus 2:1.

Coincidentally (or otherwise) the logarithm of a prime
number happens to be proportional to its size in cents. So
what TE complexity (formally scalar complexity) is doing is
weighting each prime interval by its size. You can then
generalize that to non just intonations.

The prime numbered harmonics are special in a circular
sense, because they have irreducable complexity. In
algebraic terms, it means their orthogonal. If you ask for
a set of orthogonal intervals given the TE complexity norm,
you should find the prime intervals come out.

What seems to be happening with temperamental TE complexity
is that an impossible set of basic intervals are chosen,
and their complexity still depends on their size. So the
complexity does depend on the tuning. These basic
intervals are orthogonal according to temperamental TE
complexity. Weighting according to the sizes of
near-orthogonal intervals will give approximately the same
results. For a rank 2 temperament, the period and
generator are approximately orthogonal, so they're likely
to work well. But a better way of finding near-orthogonal
vals is to run a Tenney-weighted LLL reduction,
because that's specifically designed to give short,
near-orthogonal vectors. LLL reduction is possible in
an untempered TE complexity lattice.

> > Error can't be negative. Deviation can. What would
> > happen is that the function becomes meaningless. You'll
> > have to look at it.
>
> I think I had your idea wrong. The math is a bit over my
> head so I'm trying to understand it conceptually first.
> Let's say you're in quarter comma meantone without any
> tempered octaves or anything.

5-limit meantone is a good place to start. I'll define it
as

[<31, 49, 72], < 12, 19, 28]>

The TLLL-reduced basis happens to be

[<1, 1, 0], <0, 1, 4]>

I got it using the GP code I posted here recently. It
happens to also be a generator-period mapping. The
generator is a perfect fifth here: one octave and one
generator add up to a 3:1, and the generator is four equal
divisions of the 5:1.

The operator for temperamental complexity of intervals in
this temperament happens to be, roughly

( 0.247 -0.029)
(-0.029 0.102)

This means, if we define an interval [x, y> of x octaves
and y fifths, its complexity will be the square root of
0.247*x^2 + 0.102*y^2 - 2*0.029*x*y where ^2 is "squared".

The off-diagonal terms are much smaller than the diagonal
ones, which shows you that the basis is roughly
orthogonal. You could set the off-diagonals to zero and it
wouldn't affect the result much.

Complexities of temperaments of ratios using this metric:

2:1 0.497
3:2 0.320
4:3 0.638
5:4 1.759
9:8 0.879
6:5 0.960

The complexity of interval [1, 0>, the octave, is
sqrt(0.247) or 0.497. The complexity of interval [0, 1>,
the fifth, is sqrt(0.102) or 0.320 (rounded from the true
value). The important thing is the ratio of one to the
other, so a fifth is worth 0.320/0.497 = 0.644 octaves.

For 1/4-comma meantone, the fifth is 0.580 octaves. You
wouldn't take the calculation above as a way of setting the
tuning, but it still gives roughly the same complexity as
an operator of

(1 0 )
(0 0.580)

> -Does the complexity of 5/4 change vs if you're in JI?

It's radically different, because it has to be calculated
as a combination of fifths and octaves instead of 5:1
intervals and octaves.

With the 1/4-comma metric above, 5:1 has a complexity of
4*0.580. To get 5:4, you subtract two octaves, which means
adding the complexity of two octaves. So 4*0.580 + 2 or
4.322 times the complexity of an octave. The true
temperamental TE complexity is 3.541 times that of the
octave.

> -Does the complexity of 81/64 go up (because of the added
> error) or down (because it turns into 5/4) in this system?

Go up compared to what? It'll have a complexity of 12.229
octaves in JI. In meantone, its complexity is the same as
that of a 5:4.

Graham