Sort Scales

=Sort scales or arpeggios list=

This is background information for. See the help for to get started.

Exceptions
If you choose to sort the scale descriptions by any other method except alphabetical, it's assumed you want to apply the sort methods to the definitions rather than the description.

So e.g. you could sort the scales alphabetically by the descriptions, and then according to the number of notes all in one go.

Some of the sort methods refer to ratios - these of course have no meaning for arpeggio definitions, - if you sort the arpeggios by the number of superparticular intervals, or the max factor for ratios, that will be ignored.

Complete list of codes you can use
Sort methods:

= number of notes, = smallest steps,  = largest superparticular intervals,  = no. of superpart. ints, = alphabetic / numeric order for descriptions,  = alphabetic / numeric order applied to the definitions rather than the descr.,  = max factor for ratios. = sort by whether a scale has equal numbers of interval sizes in each interval class.

Options that affect the sort.

prefix to reverse sort, to sort normally, to order normally, to reverse order, to apply to 2nd part of sort token pair, to seach beyond octave for superparticular intervals.

These apply to all the options following them in the token - see examples below.

= skip details for some options, = show number of step sizes.

Details:
The lists are sorted by making a sort token for each entry, then sorting those alphanumerically. This can give you useful information about the results of the searches, so will be described here in some detail.

Look at the list to see these tokens. If you select an entry in the list, the corresponding scale will be selected in the main window.

A typical entry might be

That means, the sort method used was, and the scale has 17 notes, and was the 22nd entry in the list before sorting.

Other sort methods are

= smallest steps first

typical entry:

This means it had 5 intervals of size 1.01364 and 12 of size 1.05350, and was the 22nd entry before sorting. This is shown in decimal notation - where 1.5 means 3/2 - it happens to be a useful notation for making sort tokens if you want to use them to sort intervals by size.

= most superparticular intervals first.

typical entry:

That means, it had 31 superparticular intervals.

= alphanumeric ordering of the entries.

typical entry:

= largest superparticular intervals first - looks for any intervals between any pairs of notes in the scale.

typical entry:

The numbers shown are the denominators.

So it had 7 s, 11 s, and 13 s

If you look at it in SCALA, you will see that the 17 tone Arabic Pythagorean scale has 16 s - all except one of the fifths is pure. However the ' ' search is only for intervals within the scale, and doesn't take account of the octave repeat.

To search beyond the octave, add an the

The only applies to entries after it. With this modification we get the expected result.

Search:

typical entry:

Use if you want to switch the option off again later in the token.

= sort by whether a scale has equal numbers of interval sizes in each interval class; if so, order by the number of interval sizes per class.

Typical entry:

This means that the Arabic Pythagorean scale has 2 interval sizes for each interval class.

A scale that has two interval sizes in each class is known as Myhill. If it has three sizes, it can be called trivalent.

If the number of interval sizes in each class is the same as the number of notes in the scale, an = is added:

This is the Xylophone from West Africa - there are no two intervals the same size in any of the classes. It follows that there are no two intervals the same size in any of the classes.

Such scales are very common, and this is not a particularly special property of a scale. Adding an = for these scales means that they are all sorted together, so you can ignore them easily if of no interest.

Sometimes, a trivalent scale, say, can have just three interval sizes, but one of them can be made up in different ways from smaller intervals within the scale.

For these, sorts by number of duplicated intervals.

E.g. for this 6 note trivalent mode in 20-et (by Dan Stearn):

2 4 3 3 4 4 S L M M L L

with intervals LL LM MM LS = 8 7 6 6 LLM LLS LMM LMS = 11 10 10 9

Although there are apparently four types of interval rather than three in these classes, it is trivalent because LS = MM and LLS = LMM.

This will be listed as having four duplicated intervals (the ones shown, and their complements).

For the scales with an even number of notes, another distinguishing feature is whether or not the scale includes its midpoint as an interval (i.e. the tritone for octave repeating scales).

If it does, it will have m added after the first number.

= skip some of the details for some options. In particular, leaves out the interval size tokens.

So to take an example, if used with, as , it sorts the scales according to the number of the smallest step size for the scale. For instance, all the scales that have two steps in the smallest step size will be grouped together, whatever the actual sizes of the steps.

Amongst those with the same number of smallest steps irrespective of the size, sorts by number of next smallest step size, and so on.

= include token for the total number of distinct step sizes before the interval results. Result is, all scales with same number of step sizes will be grouped together.

and apply to, , and.

Resolution used for the step sizes when counting how many there are of each size: two steps are treated as identical if when expressed in decimal format (1.25 for 5/4 etc) they differ by at most 0.00001 = between 0.0173 and 0.01 cents depending on step size.

You can change the resolution using the % sign:

to use coarser resolution of about 1.73 cents. As usual, applies to sort tokens that follow it in the expression.

Reverse sort
You can use ' ' to reverse sort. This works by subtracting all the numbers from 1000 (for ' ', it replaces by, by , and so on, and ' ' by ' ', ' ' by ' ' and so on, so it reverse sorts within letters, or numbers, but keeps the numbers before the letters). It applies to all tokens that follow, until a ' ' is encountered.

So for example will sort by most notes first, then by largest steps first, but then because of the, will sort alphabetically rather than in the reversed alphabetic order.

To sort the descriptions for that search, choose " for the box. The options which make no sense for a description such as the number of notes will be applied to the definition instead, whatever your selection. So you can do mixed sorts in this way, e.g. by number of notes, then alphanumercially by description.

typical entry:

The intervals, and numbers of notes have all been subtracted from 1000. For instance, the 983 is 1000-17 for the number of notes.

You can use ' ' to apply what follows to the second half of the next token only.

For instance: will apply the ' ' to the second half of the ' ' token only, replacing an entry like with

typical entry:

This is a useful option because it shows the scales with the largest superparticular intervals first, and amongst ones with the same largest superparticular interval, the ones with most instances of it first.

Combine it with ' ' as: and you have the scales with the most superparticular intervals first, then of those, the ones with the largest ones first, and amongst those, the ones with most of the largest ones first.

For the options ' ' and ' ', which produce lists of several numbers, you can use ' ' or ' ' to change the order in which they are shown.

The standard setting is ' '

For instance: to show scales with smallest maximum size of step first

typical entry:

You can search the mode / arpeggio list in the same way.

Some of the modes lists, the ones linked to the original list of scales, were sorted using:

typical entry:

This shows least numbers of notes first, smallest steps first, and amongst those, the ones with most of the smallest steps first.

This one had 7 notes, 2 one note steps, and 5 two note steps. In fact, it was the diatonic major scale, steps 2 2 1 2 2 2 1.