# A Study of Scales

Where we discuss every possible combination of notes

This exploration of scales is based on work by William Zeitler1. In fact much of the material on this page repeats Zeitler's findings, presented here along with additional observations and/or PHP code used to generate the scales. This exploration also owes a debt to Andrew Duncan's work on combinatorial music theory2. Most of the code in this treatise is the result of continuous exploration and development of PHPMusicTools, an open-source project at GitHub. The section related to scale-chord relationships is indebted to Enrico Dell'Aquila, and his video about Mode Colours

## Assumptions

This exploration of scales is based in a musical universe founded on two assumptions:

• Octave Equivalence
We assume that for the purpose of defining a scale, a pitch is functionally equivalent to another pitch separated by an octave. So it follows that if you're playing a scale in one octave, if you continue the pattern into the next octave you will play pitches with the same name.

• 12 tone equal temperament
We're using the 12 tones of an equally-tempered tuning system, as you'd find on a piano. Equal temperament asserts that the perceptual (or functional) relationship between two pitches is the same as the relationship between two other pitches with the same chromatic interval distance. Other tuning systems have the notion of scales, but they're not being considered in this study.

## Representing a scale

When I began piano lessons as a child, I learned that a scale was made up of whole- and half-steps. The scale was essentially a stack of intervals piled up, that happened to add up to an octave. While this view of the scale is useful for understanding diatonic melodies, it's not a convenient paradigm for analysis. Instead, we should regard a scale as being a set of 12 possibilities, and each one is either on or off.

The major scale, in lights.

What we have in the 12-tone system is a binary "word" made of 12 bits. We can assign one bit to each degree of the chromatic scale, and use the power of binary arithmetic and logic to do some pretty awesome analysis with them. When represented as bits it reads from right to left - the lowest bit is the root, and each bit going from right to left ascends by one semitone.

The total number of possible combinations of on and off bits is called the "power set". The number of sets in a power set of size n is (2^n). Using a word of 12 bits, the power set (2^12) is equal to 4096. The fun thing about binary power sets is that we can produce every possible combination, by merely invoking the integers from 0 (no tones) to 4095 (all 12 tones).

This means that every possible combination of tones in the 12-tone set can be represented by a number between 0 and 4095. We don't need to remember the fancy names like "phrygian", we can just call it scale number 1451. Convenient!

```\$allscales = range(0, 4095); ```
decimalbinary
0 000000000000 no notes in the scale
1 000000000001 just the root tone
1365 010101010101 whole tone scale
2741 101010110101 major scale
4095 111111111111 chromatic scale

An important concept here is that any set of tones can be represented by a number. This number is not "ordinal" - it's not merely describing the position of the set in an indexed scheme; it's also not "cardinal" because it's not describing an amount of something. This is a nominal number because the number *is* the scale. You can do binary arithmetic with it, and you are adding and subtracting scales with no need to convert the scale into some other representation.

## Scale Finder

Binary:
Decimal:

Because scales are cyclical - they repeat and continue beyond a single octave - it is intuitive to represent them in "bracelet" notation. This visual representation is useful because it helps conceptualize modes and rotation (which we'll get into further below).

Here is the major scale, represented as a bracelet. Black beads are on bits, white beads are off bits.

If you imagine the bracelet with clock numbers, the topmost bead - at 12 o'clock - is the root, or 1st degree of the scale. Beware that in some of the math, this is the "0" position, as if we're counting semitones above the root. To play a scale ascending, start from the top and move around it clockwise. To play the scale descending, start at 12 o'clock and go around counterclockwise.

### Interval Pattern

Another popular way of representing a scale is by its interval pattern. When I was learning the major scale, I was taught to say aloud: "tone, tone, semitone, tone, tone, tone, semitone". Many music theorists like to represent a scale this way because it's accurate and easy to understand: "TTSTTTS". Having a scale's interval pattern has merit as an intermediary step can make some kinds of analysis simpler. Expressed numerically - which is more convenient for computation - the major scale is [2,2,1,2,2,2,1].

### Pitch Class Sets

Yet another way to represent a scale is as a "pitch class set", where the tones are assigned numbers 0 to 11 (sometimes using "T" and "E" for 10 and 11), and the set enumerates the ones present in the scale. A pitch class set for the major scale is notated like this: {0,2,4,5,7,9,11}. The "scales" we'll study here are a subset of Pitch Classes (ie those that have a root, and obey Zeitler's Rules3) and we can use many of the same mathematical tricks to manipulate them.

## What is a scale?

Or more importantly, what is *not* a scale?

Now that we have the superset of all possible sets of tones, we can whittle it down to exclude ones that we don't consider to be a legitimate "scale". We can do this with just two rules.

• #### A scale starts on the root tone.

This means any set of notes that doesn't have that first bit turned on is not eligible to be called a scale. This cuts our power set in exactly half, leaving 2048 sets.

In binary, it's easy to see that the first bit is on or off. In decimal, you can easily tell this by whether the number is odd or even. All even numbers have the first bit off; therefore all scales are represented by an odd number.

We could have cut some corners in our discussion of scales by omitting the root tone (always assumed to be on) to work with 11 bits instead of 12, but there are compelling reasons for keeping the 12-bit number for our scales, such as simplifying the analysis of symmetry, simplifying the calculation of modes, and performing analysis of sonorities that do not include the root, where an even number is appropriate.

```function hasRootTone(\$scale) { // returns true if the first bit is not a zero return (1 & \$scale) != 0; } \$allscales = array_filter(\$allscales, 'hasRootTone'); ```

scales remaining: 2048

• #### A scale does not have any leaps greater than n semitones.

For the purposes of this exercise we are saying n = 4, a.k.a. a major third. Any collection of tones that has an interval greater than a major third is not considered a "scale". This configuration is consistent with Zeitler's constant used to generate his comprehensive list of scales.

```function doesNotHaveFourConsecutiveOffBits(\$scale) { \$c = 0; for (\$i=0; \$i<12; \$i++) { if (!(\$scale & (1 << (\$i)))) { \$c++; if (\$c >= 4) { return false; } } else { \$c = 0; } } return true; } \$allscales = array_filter(\$allscales, 'doesNotHaveFourConsecutiveOffBits'); ```

scales remaining: 1490

Now that we've whittled our set of tones to only the ones we'd call a "scale", let's count how many there are with each number of tones.

```function countOnBits(\$scale) { \$c = 0; for (\$i=0; \$i<12; \$i++) { if (\$scale & (1 << (\$i))) { \$c++; } } return \$c; } ```
number of tones how many scales
10
20
31
431
5155
6336
7413
8322
9165
1055
1111
121

## Heptatonics

The equal temperament system of 12 tones has a special affinity for heptatonic scales. Of the 1490 scales, 413 of them are heptatonic, comprising 28% of the total. The predominant scales used in popular music are heptatonic, including those derived most closely from the circle of fifths.

Some heptatonics are diatonic. To be diatonic means that it includes only notes in the prevailing key; so the set of diatonic scales are very limited to just the major scale and its 6 modes - and only when used in a context where the modes are offset in respect to the tonic key.

(coming soon)

## Symmetry

There are two kinds of symmetry of interest to scale analysis. They are rotational symmetry and reflective symmetry.

### Rotational Symmetry

Rotational symmetry is the symmetry that occurs by transposing a scale up or down by an interval, and observing whether the transposition and the original have an identical pattern of steps.

The set of 12 tones has 5 axes of symmetry. The twelve can be divided by 1, 2, 3, 4, and 6.

Any scale containing this kind of symmetry can reproduce its own tones by transposition, and is also called a "mode of limited transposition" (Messaien)

```function symmetries(\$scale) { \$rotateme = \$scale; \$symmetries = array(); for (\$i = 0; \$i < 12; \$i++) { \$rotateme = rotate_bitmask(\$rotateme); if (\$rotateme == \$scale) { \$symmetries[] = \$i; } } return \$symmetries; } ```

Below are all the scales that have rotational symmetry.

axes of symmetryinterval of repetitionscales
1,2,3,4,5,6,7,8,9,10,11 semitone
2,4,6,8,10 whole tone
3,6,9 minor thirds
4,8 major thirds
6 tritones

number of notes in scale Placement of rotational symmetries
1234567891011
300010001000
400100300100
500000000000
6010301003010
700000000000
8002001000200
900030003000
1000000500000
1100000000000
1211111111111

### A curious numeric pattern

You'll notice that in the list of scales exhibiting rotational symmetry, many have a decimal representation that ends with the digit 5. A closer look shows that the pattern exists for all scales that have symmetry on axes of 6, 4, and 2 - where all the notes in the scale are in pairs a tritone apart. In the binary schema, each pair of notes that are a tritone apart add up to a multiple of 10, except for the root pair that adds up to 65. Therefore, all scales with rotational symmetry on the tritone will end with the digit 5.

1 + 64
= 65

2 + 128
= 130

4 + 256
= 260

8 + 512
= 520

16 + 1024
= 1040

32 + 2048
= 2080

### Messiaen's Modes - and their truncations

The French composer Messiaen studied scales with rotational symmetry, because they are useful in creating sonorities with an ambiguous tonic. He famously named seven such modes, and asserted that they are the only ones that may exist; all other symmetrical scales are truncations of those. We can prove that Messiaen was correct, by putting every symmetrical scale into a chart of their truncation relationships.

In all of Messiaen's modes, the modes are regarded as identical, which makes sense because the whole point was to create ambiguous tonality. Therefore when we speak of one of the Messiaenic modes, we're talking about a whole modal family of scales, like this one which he labeled Mode 7:

Truncation is the process of removing notes from a scale, without affecting its symmetry. The concept is best explained by example. Let's take the mode which Messiaen called the Second Mode:

That scale is symmetrical along the axis of a 3-semitone interval, i.e. by transposing it up a minor third. When we remove tones to create a truncation, we must preserve that symmetry, by removing four notes from the scale, like this:

In addition to the 3-semitone symmetry, that scale is also symmetrical along the axis of a 6-semitone interval. We can create two different truncations of that preserve that symmetry:

Technically, all of Messiaen's modes are truncated forms of , the 12-tone scale, which is symmetrical at all intervals.

### Hierarchy of truncations

This diagram illustrates that all symmetrical scales are truncations of the Messaienic modes (labeled "M" plus their number as assigned by Messaien). M1, M2, M3, and M7 are all truncations of the chromatic scale 4095; M2, M4, and M6 are truncations of M7; M1 and M5 are truncaions of M6. M1 is also a truncation of M3, and M5 is also a truncation of M4. All the other rotationally symmetrical scales are labeled "T#" and are shown where they belong in the hierarchy of truncations.

Modal FamilyScalesis truncation of
*

Messiaen's Modes of Limited Transposition
M1
*, M3, M6
M2 *, M7
M3 *
M4 M7
M5 M6, M4
M6 M7
M7 *
Truncations
T1
M2, T5, T4
T2 M3
T3
M1, T2
T4 M2, M6, M4
T5 M2, M6, M4
T6 T4, T5, M5, M1

### Going Further

• In this study we are ignoring sonorities that aren't like a "scale" by disallowing large interval leaps (see the first section). If we ignore those rules, what other truncated sets exist? (spoiler hint: not very many!)
• Does the naming of certain scales by Messiaen seem haphazard? Why did he name M5, which is merely a truncation of both M6 and M4, which are in turn truncations of M7?

### Reflective Symmetry

A scale can be said to have reflective symmetry if it has the same interval pattern whether ascending or descending. A reflectively symmetrical scale, symmetrical on the axis of the root tone, is called a palindromic scale.

```function isPalindromic(\$scale) { for (\$i=1; \$i<=5; \$i++) { if ( (bool)(\$scale & (1 << \$i)) !== (bool)(\$scale & (1 << (12 - \$i))) ) { return false; } } return true; } ```

Here are all the scales that are palindromic:

### Chirality

An object is chiral if it is distinguishable from its mirror image, and can't be transformed into its mirror image by rotation. Chirality is an important concept in knot theory, and also has applications in molecular chemistry.

The concept of chirality is apparent when you consider "handedness" of a shape, such as a glove. A pair of gloves has a left hand and a right hand, and you can't transform a left glove into a right one by flipping it over or rotating it. The glove, therefore, is a chiral object. Conversely, a sock can be worn by the right or left foot; the mirror image of a sock would still be the same sock. Therefore a sock is not a chiral object.

Palindromic scales are achiral. But not all non-palindromic scales are chiral. For example, consider the scales and (below). One is the mirror image (reflection) of the other. They are not palindromic scales. They are also achiral, because one can transform into the other by rotation.

The major scale is achiral. If you reflect the major scale, you get the phrygian scale; these two scales are modes (rotations) of each other. Therefore neither of them are chiral. Similarly, none of the other ecclesiastical major modes are chiral.

What makes chirality interesting? For one thing chirality indicates that a scale does not have any symmetry along any axis. If you examine all achiral scales, they will all have some axis of reflective symmetry - it's just not necessarily the root tone (which would make it palindromic).

Some achiral scales, and their axes of symmetry
```function isChiral(\$scale) { \$reflected = reflect_bitmask(\$scale); for (\$i = 0; \$i < 12; \$i++) { \$reflected = rotate_bitmask(\$reflected, 1, 1); if (\$reflected == \$scale) { return false; } } return true; } ```

A chiral object and its mirror image are called enantiomorphs. (source) ```function enantiomorph(\$scale) { \$scale = reflect_bitmask(\$scale); \$scale = rotate_bitmask(\$scale, -1, 1); return \$scale; } ```
ScaleNameChirality / Enantiomorph
diminished seventhachiral
pentatonic majorachiral
ultralocrian
pentatonic minorachiral
blues
whole toneachiral
alteredachiral
locrianachiral
half diminishedachiral
major locrianachiral
phrygianachiral
aeolianachiral
phrygian dominant
lydian diminished
lydian minorachiral
bebop locrian
prometheus
locrian natural 6
dorianachiral
mixolydianachiral
bebop dorianachiral
ukranian dorian
acousticachiral
hungarian major
octatonicachiral
hirajoshi
fifth mode of limited transpositionachiral
augmentedachiral
minor neapolitan
harmonic minor
enigmaticachiral
hungarian minorachiral
fourth mode of limited transpositionachiral
major neapolitanachiral
heptatonia secondaachiral
majorachiral
lydianachiral
lydian #2
ionian augmented
lydian augmentedachiral
diminishedachiral
bebop minor
bebop majorachiral
seventh mode of limited transpositionachiral
enigmatic
sixth mode of limited transpositionachiral
third mode of limited transpositionachiral
bebop dominantachiral
chromaticachiral

### Going Further

• Reflective symmetry can occur with an axis on other notes of the scale. Are those interesting?
• The reflection axis can be on a tone, or between two tones. Is that interesting?
• Is there a more optimal or elegant way to find the reflective symmetry axes of a scale?
• Are there chiral enantiomorph pairs that are both named scales?

### Combined Symmetry

Using similar methods to those above, we can identify all the scales that are both palindromic and have rotational symmetry. Here they are:

## Interval Spectrum / Richness / Interval Vector

Howard Hanson, in the book "Harmonic Materials"4, posits that the character of a sonority is defined by the intervals that are within it. This definition is also called an "Interval Vector"5. Furthermore, in his system an interval is equivalent to its inverse, i.e. the sonority of a perfect 5th is the same as the perfect 4th. Hanson categorizes all intervals as being one of six classes, and gives each a letter: p m n s d t, ordered from most consonant (p) to most dissonant (t). When an interval appears more than once in a sonority, it is superscripted with a number, like p2.

P - the Perfects (5 or 7)

This is the interval of a perfect 5th, or perfect 4th.

M - The Major Third (4 or 8)

This is the interval of a major 3rd, or minor 6th

N - The Minor Third (3 or 9)

This is the interval of a minor 3rd, or a major 6th

S - the second (2 or 10)

This is the interval of a major 2nd, or minor 7th

D - the Diminished (1 or 11)

Intervals of a minor 2nd, or a major 7th

T - the Tritone (6 semitones)

For example, in Hanson's analysis, a C major triad has the sonority pmn, because it contains one perfect 5th between the C and G (p), a major third between C and E (m), and a minor third between the E and G (n). Interesting to note that a minor triad of A-C-E is also a pmn sonority, just with the arrangement of the minor and major intervals swapped. The diminished seventh chord has the sonority n4t2 because it contains four different minor thirds, and two tritones.

We can count the appearances of an interval using a method called "cyclic autocorrelation". To find out how many of interval X appear in a scale, we rotate a copy of the scale by X degrees, and then count the number of positions where an "on" bit appears in both the original and copy.

```function find_spectrum(\$scale) { \$spectrum = array(); \$rotateme = \$scale; for (\$i=0; \$i<6; \$i++) { \$rotateme = rotate_bitmask(\$rotateme, \$direction = 1, \$amount = 1); \$spectrum[\$i] = countOnBits(\$scale & \$rotateme); } // special rule: if there is a tritone in the sonority, it will show up twice, so we divide by 2 \$spectrum[5] = \$spectrum[5] / 2; return \$spectrum; } ```

All members of the same modal family will have the same interval spectrum, because the spectrum doesn't care about rotation, and modes are merely rotations of each other. And there will be many examples of different families that have the same interval spectrum - for example, and both have the spectrum "pm3nd", but they are not modes of each other.

Below is a table of some of the named scales, and their interval spectrum. You'll notice that modal families will all have the same spectrum; hence every named mode of the diatonic scale (lydian, dorian, phrygian etc.) has the same spectrum of p6m3n4s5d2t

 273 (augmented triad) m3 585 (diminished seventh) n4t2 661 (pentatonic major) p4mn2s3 859 (ultralocrian) p4m4n5s3d3t2 1193 (pentatonic minor) p4mn2s3 1257 (blues) p4m2n3s3d2t 1365 (whole tone) m6s6t3 1371 (altered) p4m4n4s5d2t2 1387 (locrian) p6m3n4s5d2t 1389 (half diminished) p4m4n4s5d2t2 1397 (major locrian) p2m6n2s6d2t3 1451 (phrygian) p6m3n4s5d2t 1453 (aeolian) p6m3n4s5d2t 1459 (phrygian dominant) p4m4n5s3d3t2 1485 (lydian diminished) p4m5n3s4d3t2 1493 (lydian minor) p2m6n2s6d2t3 1499 (bebop locrian) p5m5n6s5d4t3 1621 (prometheus) p2m4n2s4dt2 1643 (locrian natural 6) p4m4n5s3d3t2 1709 (dorian) p6m3n4s5d2t 1717 (mixolydian) p6m3n4s5d2t 1725 (bebop dorian) p7m4n5s6d4t2 1741 (ukranian dorian) p4m4n5s3d3t2 1749 (acoustic) p4m4n4s5d2t2 1753 (hungarian major) p3m3n6s3d3t3 1755 (octatonic) p4m4n8s4d4t4 2257 (hirajoshi) p3m2nsd2t 2275 (fifth mode of limited transposition) p4m2s2d4t3 2457 (augmented) p3m6n3d3 2475 (minor neapolitan) p4m5n3s4d3t2 2477 (harmonic minor) p4m4n5s3d3t2 2483 (enigmatic) p4m5n4s2d4t2 2509 (hungarian minor) p4m5n4s2d4t2 2535 (fourth mode of limited transposition) p6m4n4s4d6t4 2731 (major neapolitan) p2m6n2s6d2t3 2733 (heptatonia seconda) p4m4n4s5d2t2 2741 (major) p6m3n4s5d2t 2773 (lydian) p6m3n4s5d2t 2777 (lydian #2) p4m4n5s3d3t2 2869 (ionian augmented) p4m4n5s3d3t2 2901 (lydian augmented) p4m4n4s5d2t2 2925 (diminished) p4m4n8s4d4t4 2989 (bebop minor) p5m5n6s5d4t3 2997 (bebop major) p6m5n6s5d4t2 3055 (seventh mode of limited transposition) p8m8n8s8d8t5 3411 (enigmatic) p4m4n3s5d3t2 3445 (sixth mode of limited transposition) p4m6n4s6d4t4 3549 (third mode of limited transposition) p6m9n6s6d6t3 3765 (bebop dominant) p7m4n5s6d4t2 4095 (chromatic) p12m12n12s12d12t6

### Going Further

• Is there an optimal or elegant way to find all scales with a given spectrum?
• What patterns appear in interval distribution?
• Which are the most common, and least common spectra?

## Hemitonia and Tritonia

One interesting approach to understanding scales is to look at the distribution of consonant and dissonant intervals in the scale. We did this already in the "spectrum analysis" above, but two intervals in particular are commonly regarded in more depth: tritones and semitones - which are deemed the most dissonant of intervals, and those that give a scale its spice and flavour.

A scale that contains semitones is called "hemitonic", and we will also refer to a hemitonic as the scale member that has the upper semitone neighbour (for example, mi-fa and ti-do in a major scale, the hemitones are mi and fa).

A scale that contains tritones is called "tritonic", and we will also refer to a tritonic as the scale member that has a tritone above it. This concept seems very close to the notion of "imperfection" (explained below)

Since hemitonia and tritonia are based on the interval spectrum, all the modes of a scale will have the same hemitonia. For example, the major scale is dihemitonic and ancohemitonic; thus so are dorian, phrygian, lydian, etc.

Number of tones# of Hemitonic Scales# of Tritonic Scales
300
41224
5140150
6335335
7413413
8322322
9165165
105555
111111
1211

It's well to know that so many scales are hemitonic and tritonic (having more than zero semitones or tritones), but obviously some scales are more hemitonic than others. A scale could have no hemitonics ("ahemitonic"), one ("unihemitonic"), two ("dihemitonic"), three ("trihemitonic") and so on. Let's look at the count of hemitones in our scales.

Fun fact: there are no scales with 11 hemitones. Do you understand why?

### Cohemitonia

Cohemitonia is the presense of two semitones consecutively in scale order. For instance, if a scale has three cromatically consecutive notes, then it is cohemitonic. We will also refer to the cehemitonic as the tone that has two semitone neighbours above it.

## Modes

There is a lot of confusion about what is a "mode", chiefly because the word is used slightly differently in various contexts.

When we say "C major", the word "major" refers to a specific pattern of whole- and half-steps. The "C" tells us to begin that pattern on the root tone of "C".

Modes are created when you use the same patterns of whole- and half-steps, but you begin on a different step. For instance, the "D Dorian" mode uses all the same notes as C major (the white keys on a piano), but it begins with D. Compared with the Major (also known as "Ionian" mode), the Dorian sounds different, because relative to the root note D, it has a minor third and a minor seventh.

The best way to understand modes is to think of a toy piano where the black keys are just painted on - all you have are the white keys: C D E F G A B. Can you play a song that sounds like it's in a minor key? You can't play a song in C minor, because that would require three flats. So instead you play the song with A as the root (A B C D E F G). That scale is a mode of the major scale, called the Aeolian Mode.

When you play that minor scale, you're not playing "C minor", you're playing the relative minor of C, which is "A minor". Modes are relatives of each other if they have the same pattern of steps, starting on different steps.

To compute a mode of the current scale, we "rotate" all the notes down one semitone. then if the rotated notes have an on bit in the root, then it is a mode of the original scale.

```			101010110101 = 2741 - major scale, "ionian" mode
110101011010 = 3418 - rotated down 1 semitone - not a scale
011010101101 = 1709 - rotated down 2 semitones - "dorian"
101101010110 = 2902 - rotated down 3 semitones - not a scale
010110101011 = 1451 - rotated down 4 semitones - "phrygian"
101011010101 = 2773 - rotated down 5 semitones - "lydian"
110101101010 = 3434 - rotated down 6 semitones - not a scale
011010110101 = 1717 - rotated down 7 semitones - "mixolydian"
101101011010 = 2906 - rotated down 8 semitones - not a scale
010110101101 = 1453 - rotated down 9 semitones - "aeolian"
101011010110 = 2774 - rotated down 10 semitones - not a scale
010101101011 = 1387 - rotated down 11 semitones - "locrian"
```
```function modes(\$scale) { \$rotateme = \$scale; \$modes = array(); for (\$i = 0; \$i < 12; \$i++) { \$rotateme = rotate_bitmask(\$rotateme); if ((\$rotateme & 1) == 0) { continue; } \$modes[] = \$rotateme; } return \$modes; } function rotate_bitmask(\$bits, \$direction = 1, \$amount = 1) { for (\$i = 0; \$i < \$amount; \$i++) { if (\$direction == 1) { \$firstbit = \$bits & 1; \$bits = \$bits >> 1; \$bits = \$bits | (\$firstbit << 11); } else { \$firstbit = \$bits & (1 << 11); \$bits = \$bits << 1; \$bits = \$bits & ~(1 << 12); \$bits = \$bits | (\$firstbit >> 11); } } return \$bits; } ```

When we do this to every scale, we see modal relationships between scales, and we also discover symmetries when a scale is a mode of itself on another degree.

### A complete list of all modal families

#### Modal families with 4 tones

 pm3nd p2m2nd pm3nd m3s2t pmn2st p2mn2s m2s2t2 pmn2st n4t2 585 (diminished seventh)

#### Modal families with 5 tones

 pm3ns2d2t p2m2n2sd2t p2m3n2sd2 p2m2s2d2t2 p2m2n2sd2t pm3ns2d2t p2m3n2sd2 p3m2n2s2d pm3n2s2dt p3mn2s2dt 421 (japenese (b)) 653 (kumoi) 1187 (insen) pmn4sdt2 p2mn3s2dt p3m2nsd2t 397 (hirajoshi) 419 (japanese (a)) 1123 (iwato) 2257 (hirajoshi) pm2n2s2dt2 p2mn3s2dt p2m4n2d2 p2m4n2d2 p2m3ns2dt p2m2n3sdt pm2n2s2dt2 p2m3n2d2t p2m2n3sdt pmn4sdt2 pm3n2s2dt p3m2nsd2t 395 (balinese) p2m3ns2dt p3mn2s2dt p3m2n2s2d m4s4t2 p2m2n2s3t p4mn2s3 661 (pentatonic major) 1189 (egyptian) 1193 (pentatonic minor)

#### Modal families with 6 tones

 p2m3n2s3d4t p3m2n3s3d3t p2m3n3s3d3t p3m2n2s3d3t2 p2m2n4s2d3t2 p2m3n3s3d3t p4m2ns2d4t2 p3m2n2s3d3t2 p3m2n3s3d3t p2m4n3s2d3t p3m4n3s2d3 p2m4ns4d2t2 p3m3n3s3d2t pm4n2s4d2t2 p3m3n2s2d3t2 p4m2n3s3d2t 1257 (blues) p2m2n4s3d2t2 p3m4n2s2d3t pm4n2s4d2t2 p3m3n2s2d3t2 p3m4n3sd3t p3m4n2s2d3t p4m2n2s2d3t2 p4m3n2s3d2t p4m2n3s3d2t p3m4n3sd3t p3m3n3s3d2t p3m4n3s2d3 p4m2s2d4t3 2275 (fifth mode of limited transposition) p4m2n2s2d3t2 p3m3n2s2d3t2 p3m3n2s2d3t2 p2m4ns4d2t2 p2m4n3s2d3t p3m3n3s3d2t p2m2n5s2d2t2 p2m2n4s3d2t2 p3m4n3sd3t p2m3n4s2d2t2 1619 (prometheus neopolitan) p2m2n5s2d2t2 p3m4n3sd3t p3m3n3s3d2t p4m2n3s3d2t p2m3n4s2d2t2 p4m2n3s3d2t p4m3n2s3d2t p2m4n2s4dt2 p4m2n3s4dt p3m4n3s2d2t p5m2n3s4d 1701 (dominant 7th) p2m2n4s2d2t3 1235 (tritone scale) p3m2n4s2d2t2 p3m2n4s2d2t2 p4m2n3s4dt p3m6n3d3 819 (augmented inverse) 2457 (augmented) p3m4n3s2d2t p2m2n4s2d2t3 p2m4n2s4dt2 1621 (prometheus) m6s6t3 1365 (whole tone)

#### Modal families with 7 tones

 p3m4n4s4d5t p3m4n4s4d5t p3m4n3s5d4t2 p3m3n5s4d4t2 p2m4n4s5d4t2 p4m4n3s3d5t2 3271 (mela raghupriya (42)) p4m3n4s4d4t2 3239 (mela tanarupi (6)) p3m3n5s4d4t2 p4m4n3s3d5t2 p3m4n3s5d4t2 p4m3n4s4d4t2 p3m4n5s3d4t2 985 (mela sucharitra (67)) p4m4n4s4d4t p5m3n3s4d4t2 2759 (mela pavani (41)) p4m4n3s5d3t2 981 (mela kantamani (61)) 2727 (mela manavati (5)) 3411 (enigmatic) p5m3n4s5d3t p4m4n4s3d4t2 979 (mela dhavalambari (49)) p5m3n4s5d3t p4m4n4s4d4t p5m3n2s3d5t3 2503 (mela jhalavarali (39)) p4m3n4s3d4t3 973 (mela syamalangi (55)) 2471 (mela ganamurti (3)) 3283 (mela visvambari (54)) p4m4n4s3d4t2 3275 (mela divyamani (48)) p4m3n4s3d4t3 971 (mela gavambodhi (43)) 3251 (mela hatakambari (18)) p4m4n3s5d3t2 3243 (mela rupavati (12)) p3m4n5s3d4t2 p5m3n2s3d5t3 967 (mela salagam (37)) p5m3n3s4d4t2 p4m3n4s4d4t2 p3m5n3s4d4t2 p4m5n4s3d4t 953 (mela yagapriya (31)) p3m5n3s4d4t2 p4m4n4s3d4t2 1735 (mela navanitam (40)) p5m4n4s4d3t 949 (mela mararanjani (25)) 1703 (mela vanaspati (4)) p4m3n5s4d3t2 p4m6n4s2d4t 947 (mela gayakapriya (13)) 2521 (mela dhatuvardhani (69)) p3m5n4s4d3t2 1497 (mela jyotisvarupini (68)) p4m5n4s3d4t p4m4n2s4d4t3 1479 (mela jalarnavam (38)) p5m3n4s4d3t2 941 (mela jhankaradhvani (19)) 1447 (mela ratnangi (2)) 2771 (marva theta) p3m4n4s4d3t3 2763 (mela suvarnangi (47)) p4m5n3s4d3t2 939 (mela senavati (7)) 2517 (mela latangi (63)) 2739 (mela suryakantam (17)) p2m6n2s6d2t3 1397 (major locrian) 1493 (lydian minor) 2731 (major neapolitan) 3413 (leading whole tone) p3m5n4s4d3t2 p5m4n3s3d4t2 935 (mela kanakangi (1)) 2515 (mela kamavarardhani (51)) p3m4n4s4d3t3 1491 (mela namanarayani (50)) p4m3n5s4d3t2 p5m4n3s3d4t2 2419 (persian) 2507 (mela subhapantuvarali (45)) 3257 (mela chalanata (36)) p4m5n4s2d4t2 1651 (oriental (b)) 2483 (enigmatic) 2509 (hungarian minor) 3289 (mela rasikapriya (72)) p4m5n3s4d3t2 1395 (oriental (a)) 1485 (lydian diminished) 2475 (minor neapolitan) 2745 (mela sulini (35)) 3285 (mela chitrambari (66)) p4m6n4s2d4t 2489 (mela gangeyabhusani (33)) 3277 (mela nitimati (60)) p5m3n4s4d3t2 1483 (mela bhavapriya (44)) 1721 (mela vagadhisvari (34)) 3253 (mela naganandini (30)) p5m4n4s4d3t 1465 (mela ragavardhani (32)) 3245 (mela varunapriya (24)) p4m4n4s3d4t2 p3m3n6s3d3t3 1747 (mela ramapriya (52)) p3m3n6s3d3t3 1739 (mela sadvidhamargini (46)) 1753 (hungarian major) p4m4n5s3d3t2 1715 (mela chakravakam (16)) 2485 (mela sarasangi (27)) 2765 (mela dharmavati (59)) p4m4n4s5d2t2 1371 (altered) 1389 (half diminished) 1461 (hindu) 1707 (javanese (pelog)) 1749 (acoustic) 2733 (heptatonia seconda) 2901 (lydian augmented) p4m4n5s3d3t2 859 (ultralocrian) 1459 (phrygian dominant) 1643 (locrian natural 6) 1741 (ukranian dorian) 2477 (harmonic minor) 2777 (lydian #2) 2869 (ionian augmented) p6m3n4s5d2t 1387 (locrian) 1451 (phrygian) 1453 (aeolian) 1709 (dorian) 1717 (mixolydian) 2741 (major) 2773 (lydian)

#### Modal families with 8 tones

 p4m5n5s6d6t2 p4m5n6s5d6t2 p4m5n5s6d6t2 p5m5n5s5d6t2 p5m5n5s6d5t2 p5m4n6s6d5t2 p5m6n5s4d6t2 p5m5n5s6d5t2 p5m5n5s5d6t2 p5m5n4s5d6t3 p5m4n6s5d5t3 p4m5n6s5d5t3 p5m5n5s5d5t3 p4m6n4s7d4t3 p4m5n6s5d5t3 p6m5n4s4d6t3 p5m5n5s5d5t3 p5m4n6s5d5t3 p5m5n4s5d6t3 p6m4n4s5d6t3 p5m5n5s5d5t3 p6m5n5s5d5t2 p5m5n6s4d5t3 2541 (algerian) p6m5n5s6d4t2 1403 (eight tone spanish) 1711 (jewish (adonai malakh)) p5m6n6s4d5t2 p6m5n4s5d5t3 p7m4n5s6d4t2 1725 (bebop dorian) 2805 (japanese (ichikosucho)) 3765 (bebop dominant) p6m5n5s6d4t2 3419 (jewish (magan abot)) p6m5n5s5d5t2 p6m4n4s4d6t4 2535 (fourth mode of limited transposition) p6m5n4s5d5t3 p5m5n6s4d5t3 p5m5n5s5d5t3 p5m7n5s4d5t2 p4m7n4s6d4t3 p5m7n5s4d5t2 p6m6n5s4d5t2 p5m5n6s5d4t3 1499 (bebop locrian) p6m5n6s5d4t2 2997 (bebop major) p4m6n4s6d4t4 3445 (sixth mode of limited transposition) p5m5n6s5d4t3 2989 (bebop minor) p4m4n8s4d4t4 1755 (octatonic) 2925 (diminished)

#### Modal families with 9 tones

 p6m6n6s7d8t3 p6m6n7s7d7t3 p6m6n7s7d7t3 p6m7n7s6d7t3 p6m7n6s8d6t3 p6m7n7s6d7t3 p7m7n6s6d7t3 p7m6n7s7d6t3 p7m6n7s7d6t3 p7m7n6s6d7t3 p7m6n6s6d7t4 p6m7n6s7d6t4 p6m6n8s6d6t4 p6m7n6s7d6t4 p7m6n6s6d7t4 p8m6n6s7d6t3 3829 (japanese (taishikicho)) p7m7n7s6d6t3 3037 (nine tone scale) p7m7n7s6d6t3 p6m9n6s6d6t3 3549 (third mode of limited transposition)

#### Modal families with 10 tones

 p8m8n8s8d9t4 p8m8n8s9d8t4 p8m8n9s8d8t4 p8m9n8s8d8t4 p9m8n8s8d8t4 p8m8n8s8d8t5 3055 (seventh mode of limited transposition)

#### Modal families with 11 tones

 p10m10n10s10d10t5

#### Modal families with 12 tones

 p12m12n12s12d12t6 4095 (chromatic)

## Proximity

We would consider two scales to be "near" each other, if they bear many similarities; sharing many of the same notes, such that it would take few transformations to turn one into the other.

This distance measured by transformation is almost the same thing as a "Levenshtein Distance". The normal definition of a Levenshtein Distance on a string of characters allows three kinds of transformation: insertion, deletion, and substitution. Our scale transformations are different from a string transformation, in that scales can't do substitution, instead we move tones up or down with rules for handling collision. This difference means we can't employ all the elegant formulas bequeathed to us by Vladimir Levenshtein.

We can transform a scale in three ways:

• Move a tone up or down by a semitone
• Remove a tone

It is simple to generate all the scales at a distance of 1, just by performing all possible transformations to every interval above the root.

```function findNearby(\$scale) { \$near = array(); for (\$i=1; \$i<12; \$i++) { if (\$scale & (1 << (\$i))) { \$copy = \$scale; \$off = \$copy ^ 1 << (\$i); \$near[] = \$off; \$copy = \$off | 1 << (\$i - 1); \$near[] = \$copy; if (\$i != 11) { \$copy = \$off | 1 << (\$i + 1); \$near[] = \$copy; } } else { \$copy = \$scale; \$copy = \$copy | 1 << (\$i); \$near[] = \$copy; } } return \$near; } ```

### Example

Here are all the scales that are a distance of 1 from the major scale, aka , shown here as a simple C major scale:

 add a tone at C# lower the D to D♭ 2739 (mela suryakantam (17)) raise the D to D# 2745 (mela sulini (35)) delete the D add a tone at D# lower the E to E♭ 2733 (heptatonia seconda) raise the E to F same as deleting E delete the E lower the F to E same as deleting F raise the F to F# 2773 (lydian) delete the F add a tone at F# 2805 (japanese (ichikosucho)) lower the G to G♭ raise the G to G# 2869 (ionian augmented) delete the G add a tone at G# 2997 (bebop major) lower the A to A♭ 2485 (mela sarasangi (27)) raise the A to A# 3253 (mela naganandini (30)) delete the A add a tone at A# 3765 (bebop dominant) lower the B to B♭ 1717 (mixolydian) raise the B to C same as deleting B delete the B

Evidently since every scale will have a collection of neighbours similar to this one, a complete graph of scale proximity is large, but not unfathomably so.

We can also easily calculate the Levenshtein distance between two scales. Apply an XOR operation to expose changed bits between two scales. Adjacent on bits in the XOR where the bits were different in the original scale identify a "move" operation. Any bits remaining are either an addition or deletion.

```function levenshtein_scale(\$scale1, \$scale2) { \$distance = 0; \$d = \$scale1 ^ \$scale2; for (\$i=0; \$i<12; \$i++) { if ( (\$d & (1 << (\$i))) && (\$d &(1 << (\$i+1))) && (\$scale1 & (1 << (\$i))) != (\$scale1 & (1 << (\$i+1))) ) { \$distance++; \$d = \$d & ( ~ (1 << (\$i))); \$d = \$d & ( ~ (1 << (\$i+1))); } } for (\$i=0; \$i<12; \$i++) { if ((\$d & (1 << (\$i)))) { \$distance++; } } return \$distance; } ```

## Imperfection

Imperfection is a concept invented (so far as I can tell) by William Zeitler, to describe the presence or absense of perfect fifths in the scale tones. Any tone in the scale that does not have the perfect fifth above it represented in the scale is an "imperfect" tone. The number of imperfections is a metric that plausibly correlates with the perception of dissonance in a sonority.

The only scale that has no imperfections is the 12-tone chromatic scale.

This table differs from Zeitler's6, because this script does not de-duplicate modes. If an imperfection exists in a scale, it will also exist in all the sibling modes of that scale. Hence the single imperfect tone in the 11-tone scale is found 11 times (in 11 scales that are all modally related), whereas Zeitler only counts it as one.

number of notes in scale # of Imperfections
0123456
10000000
20000000
30001000
400816700
50530754050
60669146102121
70784196112140
808841686200
9097284000
10010450000
1101100000
121000000

### Going Further

• Looking at the table, there are 5 scales of 5 tones with one imperfection. There are 6 scales of 6 tones with only one imperfection. The same patten continues right up to 11 tones. What causes this pattern?
• The only 7-note scale with only one imperfection is the major diatonic scale (plus all its modes). Is it a coincidence that we find this scale sonically pleasing?

## Negative

One peculiar way we can manipulate a scale is to "flip its bits" -- so that every bit that is on becomes off, and all that were of are turned on. If you flip a scale with a root tone, you will get a non-scale without a root tone; so it's not so useful to speak of negating a scale, instead we negate an entire modal family to find the modal family that is its negative.

For example, one that's easy to conceptualize is the major scale, which (in C) occupies all the white keys on a piano. The negative of the major scale is all the notes that aren't in the major scale - just the black keys, which interestingly have the pattern of a major pentatonic (with F# as the root). In pitch class set theory, the negative of a set is called its "complement", and Dr Forte named complementary pairs with matching numbers.

## Chord Relationships

In the case of heptatonic chords, we can use the stacked-third members of a scale to create a chord. More on this later.

## Glossary

achiral
Not having chirality, i.e. the mirror image can be achieved by rotation.
ancohemitonic
A scale that is not cohemitonic. This either means it contain no semitones (and thus is anhemitonic), or contain semitones (being hemitonic) where none of the semitones appear consecutively in scale order.
anhemitonic
A scale that does not include any semitones
atritonic
containing no tritones
chiral
The quality of being different from ones own mirror-image, in a way that can not be achieved by rotation.
cohemitonic
Cohemitonic scales contain two or more semitones (making them hemitonic) such that two or more of the semitones appear consecutively in scale order. Example: the Hungarian minor scale
dicohemitonic
A scale that contains exactly two semitones consecutively in scale order
dihemitonic
A scale that contains exactly two semitones
enantiomorph
the result of a transformation by reflection, i.e. with its interval pattern reversed
hemitonic
A scale that includes semitones
hepatonic
A scale with seven tones. For example, the major scale is heptatonic.
imperfection
A scale member where the perfect fifth above it is not in the scale
interval pattern
The sequence of semitones, tones, and larger intervals, that describe a scale. For example, a major scale is "T T S T T T S". Expressed numerically, a major scale has the interval pattern [2,2,1,2,2,2]; the final interval is implied.
interval spectrum
A signature invented by Howard Hanson, describing all the intervals that can be found in a sonority
octatonic
A scale with eight tones.
palindromic
A scale that has the same interval pattern forward and backward.
pentatonic
A scale with five tones
proximity
The number of transformations required to change one scale into another
root
The lowest tone of the scale, signifying the tone upon which all others are measured as an interval above
scale
A set of tones starting on a root, contained within one octave, having no more than a major third leap
sonority
The whole of a sound, comprised of all component tones
symmetry
Having the ability to transform into itself by reflection or rotation
tone
A single entity having a pitch, as in one member of a scale
trihemitonic
A scale that contains exactly three semitones
tritonic
containing one or more tritones
truncation
A scale produced by removing tones from another scale
unhemitonic
A scale that contains only one semitone

## Citations

1 - William Zeitler, "All The Scales", http://allthescales.org

2 - Andrew Duncan, "Combinatorial Music Theory", Journal of the Audio Engineering Society, vol. 39, pp. 427-448. (1991 June), retrieved from http://andrewduncan.net/cmt/

3 - http://allthescales.org/

4 - Howard Hansen, "Harmonic Materials Of Modern Music", ISBN 978-0891972075

5 - Paul Nelson, "Pitch Class Sets" http://composertools.com/Theory/PCSets.pdf

6 - Zeitler, William, table of imperfections counted in scales. https://allthescales.org/intro.html#Perfection

This scale analysis was created by Ian Ring, Canadian Composer of works for Piano, and total music theory nerd. The software used to generate this analysis is an open source project at GitHub. Scale notation generated by VexFlow, and MIDI playback by MIDI.js