back to list

Finding Maximally-Efficient MOS Scales in EDOs

🔗cityoftheasleep <igliashon@sbcglobal.net>

2/8/2011 2:08:58 PM

Here's a math problem for y'all.

Let's say I'm working in a specific EDO, and I find a chord--a triad, say--that I really like. Is there a way to quickly figure out what MOS/DE scale within the EDO will give the largest number of desired triads for the fewest number of scale notes?

Boy howdy, would I love to be able to do this without having to write out all the MOS scales in each EDO by hand and then count the intervals that show up. Anyone who comes up with something I can turn into a spreadsheet and plug numbers into gets my eternal gratitude.

-Igs

🔗Carl Lumma <carl@lumma.org>

2/9/2011 12:03:50 PM

Hi Igs- I'll give you the outline and try to code it tonight.

You're supplying N-ET and a chord of the form A_B_C... where
A is always zero.

First we find the Graham complexity of every generator in the
ET between 1 and M, where M is floor(N/2).

Floor means 'round down to the nearest whole number'.

For each of the steps in the ET between 1 and M, you chain them
until you generate the entire ET (subtract ET every time you
exceed ET).

Next, map A, B, C... on the chain

Next find the N-modular inverse of this map. That just means
if you have a map (+11 +8) in 12-ET, make it (+1 +4).

Now find the max number in each of the the original and inverse
maps find the max. So 11 and 4 in this case.

Now take the minimum of those. That's the Graham complexity, G.
G = 4 in this case.

For a chain of those generators, you get zero chords if the
chain is shorter than G. For every note you add past G, you
get one more chord (and its 'minor' inverse, as you know).

So, just select the generator with the smallest G and find
its MOS series, and select the one of the size you want (it
must be > G to get a single chord).

-Carl

At 02:08 PM 2/8/2011, you wrote:
>Here's a math problem for y'all.
>
>Let's say I'm working in a specific EDO, and I find a chord--a triad,
>say--that I really like. Is there a way to quickly figure out what
>MOS/DE scale within the EDO will give the largest number of desired
>triads for the fewest number of scale notes?
>
>Boy howdy, would I love to be able to do this without having to write
>out all the MOS scales in each EDO by hand and then count the
>intervals that show up. Anyone who comes up with something I can turn
>into a spreadsheet and plug numbers into gets my eternal gratitude.
>
>-Igs
>
>

🔗genewardsmith <genewardsmith@sbcglobal.net>

2/9/2011 11:25:45 PM

--- In tuning-math@yahoogroups.com, "cityoftheasleep" <igliashon@...> wrote:
>
> Here's a math problem for y'all.
>
> Let's say I'm working in a specific EDO, and I find a chord--a triad, say--that I really like. Is there a way to quickly figure out what MOS/DE scale within the EDO will give the largest number of desired triads for the fewest number of scale notes?

Pick the one where the chord has the smallest Graham complexity, and look at generated scales in that. If you really need a MOS/DE, then you need to figure out the size range you are looking for, and it gets messier.

🔗cityoftheasleep <igliashon@sbcglobal.net>

2/10/2011 7:57:09 PM

Sounds great, Carl. But how do you calculate the Graham complexity of scales whose periods are fractions of the octave?

-Igs

--- In tuning-math@yahoogroups.com, Carl Lumma <carl@...> wrote:
>
> Hi Igs- I'll give you the outline and try to code it tonight.
>
> You're supplying N-ET and a chord of the form A_B_C... where
> A is always zero.
>
> First we find the Graham complexity of every generator in the
> ET between 1 and M, where M is floor(N/2).
>
> Floor means 'round down to the nearest whole number'.
>
> For each of the steps in the ET between 1 and M, you chain them
> until you generate the entire ET (subtract ET every time you
> exceed ET).
>
> Next, map A, B, C... on the chain
>
> Next find the N-modular inverse of this map. That just means
> if you have a map (+11 +8) in 12-ET, make it (+1 +4).
>
> Now find the max number in each of the the original and inverse
> maps find the max. So 11 and 4 in this case.
>
> Now take the minimum of those. That's the Graham complexity, G.
> G = 4 in this case.
>
> For a chain of those generators, you get zero chords if the
> chain is shorter than G. For every note you add past G, you
> get one more chord (and its 'minor' inverse, as you know).
>
> So, just select the generator with the smallest G and find
> its MOS series, and select the one of the size you want (it
> must be > G to get a single chord).
>
> -Carl
>
> At 02:08 PM 2/8/2011, you wrote:
> >Here's a math problem for y'all.
> >
> >Let's say I'm working in a specific EDO, and I find a chord--a triad,
> >say--that I really like. Is there a way to quickly figure out what
> >MOS/DE scale within the EDO will give the largest number of desired
> >triads for the fewest number of scale notes?
> >
> >Boy howdy, would I love to be able to do this without having to write
> >out all the MOS scales in each EDO by hand and then count the
> >intervals that show up. Anyone who comes up with something I can turn
> >into a spreadsheet and plug numbers into gets my eternal gratitude.
> >
> >-Igs
> >
> >
>

🔗Carl Lumma <carl@lumma.org>

2/10/2011 7:59:07 PM

I wrote:
>Hi Igs- I'll give you the outline and try to code it tonight.
[snip]

That writeup was almost correct. Anyway, I am hereby unveiling
the Amazing Graham Complexity Tool version 1.0!

http://lumma.org/music/theory/GrahamComplexity.xls

How To Use:

1. Download spreadsheet, open in Excel (tested on version 2003).
2. Enter your chosen ET in the yellow ET box (supports up to 31-ET
presently - let me know if you want this raised).
3. Enter your target chord as ET steps starting with zero (chord
span must be less than an octave).
4. Scan down the complexity column and find the smallest number
there (ignore gray boxes). Read the corresponding generator.
5. Use Scala or other tool to get the MOS series for this generator
and ET. Choose the size you like. Rule:

THE NUMBER OF CHORDS IN YOUR SCALE, AND 'MINOR' INVERSES THEREOF,
IS EQUAL TO THE SCALE SIZE MINUS THE COMPLEXITY.

Example: The chord 0-4-7 in 12-ET has smallest complexity 4, with
generator 5 (or 7). A 7-tone MOS of this generator will therefore
contain 7-4 = 3 of these chords, plus three 0-3-7 inverses.

The chord 0-4-7-10 in 12-ET has smallest complexity 6, with the
same generators. A 7-tone MOS of this generator therefore contains
one "dominant 7th" chord and one "half-diminished 7th" inverse.

Note: Editing this spreadsheet will likely break it.

Please let me know what you think!

-Carl

🔗Carl Lumma <carl@lumma.org>

2/10/2011 8:05:56 PM

Hi Igs,

I just posted a spreadsheet for you.

Note, the algorithm in the post you're replying to here had an
error in it.

I'll have to think about how to extend the spreadsheet to cover
MOS where the interval of equivalence is an octave but the period
isn't. But that will have to wait, as I'm late for a chess
tournament presently.

Tschuss!

-Carl

At 07:57 PM 2/10/2011, you wrote:
>Sounds great, Carl. But how do you calculate the Graham complexity of
>scales whose periods are fractions of the octave?
>
>-Igs
>
>--- In tuning-math@yahoogroups.com, Carl Lumma <carl@...> wrote:
>>
>> Hi Igs- I'll give you the outline and try to code it tonight.
>>
>> You're supplying N-ET and a chord of the form A_B_C... where
>> A is always zero.
>>
[snip]

🔗cityoftheasleep <igliashon@sbcglobal.net>

2/10/2011 9:28:35 PM

CARL YOU ARE THE MAN

This is insanely awesome. If you bump it up to 41-EDO, I'll include a copy with my book (as well as directions for using it and of course due credit!). This is perhaps the single most useful tool I could possibly ask for.

-Igs

--- In tuning-math@yahoogroups.com, Carl Lumma <carl@...> wrote:
>
> I wrote:
> >Hi Igs- I'll give you the outline and try to code it tonight.
> [snip]
>
> That writeup was almost correct. Anyway, I am hereby unveiling
> the Amazing Graham Complexity Tool version 1.0!
>
> http://lumma.org/music/theory/GrahamComplexity.xls
>
> How To Use:
>
> 1. Download spreadsheet, open in Excel (tested on version 2003).
> 2. Enter your chosen ET in the yellow ET box (supports up to 31-ET
> presently - let me know if you want this raised).
> 3. Enter your target chord as ET steps starting with zero (chord
> span must be less than an octave).
> 4. Scan down the complexity column and find the smallest number
> there (ignore gray boxes). Read the corresponding generator.
> 5. Use Scala or other tool to get the MOS series for this generator
> and ET. Choose the size you like. Rule:
>
> THE NUMBER OF CHORDS IN YOUR SCALE, AND 'MINOR' INVERSES THEREOF,
> IS EQUAL TO THE SCALE SIZE MINUS THE COMPLEXITY.
>
> Example: The chord 0-4-7 in 12-ET has smallest complexity 4, with
> generator 5 (or 7). A 7-tone MOS of this generator will therefore
> contain 7-4 = 3 of these chords, plus three 0-3-7 inverses.
>
> The chord 0-4-7-10 in 12-ET has smallest complexity 6, with the
> same generators. A 7-tone MOS of this generator therefore contains
> one "dominant 7th" chord and one "half-diminished 7th" inverse.
>
> Note: Editing this spreadsheet will likely break it.
>
> Please let me know what you think!
>
> -Carl
>

🔗cityoftheasleep <igliashon@sbcglobal.net>

2/10/2011 9:30:06 PM

And if you can figure out how to extend it to fractional-octave-period MOS scales, I might have to actually give you a real physical trophy...or at least a plaque or something.

-Igs

--- In tuning-math@yahoogroups.com, Carl Lumma <carl@...> wrote:
>
> Hi Igs,
>
> I just posted a spreadsheet for you.
>
> Note, the algorithm in the post you're replying to here had an
> error in it.
>
> I'll have to think about how to extend the spreadsheet to cover
> MOS where the interval of equivalence is an octave but the period
> isn't. But that will have to wait, as I'm late for a chess
> tournament presently.
>
> Tschuss!
>
> -Carl
>
> At 07:57 PM 2/10/2011, you wrote:
> >Sounds great, Carl. But how do you calculate the Graham complexity of
> >scales whose periods are fractions of the octave?
> >
> >-Igs
> >
> >--- In tuning-math@yahoogroups.com, Carl Lumma <carl@> wrote:
> >>
> >> Hi Igs- I'll give you the outline and try to code it tonight.
> >>
> >> You're supplying N-ET and a chord of the form A_B_C... where
> >> A is always zero.
> >>
> [snip]
>

🔗Mike Battaglia <battaglia01@gmail.com>

2/10/2011 9:40:04 PM

On Wed, Feb 9, 2011 at 3:03 PM, Carl Lumma <carl@lumma.org> wrote:
>
> Next, map A, B, C... on the chain

What do you mean by map A, B, C on the chain? You mean just assign
sensible ratios to them, mapping in that sense, and hence tempering as
you go?

> Next find the N-modular inverse of this map. That just means
> if you have a map (+11 +8) in 12-ET, make it (+1 +4).

I'm unfamiliar with this terminology - in what sense is (+11 +8) a map?

-Mike

🔗cityoftheasleep <igliashon@sbcglobal.net>

2/10/2011 10:14:56 PM

--- In tuning-math@yahoogroups.com, Mike Battaglia <battaglia01@...> wrote:
>
> On Wed, Feb 9, 2011 at 3:03 PM, Carl Lumma <carl@...> wrote:
> >
> > Next, map A, B, C... on the chain
>
> What do you mean by map A, B, C on the chain? You mean just assign
> sensible ratios to them, mapping in that sense, and hence tempering as
> you go?

He means, figure out how many iterations of the generator it takes to reach A, B, and C. So if you're in 12-tET, and A=0, B=4, and C=7 (i.e. a major triad), and you're running a generator of 7 steps, it will take 0 generators to get to A, 1 generator to get to C, and 4 generators to get to B.

-Igs

🔗Mike Battaglia <battaglia01@gmail.com>

2/10/2011 10:17:19 PM

On Fri, Feb 11, 2011 at 1:14 AM, cityoftheasleep
<igliashon@sbcglobal.net> wrote:
>
> > What do you mean by map A, B, C on the chain? You mean just assign
> > sensible ratios to them, mapping in that sense, and hence tempering as
> > you go?
>
> He means, figure out how many iterations of the generator it takes to reach A, B, and C. So if you're in 12-tET, and A=0, B=4, and C=7 (i.e. a major triad), and you're running a generator of 7 steps, it will take 0 generators to get to A, 1 generator to get to C, and 4 generators to get to B.
>
> -Igs

Oh, duh. I don't know why the first time I read that it seemed so convoluted.

-Mike

🔗Graham Breed <gbreed@gmail.com>

2/10/2011 11:24:30 PM

"cityoftheasleep" <igliashon@sbcglobal.net> wrote:
> Here's a math problem for y'all.
>
> Let's say I'm working in a specific EDO, and I find a
> chord--a triad, say--that I really like. Is there a way
> to quickly figure out what MOS/DE scale within the EDO
> will give the largest number of desired triads for the
> fewest number of scale notes?

It looks like "try everything on a computer and see what
works best" is the answer. You can choose the generators,
as has been suggested. You can't choose maximally even
subsets because you want everything MOS/DE. You could try
choosing other equal temperaments to pair off but I think
that'd bring you back to maximally even scales.

What I have is code in Python to find generators that
minimize both optimal error and complexity given weighted
prime-limit measures. And it's amazingly complicated,
partly because different errors and complexities are
pluggable, although there still isn't a plug for odd-limit
complexity.

> Boy howdy, would I love to be able to do this without
> having to write out all the MOS scales in each EDO by
> hand and then count the intervals that show up. Anyone
> who comes up with something I can turn into a spreadsheet
> and plug numbers into gets my eternal gratitude.

I don't know about a spreadsheet because of the recursion.
Let's leave Carl to it.

The trick for periods that divide the octave is to choose
all possible generators, and make it a period division when
they have a common factor. That means the generators Carl
defined are all you need. Unless you want zero-step
generators. Such would give you a subset equal
temperament. You could well say that an equal temperament
isn't MOS/DE.

Graham

🔗Carl Lumma <carl@lumma.org>

2/10/2011 11:38:52 PM

Hi Graham,

>The trick for periods that divide the octave is to choose
>all possible generators, and make it a period division when
>they have a common factor. That means the generators Carl
>defined are all you need. Unless you want zero-step
>generators. Such would give you a subset equal
>temperament. You could well say that an equal temperament
>isn't MOS/DE.
>

Can you give a little more detail about this trick? I'm
not quite tracking you... thanks, -Carl

🔗Graham Breed <gbreed@gmail.com>

2/10/2011 11:53:57 PM

Carl Lumma <carl@lumma.org> wrote:
> Hi Graham,
>
> >The trick for periods that divide the octave is to choose
> >all possible generators, and make it a period division
> >when they have a common factor. That means the
> >generators Carl defined are all you need. Unless you
> >want zero-step generators. Such would give you a subset
> >equal temperament. You could well say that an equal
> >temperament isn't MOS/DE.
> >
>
> Can you give a little more detail about this trick? I'm
> not quite tracking you... thanks, -Carl

You're looping over generators from 1 to floor(N/2)
(which is correct in this context). Call this d. Then you
take hcf(N, d) as the division of the octave so the period
is N/hcf(N,d). The new generator is d/hcf(N, d). This way
you cover every possible period/generator pair.

Graham

🔗Mike Battaglia <battaglia01@gmail.com>

2/10/2011 11:59:01 PM

On Fri, Feb 11, 2011 at 12:40 AM, Mike Battaglia <battaglia01@gmail.com> wrote:
>
>> Next find the N-modular inverse of this map. That just means
>> if you have a map (+11 +8) in 12-ET, make it (+1 +4).
>
> I'm unfamiliar with this terminology - in what sense is (+11 +8) a map?

Still unsure about this, though, if someone could clarify. What does
(+11 +8) refer to here - what are the two coordinates? 11 iterations
of whatever generator you're working with, and then 8 iterations of
the same generator? Why are the numbers paired, and what does their
pairing denote?

-Mike

🔗Carl Lumma <carl@lumma.org>

2/11/2011 12:37:08 AM

Mike wrote:
>>> Next find the N-modular inverse of this map. That just means
>>> if you have a map (+11 +8) in 12-ET, make it (+1 +4).
>>
>> I'm unfamiliar with this terminology - in what sense is (+11 +8) a map?
>
>Still unsure about this, though, if someone could clarify. What does
>(+11 +8) refer to here - what are the two coordinates? 11 iterations
>of whatever generator you're working with, and then 8 iterations of
>the same generator? Why are the numbers paired, and what does their
>pairing denote?

These are just vals. There's only one because Igs asked about ETs.
Don't worry too much about it since this particular step is wrong.

-Carl

🔗Carl Lumma <carl@lumma.org>

2/11/2011 12:42:46 AM

Graham wrote:
>>
>> >The trick for periods that divide the octave is to choose
>> >all possible generators, and make it a period division
>> >when they have a common factor. That means the
>> >generators Carl defined are all you need. Unless you
>> >want zero-step generators. Such would give you a subset
>> >equal temperament. You could well say that an equal
>> >temperament isn't MOS/DE.
>>
>> Can you give a little more detail about this trick? I'm
>> not quite tracking you... thanks, -Carl
>
>You're looping over generators from 1 to floor(N/2)
>(which is correct in this context). Call this d. Then you
>take hcf(N, d) as the division of the octave so the period
>is N/hcf(N,d). The new generator is d/hcf(N, d). This way
>you cover every possible period/generator pair.
>

I think I got it, thanks!

-Carl

🔗Mike Battaglia <battaglia01@gmail.com>

2/11/2011 12:59:05 AM

On Fri, Feb 11, 2011 at 3:37 AM, Carl Lumma <carl@lumma.org> wrote:
>
> These are just vals. There's only one because Igs asked about ETs.
> Don't worry too much about it since this particular step is wrong.

Alright, so summing this up, if I have this right:

- Intuitively speaking, the Graham complexity for an interval n/d and
a generator g is the shortest number of generators it takes you to hit
n/d, either up or down (whichever is shorter).
- Igs wanted to know about the MOS's that would give him the most bang
for his buck in some ET, so you suggested just finding the Graham
complexity of all of the notes involved whatever his target chord was,
and then picking the MOS that had the lowest complexity and hence the
most repetitions of that chord.

Right? Simple.

-Mike

🔗Carl Lumma <carl@lumma.org>

2/11/2011 1:05:37 AM

Mike wrote:

>> These are just vals. There's only one because Igs asked about ETs.
>> Don't worry too much about it since this particular step is wrong.
>
>Alright, so summing this up, if I have this right:
>
>- Intuitively speaking, the Graham complexity for an interval n/d and
>a generator g is the shortest number of generators it takes you to hit
>n/d, either up or down (whichever is shorter).
>- Igs wanted to know about the MOS's that would give him the most bang
>for his buck in some ET, so you suggested just finding the Graham
>complexity of all of the notes involved whatever his target chord was,
>and then picking the MOS that had the lowest complexity and hence the
>most repetitions of that chord.
>
>Right? Simple.

Yep. See also: the spreadsheet. -Carl

🔗Mike Battaglia <battaglia01@gmail.com>

2/11/2011 1:18:29 AM

On Fri, Feb 11, 2011 at 4:05 AM, Carl Lumma <carl@lumma.org> wrote:
>
> Yep. See also: the spreadsheet. -Carl

That's really one hell of a spreadsheet. Wow. Excellent work. Very
useful for my recent 4:7:9:11 obsession, for which machine continues
to dominate the charts.

-Mike

🔗Mike Battaglia <battaglia01@gmail.com>

2/11/2011 1:23:11 AM

Although I have to say, I'm not sure why I'm getting different results
when plugging 4:7:9:11 in for 11-tet than I do with 22-tet. Instead of
aiming for 4:7:9:11, I aim instead for the octave equivalent version,
which is 8:9:11:14, because it seems to work better. 8:9:11:14 is
0-2-5-9 in 11-tet, and 0-4-10-18 in 22-tet. But for 11-tet, a
generator of 2 gives me complexity 4, but a corresponding generator of
4 in 22-tet gives me complexity 10. Since 4:7:9:11 exists effectively
in one of the 11-tet chains of 22-tet, I would expect their complexity
to be the same. Am I doing something wrong here?

-Mike

On Fri, Feb 11, 2011 at 4:18 AM, Mike Battaglia <battaglia01@gmail.com> wrote:
> On Fri, Feb 11, 2011 at 4:05 AM, Carl Lumma <carl@lumma.org> wrote:
>>
>> Yep. See also: the spreadsheet. -Carl
>
> That's really one hell of a spreadsheet. Wow. Excellent work. Very
> useful for my recent 4:7:9:11 obsession, for which machine continues
> to dominate the charts.
>
> -Mike
>

🔗Carl Lumma <carl@lumma.org>

2/12/2011 12:04:10 AM

Hi Mike, thanks for testing.

>Although I have to say, I'm not sure why I'm getting different results
>when plugging 4:7:9:11 in for 11-tet than I do with 22-tet.

Howto states chord span must be less than an octave.

>Instead of
>aiming for 4:7:9:11, I aim instead for the octave equivalent version,
>which is 8:9:11:14, because it seems to work better. 8:9:11:14 is
>0-2-5-9 in 11-tet, and 0-4-10-18 in 22-tet. But for 11-tet, a
>generator of 2 gives me complexity 4, but a corresponding generator of
>4 in 22-tet gives me complexity 10.

4\22 should be grayed out -- read the Howto.

-Carl

🔗Carl Lumma <carl@lumma.org>

2/12/2011 12:07:13 AM

Mike wrote:
>That's really one hell of a spreadsheet. Wow. Excellent work. Very
>useful for my recent 4:7:9:11 obsession, for which machine continues
>to dominate the charts.

It's peanuts next to some of the stuff I made for Apple.
But when it comes to spreadsheets, there's just no touching
the Stereo Dekany (Keenan et al).

-Carl

🔗kleisma <manuel.op.de.coul@eon-benelux.com>

2/24/2011 1:45:28 PM

Scala can now do it in version 2.30e. The command is "show generator".
There are two buttons for it in the Approximate:ET approximation dialog. Note that the values given are one higher than the complexity Carl mentioned, because I preferred to show the number of notes required.

Manuel

--- In tuning-math@yahoogroups.com, "cityoftheasleep" <igliashon@...> wrote:
>
> Here's a math problem for y'all.
>
> Let's say I'm working in a specific EDO, and I find a chord--a triad, say--that I really like. Is there a way to quickly figure out what MOS/DE scale within the EDO will give the largest number of desired triads for the fewest number of scale notes?
>
> Boy howdy, would I love to be able to do this without having to write out all the MOS scales in each EDO by hand and then count the intervals that show up. Anyone who comes up with something I can turn into a spreadsheet and plug numbers into gets my eternal gratitude.
>
> -Igs

🔗genewardsmith <genewardsmith@sbcglobal.net>

2/24/2011 6:03:14 PM

--- In tuning-math@yahoogroups.com, "kleisma" <manuel.op.de.coul@...> wrote:
>
> Scala can now do it in version 2.30e. The command is "show generator".
> There are two buttons for it in the Approximate:ET approximation dialog. Note that the values given are one higher than the complexity Carl mentioned, because I preferred to show the number of notes required.

This solves a problem which sometimes comes up: you have a JI scale, and an edo, and you want the most efficient generated scale which contains the given scale. Also works for chords if they are inputted as scales, which closely relates to Ig's problem. If you start from an otonal chord consisting of primes only up to your prime limit, this tells you in effect the most efficient rank two temperament supported by the edo for that limit, under the presumption that the patent val is being used. If you dispense with the restriction to primes, if I am understanding this right you might lose consistency, which is not necessarily bad.

🔗kleisma <manuel.op.de.coul@eon-benelux.com>

2/25/2011 1:10:39 PM

Yes that's right, but I've just added the option to do it consistently with the patent val: "show/consistent generators", can also be combined with /best. The dialog is also updated.

Manuel

--- In tuning-math@yahoogroups.com, "genewardsmith" <genewardsmith@...> wrote:
>
> This solves a problem which sometimes comes up: you have a JI scale, and an edo, and you want the most efficient generated scale which contains the given scale. Also works for chords if they are inputted as scales, which closely relates to Ig's problem. If you start from an otonal chord consisting of primes only up to your prime limit, this tells you in effect the most efficient rank two temperament supported by the edo for that limit, under the presumption that the patent val is being used. If you dispense with the restriction to primes, if I am understanding this right you might lose consistency, which is not necessarily bad.