back to list

tiptop.py

🔗monz <joemonz@yahoo.com>

3/18/2012 6:51:47 AM

hi keenan,

been a long time since i posted anything here.
i just downloaded your tiptop.py and tried it out,
but it gave me this error message:

---------
Traceback (most recent call last):
File "tiptop.py", line 131, in <module>
generators, residual = tiptop(primes, mapping, 1e-9)
File "tiptop.py", line 87, in tiptop
xs = candidates(A, b, tol, 0)
File "tiptop.py", line 60, in candidates
for C in constraint_matrices(m, n):
File "tiptop.py", line 38, in constraint_matrices
for indices in itertools.combinations(range(c), r+1):
AttributeError: 'module' object has no attribute 'combinations'
----------

is there a module i need to load first which is missing?

i'm using python 2.5.1 running under linux kernel 2.6.30.6

-monz
http://tonalsoft.com
Tonescape microtonal music software

🔗monz <joemonz@yahoo.com>

3/18/2012 6:53:26 AM

ack ... as usual with my posts, you have to click "Option"
and then "Use Fixed Width Font" to view the text exactly
as it was posted ... there are indents which Yahoo strips out
in the "normal" view.

--- In tuning-math@yahoogroups.com, "monz" <joemonz@...> wrote:
>
> hi keenan,
>
> been a long time since i posted anything here.
> i just downloaded your tiptop.py and tried it out,
> but it gave me this error message:
>
> ---------
> Traceback (most recent call last):
> File "tiptop.py", line 131, in <module>
> generators, residual = tiptop(primes, mapping, 1e-9)
> File "tiptop.py", line 87, in tiptop
> xs = candidates(A, b, tol, 0)
> File "tiptop.py", line 60, in candidates
> for C in constraint_matrices(m, n):
> File "tiptop.py", line 38, in constraint_matrices
> for indices in itertools.combinations(range(c), r+1):
> AttributeError: 'module' object has no attribute 'combinations'
> ----------
>
> is there a module i need to load first which is missing?
>
> i'm using python 2.5.1 running under linux kernel 2.6.30.6
>
>
>
> -monz
> http://tonalsoft.com
> Tonescape microtonal music software
>

🔗Graham Breed <gbreed@gmail.com>

3/18/2012 6:57:11 AM

"monz" <joemonz@yahoo.com> wrote:

> is there a module i need to load first which is missing?
>
> i'm using python 2.5.1 running under linux kernel 2.6.30.6

I have itertools.combinations in Python 2.6.4. Maybe you
need to upgrade.

Graham

🔗monz <joemonz@yahoo.com>

3/18/2012 7:17:46 AM

ok, thanks ... i have more recent distros which will have
a later version of python, so i will give it a try when
i reboot.

-monz
http://tonalsoft.com
Tonescape microtonal music software

--- In tuning-math@yahoogroups.com, Graham Breed <gbreed@...> wrote:
>
> "monz" <joemonz@...> wrote:
>
> > is there a module i need to load first which is missing?
> >
> > i'm using python 2.5.1 running under linux kernel 2.6.30.6
>
> I have itertools.combinations in Python 2.6.4. Maybe you
> need to upgrade.
>
>
> Graham
>

🔗monz <joemonz@yahoo.com>

3/18/2012 10:02:43 AM

got it working fine in a later linux ... thanks, keenan!

it's nice to see your python program giving exactly the
same results (to 12 decimal places) as my old spreadsheets.

-monz
http://tonalsoft.com/tonescape.aspx
Tonescape microtonal music software

--- In tuning-math@yahoogroups.com, "monz" <joemonz@...> wrote:
>
> ok, thanks ... i have more recent distros which will have
> a later version of python, so i will give it a try when
> i reboot.
>
> -monz
> http://tonalsoft.com
> Tonescape microtonal music software
>
>
> --- In tuning-math@yahoogroups.com, Graham Breed <gbreed@> wrote:
> >
> > "monz" <joemonz@> wrote:
> >
> > > is there a module i need to load first which is missing?
> > >
> > > i'm using python 2.5.1 running under linux kernel 2.6.30.6
> >
> > I have itertools.combinations in Python 2.6.4. Maybe you
> > need to upgrade.
> >
> >
> > Graham
> >
>

🔗Keenan Pepper <keenanpepper@gmail.com>

3/18/2012 3:59:18 PM

--- In tuning-math@yahoogroups.com, "monz" <joemonz@...> wrote:
>
> got it working fine in a later linux ... thanks, keenan!
>
> it's nice to see your python program giving exactly the
> same results (to 12 decimal places) as my old spreadsheets.

Yay!

Well, I meant to announce this last night but then I fell asleep. Good to see at least one person already has it up and running.

TOP tunings are not in general unique. Usually a temperament has a unique TOP tuning, but sometimes there's a nontrivial polytope of tunings that have the same TOP damage. One way to define a preferred TOP tuning among these is, after you've minimized the maximum weighted error, then minimize the second-worst weighted error, then the third-worst, and so on. This is equivalent to taking the limit of the Lp norm minimizer as p tends to infinity (exercise for the reader!). However, it is *not* equivalent to the centroid of the TOP polytope.

Continuing a time-honored tradition of forced acronyms, I call it "TIP-TOP" for Tiebreaker-In-Polytope TOP.

This version is in Python and requires recent "numpy" and "itertools" packages. A matlab version would not be too difficult to write.

It should work with arbitrary-rank temperaments of arbitrary (sane) groups.

Let me know of any errors.

Keenan

🔗genewardsmith <genewardsmith@sbcglobal.net>

3/18/2012 8:44:00 PM

--- In tuning-math@yahoogroups.com, "Keenan Pepper" <keenanpepper@...> wrote:

> Continuing a time-honored tradition of forced acronyms, I call it "TIP-TOP" for Tiebreaker-In-Polytope TOP.

What's an acronym for CENT-TOP or TOPOID?

🔗Mike Battaglia <battaglia01@gmail.com>

3/18/2012 8:49:44 PM

On Sun, Mar 18, 2012 at 11:44 PM, genewardsmith
<genewardsmith@sbcglobal.net> wrote:
>
> --- In tuning-math@yahoogroups.com, "Keenan Pepper" <keenanpepper@...>
> wrote:
>
> > Continuing a time-honored tradition of forced acronyms, I call it
> > "TIP-TOP" for Tiebreaker-In-Polytope TOP.
>
> What's an acronym for CENT-TOP or TOPOID?

What the heck is CENT-TOP? What is TOPOID?

I'll say that CENT-TOP is "Convention: EDO Numbered Twelvehundred -
TOP", and TOPOID is "TOP, Only Paul Obviously Isn't Down"

-Mike

🔗genewardsmith <genewardsmith@sbcglobal.net>

3/18/2012 9:27:37 PM

--- In tuning-math@yahoogroups.com, Mike Battaglia <battaglia01@...> wrote:
>
> On Sun, Mar 18, 2012 at 11:44 PM, genewardsmith
> <genewardsmith@...> wrote:
> >
> > --- In tuning-math@yahoogroups.com, "Keenan Pepper" <keenanpepper@>
> > wrote:
> >
> > > Continuing a time-honored tradition of forced acronyms, I call it
> > > "TIP-TOP" for Tiebreaker-In-Polytope TOP.
> >
> > What's an acronym for CENT-TOP or TOPOID?
>
> What the heck is CENT-TOP? What is TOPOID?

Centroid TOP, of course.

> I'll say that CENT-TOP is "Convention: EDO Numbered Twelvehundred -
> TOP", and TOPOID is "TOP, Only Paul Obviously Isn't Down"

Work on it!

🔗Mike Battaglia <battaglia01@gmail.com>

3/18/2012 9:54:49 PM

On Mon, Mar 19, 2012 at 12:27 AM, genewardsmith
<genewardsmith@sbcglobal.net> wrote:
>
> > > What's an acronym for CENT-TOP or TOPOID?
> >
> > What the heck is CENT-TOP? What is TOPOID?
>
> Centroid TOP, of course.
>
>
> > I'll say that CENT-TOP is "Convention: EDO Numbered Twelvehundred -
> > TOP", and TOPOID is "TOP, Only Paul Obviously Isn't Down"
>
> Work on it!

OK, I'll change it to "Centroid, Except Not True TOP" then. And I
maintain that "TOP, Only Paul Obviously Isn't Down" is superior to all
other acronyms for TOPOID.

-M.I.K.E.

🔗genewardsmith <genewardsmith@sbcglobal.net>

3/18/2012 11:53:47 PM

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

> OK, I'll change it to "Centroid, Except Not True TOP" then.

But centroid is true TOP, alas.

🔗Mike Battaglia <battaglia01@gmail.com>

3/19/2012 2:30:31 AM

On Mon, Mar 19, 2012 at 2:53 AM, genewardsmith <genewardsmith@sbcglobal.net>
wrote:
>
> --- In tuning-math@yahoogroups.com, Mike Battaglia <battaglia01@...>
> wrote:
>
> > OK, I'll change it to "Centroid, Except Not True TOP" then.
>
> But centroid is true TOP, alas.

"Centroid: Easy, not TIP-TOP"

-Mike