back to list

Linear Temperaments in the 7-limit

🔗Paul G Hjelmstad <paul.hjelmstad@medtronic.com>

5/31/2005 9:21:39 AM

I know how to find a temperament in 7-limit space from three commas,
and conversely, how to find a comma from three temperaments.

Would someone be so kind as to review getting two commas from two
temperaments in 7-limit space, and conversely, how to get two
temperaments from two known commas? Or just point me to relevant
resources. I know it involves wedgies, mappings etc. Just need to get
my thoughts in order. Thanks

Paul Hj

🔗Gene Ward Smith <gwsmith@svpal.org>

5/31/2005 9:15:18 PM

--- In tuning-math@yahoogroups.com, "Paul G Hjelmstad"
<paul.hjelmstad@m...> wrote:

> Would someone be so kind as to review getting two commas from two
> temperaments in 7-limit space, and conversely, how to get two
> temperaments from two known commas? Or just point me to relevant
> resources. I know it involves wedgies, mappings etc. Just need to get
> my thoughts in order. Thanks

It party depends on how you are describing temperaments; this can
involve wedgies, but doesn't have to. When you say you "get" a
temperament, what is it you want to get? What software resources are
available to you?

🔗Paul G Hjelmstad <paul.hjelmstad@medtronic.com>

6/1/2005 6:22:32 AM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul G Hjelmstad"
> <paul.hjelmstad@m...> wrote:
>
> > Would someone be so kind as to review getting two commas from two
> > temperaments in 7-limit space, and conversely, how to get two
> > temperaments from two known commas? Or just point me to relevant
> > resources. I know it involves wedgies, mappings etc. Just need to
get
> > my thoughts in order. Thanks
>
> It party depends on how you are describing temperaments; this can
> involve wedgies, but doesn't have to. When you say you "get" a
> temperament, what is it you want to get? What software resources are
> available to you?

What I would like to do, if possible, is take two commas in 7-limit
space, which I believe act as planes, find their intersection, which
I believe is a line. This line can be described by two temperaments.
(For example, 12&19). Can they be found from the commas? And
conversely, can two commas be found from, say 12&19 in 7-limit space
(Or perhaps there are more meaningful temperaments in 7-limit space)

I am basing this on the ability to take the adjoint of three commas
and find one temperament, or the ability to take the adjoint of three
temperaments and find one commas.

My software at this point is limited to Excel, even though I am
interested in purchasing Mathematica and/or Maple one day. On the
music software side, I have Sibelius 2.0

🔗Graham Breed <gbreed@gmail.com>

6/1/2005 8:24:35 AM

On 6/1/05, Paul G Hjelmstad <paul.hjelmstad@medtronic.com> wrote:

> What I would like to do, if possible, is take two commas in 7-limit
> space, which I believe act as planes, find their intersection, which
> I believe is a line. This line can be described by two temperaments.
> (For example, 12&19). Can they be found from the commas? And
> conversely, can two commas be found from, say 12&19 in 7-limit space
> (Or perhaps there are more meaningful temperaments in 7-limit space)

Your problem is that there isn't a unique solution. Finding the line
you should know -- it comes down to finding the 2-D temperament.

For finding the commas, as well, it can be tricky. Gene has a way of
doing this using LLL reduction, which I don't understand. I remember
a black-box Maple function doing a lot of the work. Another approach
would be to filter out a list of known commas, but that strikes me as
cheating :P

> I am basing this on the ability to take the adjoint of three commas
> and find one temperament, or the ability to take the adjoint of three
> temperaments and find one commas.

That's it, yes. Choose two different chromatic unison vectors, and
you'll get two different equal temperaments (or an error). Any
arbitrary set should do for candidates. Say

25:24
16:25
21:20
22:21
26:25
18:17

and so on for successively higher prime limits. Once you have a pair,
walk the scale tree. You have to check for contorsion as well.

> My software at this point is limited to Excel, even though I am
> interested in purchasing Mathematica and/or Maple one day. On the
> music software side, I have Sibelius 2.0

I've got LLL implemented in Python, so you could upgrade to that at no
cost. It should be a bit easier than Excel to work with where you
want iteration or recursion.

Graham

🔗Paul G Hjelmstad <paul.hjelmstad@medtronic.com>

6/1/2005 10:30:17 AM

--- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...> wrote:
> On 6/1/05, Paul G Hjelmstad <paul.hjelmstad@m...> wrote:
>
>
> Your problem is that there isn't a unique solution. Finding the
line
> you should know -- it comes down to finding the 2-D temperament.

Could you give an example?

>
> > I am basing this on the ability to take the adjoint of three
commas
> > and find one temperament, or the ability to take the adjoint of
three
> > temperaments and find one commas.
>
> That's it, yes. Choose two different chromatic unison vectors, and
> you'll get two different equal temperaments (or an error). Any
> arbitrary set should do for candidates. Say
>
> 25:24
> 16:25
> 21:20
> 22:21
> 26:25
> 18:17
>
> and so on for successively higher prime limits. Once you have a
pair,
> walk the scale tree. You have to check for contorsion as well.
>

Thanks. How do you fill out a square matrix with only two 7-limit
temperaments in it? Can I take the adjoint of say (1 0 0 0),
(? ? ? ?), (Comma), (Comma)?

>
> Graham

🔗Graham Breed <gbreed@gmail.com>

6/1/2005 11:41:48 AM

On 6/1/05, Paul G Hjelmstad <paul.hjelmstad@medtronic.com> wrote:
> --- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...> wrote:
> > Your problem is that there isn't a unique solution. Finding the
> line
> > you should know -- it comes down to finding the 2-D temperament.
>
> Could you give an example?

12, 19, 26, 31, 43 and 55-equal are all meantones. So if you temper
out 81:80, you need some other information to determine which two
equal temperaments you want.

> Thanks. How do you fill out a square matrix with only two 7-limit
> temperaments in it? Can I take the adjoint of say (1 0 0 0),
> (? ? ? ?), (Comma), (Comma)?

Yes, you need to fill in the question marks with a chromatic unison
vector, which can be anything linearly independent of the commas. The
way I do it in my program is to take the primes, so (0 1 0 0), (0 0 1
0) or (0 0 0 1) which ever works (and one is guaranteed to). That
gives weird results though, usually a one note per octave temperament.

If you want two equal temperaments, you can replace (1 0 0 0) with
another chromatic unison vector. That should give your two equal
temperament mappings as the two left hand columns of the adjoint.

Try it out - this is all Excel-able.

Graham

🔗Gene Ward Smith <gwsmith@svpal.org>

6/1/2005 11:59:18 AM

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

> For finding the commas, as well, it can be tricky. Gene has a way of
> doing this using LLL reduction, which I don't understand. I remember
> a black-box Maple function doing a lot of the work.

I call on another black box function--Hermite reduction--in the case
of finding vals, which in this instance means period and generator.
However, these black boxes aren't necessary; they are just convenient
ways to reduce four commas or four vals to a standard two.

In the sense of uniquely specifying it, "finding" the temperament can
be accomplised by computing the wedgie. For two vals
<s[1] s[2] s[3] s[4| and <r[1] r[2] r[3] r[4]| we first take the wedge
product, which is

<<r[1]*s[2]-s[1]*r[2],r[1]*s[3]-s[1]*r[3],r[1]*s[4]-s[1]*r[4],
r[2]*s[3]-s[2]*r[3],r[2]*s[4]-r[4]*s[2],r[3]*s[4]-s[3]*r[4]||

and reduce to the standard wedgie by dividing out common factors and
making the first nonzero coefficient positive. The wedgie is a
projective object and so we want to find a unique form for it, which
this does. If we start instead with two monzos, we get a bival by
wedging and taking the complement, which from monzos |s[1] s[2] s[3]
s[4]> and |r[1] r[2] r[3] r[4]> gives

<<r[3]*s[4]-s[3]*r[4],r[4]*s[2]-s[4]*r[2],r[2]*s[3]-s[2]*r[3],
r[1]*s[4]-s[1]*r[4],s[1]*r[3]-r[1]*s[3],r[1]*s[2]-s[1]*r[2]||

which we reduce in the same way. Whether from vals or monzos, we end
up with the same wedgie.

Given a wedgie, we can find four "subgroup vals" by wedging the
complement of the wedgie with monzos for 2,3,5, and 7 respectively,
and complementing the result back to a val. Similarly, we can wedgie
the val with <1 0 0 0|, <0 1 0 0|, <0 0 1 0| and <0 0 0 1| and
complement the result to monzos, giving four "subgroup commas" which
lack a 2, 3, 5, and 7 respectively. I feed these to my Maple black
boxes, which works because they generate all vals and all monzos,
respectively, with linear combinations using integer coefficients.

However, if you don't have all these black boxes to call on, or if you
don't want to use wedgies, there are other ways to do things. If you
have two vals v1 and v2, you can find two commas by solving the linear
system {v1(q)=0, v2(q)=0} where q is a monzo in indeterminates, eg
|x2 x3 x5 x7>. In order to reduce this to a standard form, so as to be
able to see what temperament it represents, you can use TM reduction.
Similarly, if you have two commas c1 and c2, you can solve the linear
system {v(c1)=0, v(c2)=0} for the val <z2 z3 z5 z7|, which will give
you the vals as linear combinations of two basis vals. One way to
reduce such a pair to a standard form is to find the pair for period
and generator. Hence, instead of using wedgies, you can represent
temperaments in comma form by a TM reduced basis, and in val form by a
period and generator in a mapping to primes.

🔗Graham Breed <gbreed@gmail.com>

6/1/2005 12:16:39 PM

On 6/1/05, Gene Ward Smith <gwsmith@svpal.org> wrote:
> I call on another black box function--Hermite reduction--in the case
> of finding vals, which in this instance means period and generator.
> However, these black boxes aren't necessary; they are just convenient
> ways to reduce four commas or four vals to a standard two.

The problem with the comma finding is that the initial commas had
torsion, and TM reduction couldn't remove it. I suspect LLL wouldn't
either, so it must be that your commas magically started without it.
I think they came from Maple's function for solving a system of linear
equations.

> Given a wedgie, we can find four "subgroup vals" by wedging the
> complement of the wedgie with monzos for 2,3,5, and 7 respectively,
> and complementing the result back to a val. Similarly, we can wedgie
> the val with <1 0 0 0|, <0 1 0 0|, <0 0 1 0| and <0 0 0 1| and
> complement the result to monzos, giving four "subgroup commas" which
> lack a 2, 3, 5, and 7 respectively. I feed these to my Maple black
> boxes, which works because they generate all vals and all monzos,
> respectively, with linear combinations using integer coefficients.

I'll try that!

> However, if you don't have all these black boxes to call on, or if you
> don't want to use wedgies, there are other ways to do things. If you
> have two vals v1 and v2, you can find two commas by solving the linear
> system {v1(q)=0, v2(q)=0} where q is a monzo in indeterminates, eg
> |x2 x3 x5 x7>. In order to reduce this to a standard form, so as to be
> able to see what temperament it represents, you can use TM reduction.
> Similarly, if you have two commas c1 and c2, you can solve the linear
> system {v(c1)=0, v(c2)=0} for the val <z2 z3 z5 z7|, which will give
> you the vals as linear combinations of two basis vals. One way to
> reduce such a pair to a standard form is to find the pair for period
> and generator. Hence, instead of using wedgies, you can represent
> temperaments in comma form by a TM reduced basis, and in val form by a
> period and generator in a mapping to primes.

This "solve the linear system" sounds harder than using the wedgies.
Is there more to it than elementary matrix operations?

Graham

🔗Gene Ward Smith <gwsmith@svpal.org>

6/1/2005 12:47:05 PM

--- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...> wrote:
> On 6/1/05, Gene Ward Smith <gwsmith@s...> wrote:

> > I call on another black box function--Hermite reduction--in the case
> > of finding vals, which in this instance means period and generator.
> > However, these black boxes aren't necessary; they are just convenient
> > ways to reduce four commas or four vals to a standard two.

> The problem with the comma finding is that the initial commas had
> torsion, and TM reduction couldn't remove it. I suspect LLL wouldn't
> either, so it must be that your commas magically started without it.
> I think they came from Maple's function for solving a system of linear
> equations.

I'm not sure what example you are talking about; I was speaking in
general. However, neither LLL nor TM reduction will remove torsion; it
is, however, removed automatically by finding the wedgie first and
getting commas and vals from that.

> I'll try that!

You can remove common factors from the vals or monzos before reducing
them to two as an additional precaution, but if I have things figured
correctly you don't need to.

> This "solve the linear system" sounds harder than using the wedgies.
> Is there more to it than elementary matrix operations?

It probably is harder, but the advantage is that Excel should be able
to handle it. I am not an Excel expert, but I imagine a decent
spreadsheet could get the wedgie from two vals or two commas, however,
and also get commas and vals from the wedgie, so maybe that would work
for Paul also.

🔗Paul G Hjelmstad <paul.hjelmstad@medtronic.com>

6/1/2005 1:56:52 PM

--- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...> wrote:
> On 6/1/05, Paul G Hjelmstad <paul.hjelmstad@m...> wrote:
> > --- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...>
wrote:
> > > Your problem is that there isn't a unique solution. Finding the
> > line
> > > you should know -- it comes down to finding the 2-D temperament.
> >
> > Could you give an example?
>
> 12, 19, 26, 31, 43 and 55-equal are all meantones. So if you temper
> out 81:80, you need some other information to determine which two
> equal temperaments you want.
>
> > Thanks. How do you fill out a square matrix with only two 7-limit
> > temperaments in it? Can I take the adjoint of say (1 0 0 0),
> > (? ? ? ?), (Comma), (Comma)?
>
> Yes, you need to fill in the question marks with a chromatic unison
> vector, which can be anything linearly independent of the commas.
The
> way I do it in my program is to take the primes, so (0 1 0 0), (0 0
1
> 0) or (0 0 0 1) which ever works (and one is guaranteed to). That
> gives weird results though, usually a one note per octave
temperament.
>
> If you want two equal temperaments, you can replace (1 0 0 0) with
> another chromatic unison vector. That should give your two equal
> temperament mappings as the two left hand columns of the adjoint.
>
> Try it out - this is all Excel-able.
>
>
> Graham

I've been real busy at work, but thanks for your response. I'll try
this out tomorrow

🔗Graham Breed <gbreed@gmail.com>

6/2/2005 10:48:52 AM

On 6/1/05, Gene Ward Smith <gwsmith@svpal.org> wrote:
> Given a wedgie, we can find four "subgroup vals" by wedging the
> complement of the wedgie with monzos for 2,3,5, and 7 respectively,
> and complementing the result back to a val. Similarly, we can wedgie
> the val with <1 0 0 0|, <0 1 0 0|, <0 0 1 0| and <0 0 0 1| and
> complement the result to monzos, giving four "subgroup commas" which
> lack a 2, 3, 5, and 7 respectively. I feed these to my Maple black
> boxes, which works because they generate all vals and all monzos,
> respectively, with linear combinations using integer coefficients.

Using this method with miracle, I get the following commas:

(0, 3, 4, -5), (15, 0, 2, -7), (10, -1, 0, -3), (25, -7, -6, 0)

which are all genuine commas. But each pair of them has torsion,
giving these linearized wedgies:

(225, 300, -375, -30, 105, 90)
(300, 400, -500, -40, 140, 120)
(105, 140, -175, -14, 49, 42)
(-30, -40, 50, 4, -14, -12)
(105, 140, -175, -14, 49, 42)
(90, 120, -150, -12, 42, 36)

when I wanted

(15, 20, -25, -2, 7, 6)

So how do I get rid of the torsion?

Graham

🔗Gene Ward Smith <gwsmith@svpal.org>

6/2/2005 12:39:17 PM

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

> So how do I get rid of the torsion?

What I do is feed it to my favorite black boxes: first hermite
reduction to get the basic answer, and then LLL to clean up the result
in preparation to TM reduction. If you vary the hermite reduction step
by first reversing the monzos, hermite reducing, and then reversing
back, you get what I've called the "hermite comma sequence" which is
worth finding anyway. It gives you a comma pair which generates the
whole kernel (no torsion) but more importantly it gives you a standard
way of designating the temperament which makes its family
relationships to other temperaments more clear. So one possible
approach would be to bite the bullet and write a hermite reduction
algorithm for Python.

If you don't want to do that, you could try writing something that finds
Z-linear combinations from which a common factor can be removed. You
know the common factors are there and removable from the wedge product.

Suppose I take |25 -7 -6 0> and |15 0 2 -7>. Wedging them shows we
want to remove a 7, and if we find integers a and b such that
25a+15b=35, we can make the first coefficient divisible by 7. This is
a standard number theory problem now; one solution is a=1, b=-4, which
gives |-35 -7 -14 28>. Removing the 7 gives |-5 -1 -2 4>, which is
2401/2400. Now wedging |-5 -1 -2 4> with |15 0 2 -7> gives us no
torsion, so we have a comma basis.

🔗Paul G Hjelmstad <paul.hjelmstad@medtronic.com>

6/2/2005 1:48:51 PM

--- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...> wrote:
> On 6/1/05, Paul G Hjelmstad <paul.hjelmstad@m...> wrote:
> > --- In tuning-math@yahoogroups.com, Graham Breed <gbreed@g...>
wrote:
> > > Your problem is that there isn't a unique solution. Finding the
> > line
> > > you should know -- it comes down to finding the 2-D temperament.
> >
> > Could you give an example?
>
> 12, 19, 26, 31, 43 and 55-equal are all meantones. So if you temper
> out 81:80, you need some other information to determine which two
> equal temperaments you want.
>
> > Thanks. How do you fill out a square matrix with only two 7-limit
> > temperaments in it? Can I take the adjoint of say (1 0 0 0),
> > (? ? ? ?), (Comma), (Comma)?
>
> Yes, you need to fill in the question marks with a chromatic unison
> vector, which can be anything linearly independent of the commas.
The
> way I do it in my program is to take the primes, so (0 1 0 0), (0 0
1
> 0) or (0 0 0 1) which ever works (and one is guaranteed to). That
> gives weird results though, usually a one note per octave
temperament.
>
> If you want two equal temperaments, you can replace (1 0 0 0) with
> another chromatic unison vector. That should give your two equal
> temperament mappings as the two left hand columns of the adjoint.
>
> Try it out - this is all Excel-able.

This is very interesting. I've been playing with this in Excel. What
troubles me though, is the fact that I obtain different temperaments,
with the same two commas, and different chromatic unison vectors.
Shouldn't the temperaments be determined by the commatic unison
vectors and not the chromatic ones? Or perhaps --- if they all exist
along the same line, I guess they would all define the same linear
temperament?

Paul

> Graham

🔗Gene Ward Smith <gwsmith@svpal.org>

6/2/2005 2:33:47 PM

--- In tuning-math@yahoogroups.com, "Paul G Hjelmstad"
<paul.hjelmstad@m...> wrote:

> This is very interesting. I've been playing with this in Excel. What
> troubles me though, is the fact that I obtain different temperaments,
> with the same two commas, and different chromatic unison vectors.

Why do you think you get different temperaments? The easiest way to
determine if you get the same temperament is to take the wedge
product, which Excel should be able to do easily enough. If you have a
common factor, you have torsion. If you get the same thing up to sign
as with another two commas, you've got the same temperament.

🔗Paul G Hjelmstad <paul.hjelmstad@medtronic.com>

6/2/2005 2:45:30 PM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul G Hjelmstad"
> <paul.hjelmstad@m...> wrote:
>
> > This is very interesting. I've been playing with this in Excel.
What
> > troubles me though, is the fact that I obtain different
temperaments,
> > with the same two commas, and different chromatic unison vectors.
>
> Why do you think you get different temperaments? The easiest way to
> determine if you get the same temperament is to take the wedge
> product, which Excel should be able to do easily enough. If you have a
> common factor, you have torsion. If you get the same thing up to sign
> as with another two commas, you've got the same temperament.

I'll have to figure out a way to do wedgies in Excel. What I have done:

Using 49/49 and 15/14 as chromatic unison vectors and 126/125&1029/1028
as commas, I obtain 17&15 for temperaments. However, if I use 16/15 and
49/48 for chromatic unison vectors, I obtain 15&14 for temperaments.
What I meant is, if 17, 15 and 14 are all along the same line in 7-
limit space, then I understand. But if not, then the chromatic unison
vectors are affecting the result which doesn't make sense to me in
light of what Graham was saying.

🔗Gene Ward Smith <gwsmith@svpal.org>

6/2/2005 8:46:35 PM

--- In tuning-math@yahoogroups.com, "Paul G Hjelmstad"
<paul.hjelmstad@m...> wrote:

> Using 49/49 and 15/14 as chromatic unison vectors and 126/125&1029/1028
> as commas, I obtain 17&15 for temperaments.

Presumably you mean 126/125&1029/1024. These give
<<9 5 -3 -13 -30 -21||, which is the valentine temperament. You don't
really get things such as "17" or "15" for temperaments, but you get
vals. That is to say, you don't get an edo, but a mapping of the
7-limit to and edo. For valentine, the vals <15 24 35 41| and <16 25
37 45| define it, so it can be called 15&16 (not 15&17, which if you
use standard vals gives you <<3 10 -6 9 -18 -42||.)

Again, I think you meant 49/48, not 49/49. Assuming that, and taking
the adjoint matrix, gives v17=<17 26 39 48| and v15=<15 24 35 42| as
vals. Testing by wedging these two vals gives v17^v15 =
<<18 10 -6 -26 -60 -42||, so you've got contorsion, but dividing by 2
gives the right wedgie. Note you could see this coming because the
matrix you used to start with had determinant -2.

However, if I use 16/15 and
> 49/48 for chromatic unison vectors, I obtain 15&14 for temperaments.

Again, you really need to say that your val for 14 is <14 23 33 39|.
Now however you've got a pair of vals with no contorsion.

> What I meant is, if 17, 15 and 14 are all along the same line in 7-
> limit space, then I understand. But if not, then the chromatic unison
> vectors are affecting the result which doesn't make sense to me in
> light of what Graham was saying.

The vals in question all lie in a two-dimensional subspace of four
dimensional val space.

🔗Paul G Hjelmstad <paul.hjelmstad@medtronic.com>

6/3/2005 6:17:53 AM

--- In tuning-math@yahoogroups.com, "Gene Ward Smith" <gwsmith@s...>
wrote:
> --- In tuning-math@yahoogroups.com, "Paul G Hjelmstad"
> <paul.hjelmstad@m...> wrote:
>
> > Using 49/49 and 15/14 as chromatic unison vectors and
126/125&1029/1028
> > as commas, I obtain 17&15 for temperaments.
>
> Presumably you mean 126/125&1029/1024. These give
> <<9 5 -3 -13 -30 -21||, which is the valentine temperament. You
don't
> really get things such as "17" or "15" for temperaments, but you get
> vals. That is to say, you don't get an edo, but a mapping of the
> 7-limit to and edo. For valentine, the vals <15 24 35 41| and <16 25
> 37 45| define it, so it can be called 15&16 (not 15&17, which if you
> use standard vals gives you <<3 10 -6 9 -18 -42||.)

Hmm when I take the adjoint I do get <17 26 39 48| and <15 24 35 42|
as vals in the first two columns (!?)
>
> Again, I think you meant 49/48, not 49/49. Assuming that, and taking
> the adjoint matrix, gives v17=<17 26 39 48| and v15=<15 24 35 42| as
> vals. Testing by wedging these two vals gives v17^v15 =
> <<18 10 -6 -26 -60 -42||, so you've got contorsion, but dividing by
2
> gives the right wedgie. Note you could see this coming because the
> matrix you used to start with had determinant -2.
>
> However, if I use 16/15 and
> > 49/48 for chromatic unison vectors, I obtain 15&14 for
temperaments.
>
> Again, you really need to say that your val for 14 is <14 23 33 39|.
> Now however you've got a pair of vals with no contorsion.
>
> > What I meant is, if 17, 15 and 14 are all along the same line in
7-
> > limit space, then I understand. But if not, then the chromatic
unison
> > vectors are affecting the result which doesn't make sense to me
in
> > light of what Graham was saying.
>
> The vals in question all lie in a two-dimensional subspace of four
> dimensional val space.

Thanks for the clarification (Yes I did mean 1029/1024 and 49/48)
If one assumes octave equivalence, this reduces the 4-dim space down
to three, and the two-dim subspace down to a line, so I assume all my
vals line on a line?

🔗Graham Breed <gbreed@gmail.com>

6/3/2005 7:36:30 AM

On 6/2/05, Gene Ward Smith <gwsmith@svpal.org> wrote:

> What I do is feed it to my favorite black boxes: first hermite
> reduction to get the basic answer, and then LLL to clean up the result
> in preparation to TM reduction. If you vary the hermite reduction step
> by first reversing the monzos, hermite reducing, and then reversing
> back, you get what I've called the "hermite comma sequence" which is
> worth finding anyway. It gives you a comma pair which generates the
> whole kernel (no torsion) but more importantly it gives you a standard
> way of designating the temperament which makes its family
> relationships to other temperaments more clear. So one possible
> approach would be to bite the bullet and write a hermite reduction
> algorithm for Python.

I've got this:

def hermite(m):
result = [list(row) for row in m]
for i in range(len(m)-1):
for j in range(i, len(m)):
if result[j][i] != 0:
result[i], result[j] = result[j], result[i]
break
else:
print "oops"
return result ###
for j in range(i+1, len(m)):
d = result[i][i]
n = result[j][i]
gcd = temper.hcf((n,d))
n /= gcd
d /= gcd
for k in range(len(m)):
result[j][k] = result[j][k]*d - result[i][k]*n
return result

It does the nearest integer equivalent of what I remember is Hermite
reduction. The error handling's a bit weak, but enough to show that
it doesn't work here

>>> hermite(commas)
oops
[[15, 0, 2, -7], [0, 3, 4, -5], [0, 0, 0, 0], [0, 0, 0, 0]]

Mathworld agrees that it shouldn't work, because the matrix is singular

http://mathworld.wolfram.com/HermiteNormalForm.html

>>> LinearAlgebra.determinant(Numeric.array(commas))
4.141519752410312e-029
>>> reduce(temper.wedgeProduct, commas)
{}

The function again with @ indentation for the indentationally challenged

def hermite(m):
@result = [list(row) for row in m]
@for i in range(len(m)-1):
@@for j in range(i, len(m)):
@@@if result[j][i] != 0:
@@@@result[i], result[j] = result[j], result[i]
@@@@break
@@else:
@@@print "oops"
@@@return result ###
@@for j in range(i+1, len(m)):
@@@d = result[i][i]
@@@n = result[j][i]
@@@gcd = temper.hcf((n,d))
@@@n /= gcd
@@@d /= gcd
@@@for k in range(len(m)):
@@@@result[j][k] = result[j][k]*d - result[i][k]*n
@return result

Graham