back to list

Re: [tuning-math] coordinates from unison-vectors

🔗monz <joemonz@yahoo.com>

12/30/2001 8:07:18 PM

A plea to all who understand matrix math:

A week ago, I posted the pseudo-code for the formulas
in my Excel spreadsheet which calculates the coordinates
of a 2-dimensional periodicity-block from a given pair
of unison-vectors. It's quoted below, with some additional
comments inserted.

The algorithm sometimes calculates the proper coordinates,
but not always. I've tried to work from Paul's _Gentle
Introduction to Fokker Periodicity Blocks, part 3_
<http://www.ixpres.com/interval/td/erlich/intropblock3.htm>,
but I'm just not getting it.

I am *begging* someone who knows how to do this to have
a look at my algorithm and correct it.

The two big problems:

1)
I find that sometimes in order to get the correct periodicity-block,
I have to enter one or both pairs of the unison-vector exponents
with the signs (=/-) reversed.

2)
Sometimes the blocks are centered on 1/1, as I intend
for them to be ... but sometimes they're not, with 1/1 being
plotted at a corner.

Also, it seems that sometimes the order in which I list the
unison-vectors makes a difference. Is it supposed to?
(I don't think so...)

The code within the "LOOP" is the part that needs fixing.

Thanks in advance for any help received!

-monz

> ----- Original Message -----
>
> > From: monz <joemonz@yahoo.com>
> > To: <tuning-math@yahoogroups.com>
> > Sent: Sunday, December 23, 2001 12:28 AM
> > Subject: Re: [tuning-math] coordinates from unison-vectors (was: 55-tET)
> >
> >
> >
> > Here's the pseudo-code for the formulas in my spreadsheet.
> > Please feel free to correct any errors or to make the code
> > more elegant.
> >
> >
> >
> > unison-vectors =
> >
> > (3^a) * (5^b)
> > (3^c) * (5^d)
> >
> >
> >
> > unison-vector matrix =
> >
> > (a b)
> > (c d)
> >
> >
> >
> > determinant n of the matrix :
> >
> > n = (a*d) - (c*b)
> >
> >
> >
> > inverse of the matrix =
> >
> > ( d -b)
> > (-c a)
> > -------
> > n
> >
> >
> >
> > inverse coordinates p, q :
> >
> >
> > p = 0, q = 0
> >
> >
> > LOOP
> >
> > '-- This part finds the values p,q which fit into the unit-cube
> >
> > if ABS(p+d) > (ABS(n)/2)
> >
> > then p = MOD(p+d, ABS(n)) - ABS(n)
> >
> > else p = p + d
> >
> > end if
> >
> >
> >
> > if ABS(q-b) > (ABS(n)/2)
> >
> > then q = MOD(q-b, ABS(n)) - ABS(n)
> >
> > else q = q - b
> >
> > end if
> >
> >
> >
> > lattice coordinates x, y :
> >
> > '-- This part transforms back to the original space
> >
> > x = ( (q*c) + (p*a) ) / n
> >
> > y = ( (q*d) + (p*b) ) / n
> >
> >
> >
> > END LOOP
> >
> >
>
>

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/30/2001 8:38:34 PM

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Sunday, December 30, 2001 8:07 PM
> Subject: Re: [tuning-math] coordinates from unison-vectors
> </tuning-math/message/2332>
>
>
> A plea to all who understand matrix math:
>
>
> A week ago, I posted the pseudo-code for the formulas
> in my Excel spreadsheet which calculates the coordinates
> of a 2-dimensional periodicity-block from a given pair
> of unison-vectors. <etc.>

I realized that if I elaborate more on what's going on
in my spreadsheet, I'm more likely to get help.

The first part of the "LOOP" treats the unison-vectors
as boundaries of a unit-cube, and calculates values p,q for
the coordinates within that unit-cube, on the transformed lattice.
I think this is working OK... but if anyone wants to check...

The second part of the "LOOP" transforms these coordinates
back to the original lattice, as values x,y. This is the
part that is definitely *not* working all the time.

Paul has already mentioned that I should be dividing by
the determinant n again at the end, but it doesn't work
at all if I leave that out. I don't understand why he says
that either, because the inverse matrix has the determinant
as the denominator. I think Paul is confused because he
uses the decimal fractional values of the adjoint, whereas
I keep the exponents in integer form and require the determinant
denominator. But of course, I'm way out of my league here and
could definitely be very wrong...

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/30/2001 10:16:08 PM

Wow... big, *BIG* Oops!... my bad!

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Sunday, December 30, 2001 8:38 PM
> Subject: Re: [tuning-math] coordinates from unison-vectors
>

> ...
> Paul has already mentioned that I should be dividing by
> the determinant n again at the end, ...

That should be "Paul has already mentioned that I

should *NOT* be dividing by the determinant n again
^^^^^
at the end,..."

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/31/2001 1:09:49 AM

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Sunday, December 30, 2001 8:38 PM
> Subject: Re: [tuning-math] coordinates from unison-vectors
>
>
> The first part of the "LOOP" treats the unison-vectors
> as boundaries of a unit-cube, and calculates values p,q for
> the coordinates within that unit-cube, on the transformed lattice.
> I think this is working OK... but if anyone wants to check...

Oops!... of course, my work on this is all 2-dimensional,
so that's a "unit square" and not a "unit cube".

(but *you* all knew that! ...)

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/31/2001 2:16:26 AM

Hi Dave (Keenan),

Aren't you the current resident Excel-meister?
(suggestive evidence: your tumbling dekany)

I've posted my Periodicity-Block Calculator spreadsheet
in the Files section, and have some comments below.
Please take a look.

(And if anyone else feels up to the challenge to dethrone
Dave, that's OK with me... all I'm after is good solid code.)

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Sunday, December 30, 2001 8:07 PM
> Subject: Re: [tuning-math] coordinates from unison-vectors
> </tuning-math/message/2332>
>
>
> A plea to all who understand matrix math:
>
>
> A week ago, I posted the pseudo-code for the formulas
> in my Excel spreadsheet which calculates the coordinates
> of a 2-dimensional periodicity-block from a given pair
> of unison-vectors. <etc.>

I've simplified and uncluttered my spreadsheet, and uploaded
it again to the Files section:

/tuning-math/files/monz/5-limit%20PBs%20from%20
UVs.xls

Rather than even bothering to deal with that broken link,
it's much better to simply go to the Files section and
download it, because there's a description of it there
that explains how to use it.

/tuning-math/files/monz/

Look for the file named "5-limit PBs from UVs.xls".

Here are my detailed comments:

The unison-vector pair which I put in the spreadsheet is the
exponent matrix:

[ 5 -6]
[-4 1]

This is an example of one of the problems I mention in that
quoted post: in order to get all the coordinates within the
calculated boundaries which are centered on [0 0], the second
unison-vector has to have the signs reversed -- it's supposed
to be the usual old syntonic comma [4 -1].

Generally, when my spreadsheet produces garbage, it can be
corrected by changing the signs of either one or both of the
unison-vector exponents.

That post also quotes all the pseudo-code for the formulas in
my spreadsheet.

The formulas for p,q, in spreadsheet cells A21..B75, seem to
work correctly to find all the coordinates which fall within
the parallelogram bounded by the unison-vectors... but that
should be checked anyway.

I simply start at the origin [0 0] and add one of the
unison-vectors continously until the results exceed the
boundary +/- 1/2 of the other unison-vector, then divide
it modulo that unison-vector.

Then that lattice must be transformed back into the original
ratio-space. This is where I'm having problems.

The formulas for x,y, in spreadsheet cells D21..E75, don't
always work. Sometimes they produce exactly the correct
coordinates, other times the shape is right but not centered
within the parallelogram.

I've tried changing the formulas for x,y according to what
I've seen in Paul's _Gentle Introduction, part 3_ and in
textbooks on matrix math, but none of those coordinates
worked at all. So I'm really confused.

The formulas in G4..J5 find the corners of the parallelogram
when it is centered on the origin coordinates [0 0].
An adjustment for either axis or both axes may be entered
in cells I6 and J6, for prime-factors 3 and 5 respectively.
If it's necessary at all (which it often isn't), a value
of 0.5 generally works to put all the coordinates within
the unison-vector boundaries.

The formula in cells C76..C134 finds the bounding notes of
the meantone chain specified by the integer fraction-of-a-comma
numerator and denominator entered into cells D12 and E12.
Cells D76..E134 calculate the coordinates for that, according
to the meantone's fractional exponents of 3 and 5. This also
doesn't always work, and again, is usually corrected when
the signs in the original unison-vector matrix are changed.

(And according to Paul's views it's entirely unnecessary anyway
... but this is my spreadsheet and I like this theory...)

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/31/2001 2:44:39 AM

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>; Dave Keenan <d.keenan@uq.net.au>
> Sent: Monday, December 31, 2001 2:16 AM
> Subject: Re: [tuning-math] coordinates from unison-vectors
>
>
> /tuning-math/files/monz/
>
>
> Look for the file named "5-limit PBs from UVs.xls".
>
>
> Here are my detailed comments:
>
>
> The unison-vector pair which I put in the spreadsheet is the
> exponent matrix:
>
> [ 5 -6]
> [-4 1]
>
> ...
>
> The formula in cells C76..C134 finds the bounding notes of
> the meantone chain specified by the integer fraction-of-a-comma
> numerator and denominator entered into cells D12 and E12.

The meantone I entered in this example is -5/16-comma meantone.
I chose that value because it visually splits the periodicity-block
in half right down the center.

For an another example of meantone which is a pretty good fit
(according to my discredited-by-Paul theory) with this
periodicity-block, try entering the value -1 into cell D12
and the value 3 into cell E12, for -1/3-comma meantone.

Here's another, totally different, example which I
found to be very interesting, according to my
"meantone-rational-implications" theory:

Enter this unison-vector matrix into cells A7..B8:

[-8 -1]
[-4 1]

These unison-vectors, the reversed equivalents of the
skhisma and the syntonic comma, define a typical 12-tone
periodicity-block.

Enter 0.5 into cell I6 to adjust the boundaries of the
parallelogram slightly to the right, so that coordinate (6,0)
is included within it (it previously fell right on a corner).

Now, enter the value -1 into cell D12 and the value 11 into
cell E12, for -1/11-comma meantone, which we all know is
nearly identical to our familiar old 12-EDO tuning. Notice
how it visually splits *this* parallelogram in half almost
exactly down the center. Intriguing...

So according to my "meantone-rational-implications" theory,
use of 12-EDO strongly implies the application of this JI
periodicity-block -- among others, of course... but the fact
that it goes right down the middle of this one, averaging as
perfectly as possible the pitch-height distance from this
particular set of JI pitch-classes, suggests to me that this
periodicity-block would be the one most likely to be
interpreted by the listener.

Or, looked at another way, I would say that if a composer
wanted to find a "best fit" meantone or EDO for this particular
periodicity-block, it would be 12-EDO ~= -1/11-comma meantone.

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/31/2001 2:55:23 AM

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Monday, December 31, 2001 2:44 AM
> Subject: Re: [tuning-math] coordinates from unison-vectors
>
>
> > From: monz <joemonz@yahoo.com>
> > To: <tuning-math@yahoogroups.com>; Dave Keenan <d.keenan@uq.net.au>
> > Sent: Monday, December 31, 2001 2:16 AM
> > Subject: Re: [tuning-math] coordinates from unison-vectors
> >
> >
> > /tuning-math/files/monz/
> >
> >
> > Look for the file named "5-limit PBs from UVs.xls".
>
> ...
>
> Enter this unison-vector matrix into cells A7..B8:
>
> [-8 -1]
> [-4 1]
>
> These unison-vectors, the reversed equivalents of the
> skhisma and the syntonic comma, define a typical 12-tone
> periodicity-block.
>
>
> Enter 0.5 into cell I6 to adjust the boundaries of the
> parallelogram slightly to the right, so that coordinate (6,0)
> is included within it (it previously fell right on a corner).
>
> Now, enter the value -1 into cell D12 and the value 11 into
> cell E12, for -1/11-comma meantone, which we all know is
> nearly identical to our familiar old 12-EDO tuning. Notice
> how it visually splits *this* parallelogram in half almost
> exactly down the center. Intriguing...

Oops... the meantone doesn't follow the boundary adjustment
entered into cell I6. That needs to be fixed. So until it is...

If you try this example, leave the boundary adjustment blank
and simply realize that either JI coordinate (6,0) or (-6,0)
may be included. That way the -1/11-comma meantone will be
more nearly centered within the parallelogram, and will actually
reflect its true relationship with the unison-vectors.
(According to my potential invalid theory, that is...)

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/31/2001 3:23:13 AM

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Monday, December 31, 2001 2:55 AM
> Subject: Re: [tuning-math] coordinates from unison-vectors
>
>
> > > /tuning-math/files/monz/
> > >
> > >
> > > Look for the file named "5-limit PBs from UVs.xls".
> >

Here's another interesting example:

Enter this unison-vector exponent pair into the matrix
in cells A7..B8:

[-4 -2]
[-4 1]

The top one is the "diaschisma", the bottom one is the
"8ve"-complement (i.e., sign-reverse) of the syntonic comma.

Enter -1/6-comma as the value of the meantone tempering fraction
in cells D12 and E12.

The (1,-1), (3,0), and (2,1) coordinate pairs all fall on edges
of the bounding parallelogram, thus they each have an alternate
a unison-vector away which falls on the opposite edge. The
first two may lowered be a comma and the third by a diaschisma:

(1,-1) + [-4 1] = (-3, 0)
(3, 0) + [-4 1] = (-1, 1)
(2, 1) + [-4 -2] = (-2,-1)

Since the parallelogram is centered on (0,0), it should be
easy to see that these are all equivalent pairs.

The meantone chain produces 13 notes, of which the first (-2,-1)
and last (2,1) both fall on edges of the parallegram and are
separated by the [-4 -2] unison-vector, and thus are alternates.
It visually splits the parallelogram in half running nearly
down the center.

This suggests to me that a 12-tone chain of -1/6-comma meantone
is a "best fit" meantone for this particular JI periodicity-block.

(disclaimer: Paul Erlich has discredited this "best-fit" theory of mine)

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗monz <joemonz@yahoo.com>

12/31/2001 3:31:58 AM

> From: monz <joemonz@yahoo.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Monday, December 31, 2001 2:55 AM
> Subject: Re: [tuning-math] coordinates from unison-vectors
>
>
> /tuning-math/files/monz/
>
> Look for the file named "5-limit PBs from UVs.xls".

I forget to mention this:

The blue lines, which connect the coordinates within the
periodicity-block, show the postions of the JI "wolves" as
one traces the chain of 3:2s from the bottom to the top.

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗unidala <JGill99@imajis.com>

12/31/2001 8:05:10 AM

--- In tuning-math@y..., "monz" <joemonz@y...> wrote:

> <SNIP>
>
> Now, enter the value -1 into cell D12 and the value 11 into
> cell E12, for -1/11-comma meantone, which we all know is
> nearly identical to our familiar old 12-EDO tuning. Notice
> how it visually splits *this* parallelogram in half almost
> exactly down the center. Intriguing...
>
> So according to my "meantone-rational-implications" theory,
> use of 12-EDO strongly implies the application of this JI
> periodicity-block -- among others, of course... but the fact
> that it goes right down the middle of this one, averaging as
> perfectly as possible the pitch-height distance from this
> particular set of JI pitch-classes, suggests to me that this
> periodicity-block would be the one most likely to be
> interpreted by the listener.
>
> Or, looked at another way, I would say that if a composer
> wanted to find a "best fit" meantone or EDO for this particular
> periodicity-block, it would be 12-EDO ~= -1/11-comma meantone.
>
> -monz

J Gill: So your (dynamite presentation!) XLS Spreadsheet
will allow determination of mean-tone "coefficients" which
"best fit" any 5-limit periodicity block?

Not being very adept with this PB stuff you guys apply,
what are the mean-tone "coefficients" which represent
a "best-fit" for Ellis' "Duodene", with 12 pitches at:

1/1--16/15--9/8--6/5--5/4--4/3--45/32--3/2--8/5--5/3--9/5--15/8
and
16/15--9/8--6/5--5/4--4/3--45/32--3/2--8/5--5/3--9/5--15/8--2/1

and for
1/1--16/15--9/8--6/5--5/4--4/3--7/5--3/2--8/5--5/3--9/5--15/8
and
16/15--9/8--6/5--5/4--4/3--7/5--3/2--8/5--5/3--9/5--15/8--2/1

Curiously, J Gill

🔗monz <joemonz@yahoo.com>

12/31/2001 12:52:38 PM

Hi J!

> From: unidala <JGill99@imajis.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Monday, December 31, 2001 8:05 AM
> Subject: [tuning-math] Re: coordinates from unison-vectors
>
>
> ...
>
> J Gill: So your (dynamite presentation!) XLS Spreadsheet ...

Thanks for the positive feedback!

> ... will allow determination of mean-tone "coefficients" which
> "best fit" any 5-limit periodicity block?

Well... the spreadsheet *allows* determination of the meantone
coordinates and axis... but it still can't *make* the determination!
The user still has to do some of the work.

The spreadsheet automatically figures out where to close
the meantone chain, at (+/- 1/2 determinant) generators. But
I haven't yet "coordinated" [groan pun intended] the mathematics
to determine the "best-fit" meantone automatically. So far, you
can only try out different values and see what they look like.

> Not being very adept with this PB stuff you guys apply,

Have patience, J... I've spent the night working on a terrific
graphic which will go into a Dictionary entry webpage for
"Transformation". That should clear up a lot of the fog for you.

> what are the mean-tone "coefficients" which represent
> a "best-fit" for Ellis' "Duodene", with 12 pitches at:
>
> 1/1--16/15--9/8--6/5--5/4--4/3--45/32--3/2--8/5--5/3--9/5--15/8
> and
> 16/15--9/8--6/5--5/4--4/3--45/32--3/2--8/5--5/3--9/5--15/8--2/1
>
> and for
> 1/1--16/15--9/8--6/5--5/4--4/3--7/5--3/2--8/5--5/3--9/5--15/8
> and
> 16/15--9/8--6/5--5/4--4/3--7/5--3/2--8/5--5/3--9/5--15/8--2/1
>
>
> Curiously, J Gill

Well, as I said, I don't have mathematics to do the job, so
I just try a few by eye and intuition, and see what looks good.

First of all, the first two of your Duodenes are equivalent to
each other on my lattice, because it's 2-dimensional for
prime-factors 3 and 5, with 2 ignored.

Secondly, I could use only that first pair, because the
second pair are 7-limit, making the lattice 3-dimensional,
and my spreadsheet doesn't handle that ... yet ...

So:

Ellis's Duodene is a 12-tone set defined by the unison-vectors
[0 3] and [4 -1], as Paul shows in his "Gentle Introduction to
Fokker Periodicity Blocks, part 2":
http://www.ixpres.com/interval/td/erlich/intropblock2.htm

Here's my spreadsheet comparing the Duodene with two different
meantones: -2/9-comma and -1/4-comma:
/tuning-math/files/monz/duodene.xls

And a graphic of the -1/4-comma meantone lattice:
/tuning-math/files/monz/(0,3) (4,-1) PB
and -1-4cmt.gif

(or without dealing with the broken link, just go to
/tuning-math/files/monz/
and download the file named "(0,3) (4,-1) PB and -1-4cmt.gif".)

Legend:

* the pink outlines the parallelogram boundaries of the
periodicity-block according to the shape defined by the
pair of unison-vectors,

* the blue plots the coordinates of the twelve 5-limit JI
pitch-classes of Ellis's "Duodene" which lie within the
boundaries of the periodicity-block,

* the yellow plots the more-or-less arbitrarily chosen
meantones, whose chains are closed according to the
interval spanned by one of the unison-vectors,

* the green connects each meantone pitch-class with its
closest JI relative within the periodicity-block,
closeness measured in pitch-height.

(I drew those green lines in by hand... so if you change
the meantone in the spreadsheet, the lines won't adjust.)

Note that this periodicity-block has three pitch-classes
which fall right on the eastern boundary: (2,-1), (2,0)
and (2,1). All three of these thus have alternates a comma
lower -- that's would be -[4,-1] unison-vector--, which
would place them on the western boundary: (-2,0), (-2,1),
and (-2,2), respectively.

Also, since (-2,2) and (2,1) happen to fall right on
northwest and northeast *corners* of the boundary (respectively),
they also have lower alternates at the distance of the *other*
unison-vector, which would be -[0 3], which would place the
alternates at (-2,-1) and (2,-2), respectively.

With a total of 17 possible pitch-classes which may be used
to define this periodicity-block, the only meantone which goes
right down the middle of all of them is -1/4-comma. That's
why I chose to use that for the graphic.

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗dkeenanuqnetau <d.keenan@uq.net.au>

12/31/2001 2:56:08 PM

--- In tuning-math@y..., "monz" <joemonz@y...> wrote:
> Hi Dave (Keenan),
>
>
> Aren't you the current resident Excel-meister?
> (suggestive evidence: your tumbling dekany)
>
> I've posted my Periodicity-Block Calculator spreadsheet
> in the Files section, and have some comments below.
> Please take a look.

Sorry Monz, I'm preparing to go away with my family in a few days to
camp for two weeks on an coral island. (Lady Musgrave Island, southern
end of the Great Barrier Reef.)

> (And if anyone else feels up to the challenge to dethrone
> Dave, that's OK with me... all I'm after is good solid code.)

That's OK with me too. :-)

🔗monz <joemonz@yahoo.com>

12/31/2001 3:35:35 PM

Hey Dave,

> From: dkeenanuqnetau <d.keenan@uq.net.au>
> To: <tuning-math@yahoogroups.com>
> Sent: Monday, December 31, 2001 2:56 PM
> Subject: [tuning-math] Re: coordinates from unison-vectors
>
>
> --- In tuning-math@y..., "monz" <joemonz@y...> wrote:
> > Hi Dave (Keenan),
> >
> >
> > Aren't you the current resident Excel-meister?
> > (suggestive evidence: your tumbling dekany)
> >
> > I've posted my Periodicity-Block Calculator spreadsheet
> > in the Files section, and have some comments below.
> > Please take a look.
>
> Sorry Monz, I'm preparing to go away with my family in a few days to
> camp for two weeks on an coral island. (Lady Musgrave Island, southern
> end of the Great Barrier Reef.)

OK, well, then have a good holiday! (sounds pretty cool)

Anyway, I'm working on a Dictionary entry for "Transformation",
so I've finally gotten the hang of it. I think I'll be able
to clean up my own code... but if anyone else wants to take
a shot at it, please do!

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

🔗paulerlich <paul@stretch-music.com>

1/3/2002 9:37:11 PM

Here's my Matlab code for doing this. I arbitrarily start with a 101-
by-101 square of lattice points. Rye is the 2-by-2 matrix of unison
vectors. t is the set of points inside the PB.

for a=-50:50;
l(a+51,:)=a*ones(1,101);
m(:,a+51)=a*ones(101,1);
end;
p=[l(:) m(:)];
s=p*inv(rye);
s(find(s(:,1)>.50000001),:)=[];
s(find(s(:,2)>.50000001),:)=[];
s(find(s(:,2)<-.49999999),:)=[];
s(find(s(:,1)<-.49999999),:)=[];
t=s*rye

🔗monz <joemonz@yahoo.com>

1/3/2002 10:22:30 PM

> From: paulerlich <paul@stretch-music.com>
> To: <tuning-math@yahoogroups.com>
> Sent: Thursday, January 03, 2002 9:37 PM
> Subject: [tuning-math] Re: coordinates from unison-vectors
>
>
> Here's my Matlab code for doing this. I arbitrarily start with a 101-
> by-101 square of lattice points. Rye is the 2-by-2 matrix of unison
> vectors. t is the set of points inside the PB.
>
>
>
> for a=-50:50;
> l(a+51,:)=a*ones(1,101);
> m(:,a+51)=a*ones(101,1);
> end;
> p=[l(:) m(:)];
> s=p*inv(rye);
> s(find(s(:,1)>.50000001),:)=[];
> s(find(s(:,2)>.50000001),:)=[];
> s(find(s(:,2)<-.49999999),:)=[];
> s(find(s(:,1)<-.49999999),:)=[];
> t=s*rye

Thanks, Paul! This should help me a bit.

-monz

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com