Music Matrix Calculator
Generate a 12-tone matrix for serial and dodecaphonic composition.
Enter 12 unique numbers from 0 to 11, separated by commas.
Choose how to display the pitch classes in the results.
Primary Forms
12-Tone Matrix
Prime Row Interval Chart
SVG visualization of the intervals between consecutive notes in the prime row on a clock face.
What is a Music Matrix Calculator?
A music matrix calculator is a specialized tool used in atonal music composition, specifically for the twelve-tone technique pioneered by Arnold Schoenberg. This technique, also known as dodecaphony or serialism, ensures that all 12 pitches of the chromatic scale are treated with equal importance. The calculator generates a 12×12 grid, known as a tone matrix or square, which contains all 48 possible permutations of a single 12-note melody called the “tone row.”
This tool is essential for composers and music theorists who want to explore atonal composition without getting bogged down in the manual (and often error-prone) process of calculating the matrix by hand. By inputting a single “prime” row, the music matrix calculator instantly generates its Inversion, Retrograde, and Retrograde-Inversion, along with all their transpositions.
The Music Matrix Formula and Explanation
The matrix is built from a single Prime (P) row using modulo 12 arithmetic, where each note of the chromatic scale is assigned an integer from 0 to 11 (e.g., C=0, C♯=1…B=11). The core transformations are:
- Prime (P): The original 12-tone row provided by the user.
P₀is the original form. - Inversion (I): The row with its intervals inverted. If the prime row goes up by 3 semitones, the inversion goes down by 3. The formula for a note
nin the inversionIₓstarting on pitchxisIₓ(n) = (x - (P₀(n) - P₀(0))) mod 12. - Retrograde (R): The prime row played in reverse.
- Retrograde-Inversion (RI): The inversion row played in reverse.
The full matrix systematically lays out all transpositions of these four basic forms. You can find more details on our guide to what is serialism.
| Variable | Meaning | Unit | Typical Range |
|---|---|---|---|
| Pn | Prime row, transposed to start on note ‘n’ | Pitch Class | 0-11 |
| In | Inverted row, transposed to start on note ‘n’ | Pitch Class | 0-11 |
| Rn | Retrograde row (read from right-to-left) | Pitch Class | 0-11 |
| RIn | Retrograde-Inversion row (read from right-to-left) | Pitch Class | 0-11 |
Practical Examples
Example 1: Webern’s Concerto, Op. 24
Anton Webern’s Concerto uses a famous row known for its high degree of internal symmetry.
- Inputs (as Numbers):
0, 11, 3, 4, 8, 7, 9, 5, 6, 1, 2, 10 - Inputs (as Notes): B, A♯, D, D♯, G♯, G, A, F, F♯, C, C♯, A
- Results: Entering this row into the music matrix calculator reveals its complex internal structures. The prime form (P₀) is
. The Inversion (I₀) becomes. The matrix shows how these forms relate across all transpositions.
Example 2: Schoenberg’s Piano Concerto, Op. 42
A classic row from the inventor of the technique himself.
- Inputs (as Numbers):
0, 1, 5, 2, 8, 6, 7, 3, 4, 9, 10, 11 - Inputs (as Notes): C, C♯, F, D, G♯, F♯, G, D♯, E, A, A♯, B
- Results: The calculator shows a Prime form of
and an Inversion of. This row creates very different melodic and harmonic possibilities compared to Webern’s, which a composer can explore using a interval calculator to analyze the intervallic content.
How to Use This Music Matrix Calculator
- Enter Your Tone Row: In the “Prime Row (P₀)” input field, type 12 unique numbers between 0 and 11, separated by commas. Each number represents a pitch class (e.g., C=0, C#=1…).
- Select Display Mode: Use the dropdown to choose whether you want the results displayed as numbers or as note names (with either sharp or flat spellings).
- View the Results: The calculator automatically updates. You will instantly see the four primary forms (P₀, I₀, R₀, RI₀) listed.
- Analyze the Matrix: The full 12×12 matrix is displayed below the primary forms. The top row is your Prime form (P₀). The leftmost column is the Inversion (I₀). Each row is a transposition of the Prime form, and each column is a transposition of the Inversion.
- Use the Buttons: Click “Reset” to return to the default tone row. Click “Copy Results” to copy a text version of the matrix and its forms to your clipboard. You can then try generating melodies with a chord progression generator, but using rows instead of chords.
Key Factors That Affect the Music Matrix
- Initial Row Choice: This is the single most important factor. The intervallic content of your prime row determines the entire musical character of the resulting matrix.
- Interval Content: A row with many repeated intervals will sound more homogenous than one with a wide variety of intervals.
- Trichords and Hexachords: Composers often construct rows from smaller cells of 3 (trichords) or 6 (hexachords) notes. The properties of these smaller groups have a huge impact on the final piece.
- Combinatoriality: This is a property where a part of a row can be combined with a part of one of its transformations (like the inversion) to create a set containing all 12 tones. This is a key concept for more advanced atonal music guides.
- Symmetry: Rows that are symmetrical (e.g., palindromic) create matrices with a high degree of internal repetition and structure.
- Transposition Levels: While the matrix shows all possibilities, a composer’s choice of which rows (transpositions) to use and in what order defines the form of the final composition.
Frequently Asked Questions (FAQ)
- What do P, I, R, and RI stand for?
- P = Prime (the original row), I = Inversion, R = Retrograde (backwards), and RI = Retrograde-Inversion.
- Why use numbers instead of note names?
- Numbers make the mathematical calculations (modulo 12 arithmetic) much simpler and remove ambiguity between enharmonic equivalents (like C♯ and D♭). Our music matrix calculator lets you switch back to note names for musical interpretation.
- What happens if I enter duplicate notes or the wrong number of notes?
- The calculator will show an error message. A valid 12-tone row must contain exactly 12 unique pitch classes.
- Who invented the 12-tone matrix?
- Arnold Schoenberg developed the twelve-tone technique in the early 1920s. While he laid the groundwork, the matrix itself was a tool developed by his students and later theorists to better visualize and analyze the system.
- How do I read the matrix?
- Rows are read left-to-right to get the Prime (P) forms. Columns are read top-to-bottom to get the Inversion (I) forms. Reading rows right-to-left gives you Retrograde (R) forms, and reading columns bottom-to-top gives you Retrograde-Inversion (RI) forms.
- Can I use this for tonal music?
- Not really. The entire purpose of the system is to avoid establishing a tonal center (a “key”). Its logic is fundamentally atonal. A scale finder is a more appropriate tool for tonal music.
- Is this the only way to compose atonal music?
- No, this is just one system (serialism). There are many other approaches to writing atonal music that do not use a strict tone row or matrix.
- What is the chart below the calculator?
- The circular chart visualizes the intervals of your prime row. It connects the 12 notes in sequence on a clock face, making it easier to see the melodic shape and intervallic leaps of your chosen row.
Related Tools and Internal Resources
Explore more of our music theory tools and resources to expand your compositional toolkit:
- Interval Calculator: Analyze the specific intervals within your tone rows.
- Chord Progression Generator: While for tonal music, it can inspire harmonic ideas.
- What is Serialism?: A deep dive into the history and theory behind the music matrix calculator.
- Atonal Music Guide: Learn about other methods of composing outside of traditional keys.
- Scale Finder: Explore thousands of scales for more traditional composition.
- Blog: Composing with Tone Rows: Practical tips and tricks for writing your first serial piece.