If you love music, but don’t like math, Harken Music has a solution for you, and it’s way easier than you think. With just a few simple formulas, anyone can unlock the power of math for use in their music.
Math and music are inseparable. Behind every melody and harmony are simple mathematical solutions for calculating the combinations (intervals, chords, scales, etc.) and permutations (modes, inversions, etc.), and for applying geometric transformations, like rotation (modes), reflection (inversions), and retrograde (reversals).
This math is not complicated, but it may require a bit of study and concentration to see and hear how these simple calculations can produce all of 12-tone harmony. So with that in mind, let’s take a closer look at the math behind the music.
The Power of Factorials
Factorials calculate how many ways a combination of numbers can be ordered.
A factorial is the result of multiplying a number by every smaller number down to one. For example, 4 factorial (4!) means 4 × 3 × 2 × 1, which equals 24. Likewise:
3! = 3 × 2 × 1 = 6
5! = 5 × 4 × 3 × 2 × 1 = 120
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
Expand this to 12! and the possibilities explode into the hundreds of millions.
12! = 479,001,600
Supremacy of the Tonic
Tonic Supremacy is the foundation of the Harken Music system. All combinations and permutations must include the Tonic [0], which is invariably positioned as the root or bass—the lowest frequency pitch.
0 = Tonic (fixed, bass)
1-11 = Intervals (relative to the fixed tonic)
This is a duodecimal or base-12 system that uses the following 12 unique whole numbers to identify the notes or pitches in a given sequence.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Any musical pitch may be assigned as the fixed Tonic [0], expanding the number of possibilities by a factor of 12.
Combinations vs. Permutations
Combinations
A combination is a way to choose numbers from a group where the order doesn’t matter. For example, if you’re picking two numbers from four, say 1, 2, 3, and 4, choosing [1, 3] is the same as choosing [3, 1]. Where n is the total number of notes available (11), and r is the number combination size chosen—minus 1 to account for the fixed tonic (0) that appears in all combinations.
For calculating all combinations, we can also use the simplified binomial coefficient 11 choose n for n = 1 to 11 to determine all of the unique harmonic combinations possible.
The total is 2,048, however, because any of 12 notes can be used for the fixed tonic [0], the grand total for all possible unique harmonic combinations is a whopping 24,576.
Permutations
A permutation is a way to sort numbers in a combination where the order does matter. For example, arranging the numbers 0, 1, and 2 as [0, 1, 2] is different from [2, 1, 0].
When order is considered, the total expands rapidly to include all of the 1,193,556,233 possible permutations of 24,576 combinations possible in 12-tone music. Using factorials (n!), where n is the total number of notes available (11), and r is the combination size selected—minus 1 to account for the fixed tonic (0) that appears in every combination and permutation.
The following summation formula elegantly calculates the number of all possible harmonic combinations (relative to the fixed tonic) and all possible permutations (arrangements) in the 12-tone system, where the tonic (0) is fixed and appears in every combination and permutation.
The result is 1,193,556,233 total possible unique permutations of 24,576 unique combinations.
Cycle Order
The Harken Music system uses two simple formulas to calculate cycles:
(n × 7) mod 12 for n = 0 to 11 produces the ascending cycle:
[0, 7, 2, 9, 4, 11, 6, 1, 8, 3, 10, 5];
(n × 5) mod 12 for n = 0 to 11 produces the descending cycle:
[0, 5, 10, 3, 8, 1, 6, 11, 4, 9, 2, 7].
The cycle order is bi-directional, so ascending and descending cycles can be combined and alternated. In this case, the tonic [0] is placed in the middle of the sequence, with the tritone [6] at each end (for symmetry).
Octaves
Octaves are handled in both directions (up and down) using the following formula:
x = (n + 12y) mod 12
Set y as a positive integer (e.g., y = 1 moves n up one octave)
Set y as a negative integer (e.g., y = −1 moves n down one octave)
Chromatic Harmony: Step by Step
The Four Stages of Chromatic Harmony:
Tonic: The fixed tonic [0] anchors the harmony, establishing a central or fundamental for all intervals.
Key Intervals: Including the Perfect 5th [7] and/or Perfect 4th [5] in the lower register, just above the Tonic [0], creates a solid foundation; adding the Third and Seventh defines the chord quality.
Scale Extensions: Adding the 2nd [1 or 2], 4th [5 or 6], and 6th [8 or 9] defines the scale.
Chromatic Tensions: Adding the Chromatic Tensions completes the process.
Examples:
[0, 2, 4, 6, 7, 9, 11] is arranged [0, 7, 4, 11, 2, 6, 9]
[0, 1, 3, 4, 6, 8, 10] is arranged [0, 6, 4, 10, 1, 3, 8]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] is arranged [0, 7, 4, 11, 2, 6, 9, 1, 3, 5, 8, 10]
Resolving Conflicts
Resolving conflicts means deciding which intervals or numbers take priority when two or more compete for the same role or position. For example, in arranging numbers 0 through 11, if both 4 and 3 occupy the same harmonic role, 4 might take precedence, while 3 is displaced (e.g., raised one octave) to resolve the conflict.
Algorithms
An algorithm is a step-by-step set of instructions for solving a problem or completing a task. For example, arranging numbers 0 through 11 in all possible orders follows an recursive algorithm that starts with the smallest order, swaps numbers , and stops at the largest order.
Transformations
A transformation changes a set of numbers by applying a rule, like adding, subtracting, or reordering them, while keeping the set intact in some way.
Rotations
A rotation shifts the numbers around like a clock, maintaining the order but starting at a different point. For example, rotating [0, 1, 2, 3] by one step or scale degree becomes [1, 2, 3, 0]. There is one rotation (mode) for each number in a given combination.
The chromatic scale has 12 rotations or modes, as demonstrated below.
Retrogrades
A retrograde reorders the numbers in reverse. For example, starting with the Tonic, [0, 2, 5, 7, 10] in retrograde becomes [0, 10, 7, 5, 2] or ascending becomes descending.
Reflections
A reflection flips the numbers around a central axis, like looking in a mirror. For example, reflecting the Lydian Scale [0, 2, 4, 6, 7, 9, 11] over the Tonic-Tritone axis [0, 6] becomes the Locrian Scale [0, 10, 8, 6, 5, 3, 1]. 12 reflections are possible over 12 separate axes, as demonstrated below in ascending cycle order.
Fractions
Fractional groups of permutations break the total number of arrangements into smaller, equally-sized sections based on shared characteristics. For example, considering all permutations of numbers 0 through 5, there are 5! = 120 total arrangements. These may be divided into 5 groups, each starting with a specific number (like 0, 1, 2, 3, 4, or 5). Each group has 4! = 24! permutations, which is a fraction (1/5) of the total.
Conclusion: What’s The Point?
The intersection of math and music isn’t just theoretical—it’s practical, creative, and inspiring. By understanding simple mathematical tools like factorials, combinations, permutations, and transformations, we can unlock the structure and logic behind all of 12-tone music. This isn’t about complicating art with numbers; it’s about using math as a creative partner to greatly expand the possibilities of harmonic and melodic expression.
Math helps us understand and use the full scope of music—every combination, arrangement, and transformation—and gives us a framework to explore it systematically. Whether you’re composing, improvising, analyzing, studying, or just playing around, these principles will provide the tools to:
Organize Creativity: Math shows you how to structure and balance musical ideas.
Explore Infinite Variations: With transformations and harmonic arrangements, you can create endlessly without ever repeating yourself.
Demystify the Complex: The beauty of music becomes less intimidating when you see it as patterns and relationships rather than abstract theory.
Ultimately, the point of all this is simple: Don’t fear math—it’s the language of music! By embracing these concepts, anyone, regardless of their mathematical or musical background, can deepen their understanding and appreciation of music while expanding their creative horizons. It’s not just about numbers; it’s about making music accessible, diverse, and limitless.
For a more detailed explanation of the math used in creating the Harken Music system, please read, “The Future of Music is Math” by Mitch Kahle.
See also: “Harken Music: A New Mathematical Framework for 12-Tone Harmony”, by ChatGPT 4o, and for an even deeper dive into the mathematics, read Factorials and Fractions “Navigating the 12-tone matrix,” by Mitch Kahle.
Please try our open-source proof-of-concept demo* at harkenmusic.com, where you can choose any combination size (from 1 to 12 notes) from the pull-down menu; then select any particular combination from the numbered list, to see and hear all the permutations, reflections (inversions), and rotations (transpositions).
*Note: a desktop or laptop computer and current web browser (Chrome, Safari, etc.) are required for using the demo; however there are no downloads, sign-up, or subscription requirements.
It cannot be overstated that the Harken Music system uses only mathematics and math related programming code. The programming does not include or use any databases, lookup tables, or other sources of data. Everything—nearly 1.2 billion musical combinations and permutations—is calculated on the fly.
This information and related software code are available on Harken Music and Github as open-source software under the standard MIT License set forth below.
Copyright 2024 Mitchell Kahle and Holly J. Huber
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
***