Chord Generator
Chord Generator is an application that allows you to look up the chords on your favourite musical scale. Not only can you read what the chords are, you can hear them, by pressing your mouse down on a cell to play, and releasing to stop. For more information about how it works, see the documentation below.
Results
Here are the chords derived from the scale. Press and hold any cell to hear it played; release to stop.
| Sonorities | C |
D |
E |
F |
G |
A |
B |
||
|---|---|---|---|---|---|---|---|---|---|
| 1–3 (Power Third) | C Power Third | D Power Minor Third | E Power Minor Third | F Power Third | G Power Third | A Power Minor Third | B Power Minor Third | ||
| 1–4 (Power Fourth) | C Power Fourth | D Power Fourth | E Power Fourth | F Tritone | G Power Fourth | A Power Fourth | B Power Fourth | ||
| 1–5 (Power chords) | C Power Fifth | D Power Fifth | E Power Fifth | F Power Fifth | G Power Fifth | A Power Fifth | B Tritone | ||
| 1–6 (Power Sixth) | C Power Sixth | D Power Sixth | E Power Sharp Fifth | F Power Sixth | G Power Sixth | A Power Sharp Fifth | B Power Sharp Fifth | ||
| 1–2–5 (Suspended Second chords) | C Suspend 2nd | D Suspend 2nd | E Suspend Flat 2nd | F Suspend 2nd | G Suspend 2nd | A Suspend 2nd | B Suspend Flat 2nd Flat 5th | ||
| 1–3–5 (Triad chords) | C Major | D Minor | E Minor | F Major | G Major | A Minor | B Diminish 5th | ||
| 1–4–5 (Suspended chords) | C Suspend | D Suspend | E Suspend | F Suspend Sharp 4th | G Suspend | A Suspend | B Suspend Flat 5th | ||
| 1–3–5–6 (Sixth chords) | C Major Add 6th | D Minor Add 6th | E Minor Add Flat 6th | F Major Add 6th | G Major Add 6th | A Minor Add Flat 6th | B Minor Sharp 5th Add Sharp 11th | ||
| 1–3–5–7 (Seventh chords) | C Major 7th | D Minor 7th | E Minor 7th | F Major 7th | G 7th | A Minor 7th | B Minor 7th Flat 5th | ||
| 1–3–5–9 (Added Ninth chords) | C Major Add 9th | D Minor Add 9th | E Minor Add Flat 9th | F Major Add 9th | G Major Add 9th | A Minor Add 9th | B Diminish 5th Add Flat 9th | ||
| 1–3–5–11 (Added Eleventh chords) | C Major Add 11th | D Minor Add 11th | E Minor Add 11th | F Major Add Sharp 11th | G Major Add 11th | A Minor Add 11th | B Diminish 5th Add 11th | ||
| 1–4–5–7 (Suspended Seventh chords) | C Suspend Major 7th | D Suspend 7th | E Suspend 7th | F Suspend Sharp 4th Major 7th | G Suspend 7th | A Suspend 7th | B Suspend 7th Flat 5th | ||
| 1–3–5–6–7 (Sixth / Seventh chords) | C Major Sixth / Seventh | D Minor Sixth / Seventh | E Minor Flat Sixth / Seventh | F Major Sixth / Seventh | G Sixth / Seventh | A Minor Flat Sixth / Seventh | B Minor Flat Sixth / Seventh Flat Fifth | ||
| 1–3–5–6–9 (Sixth/Ninth chords) | C Major Add 6th Add 9th | D Minor Add 6th Add 9th | E Minor Add Flat 6th Add Flat 9th | F Major Add 6th Add 9th | G Major Add 6th Add 9th | A Minor Add Flat 6th Add 9th | B Diminish 5th Add Flat 6th Add Flat 9th | ||
| 1–3–5–7–9 (Ninth chords) | C Major 9th | D Minor 9th | E Minor 7th Flat 9th | F Major 9th | G 9th | A Minor 9th | B Minor 7th Flat 9th Flat 5th | ||
| 1–3–5–7–9–11 (Eleventh chords) | C Major 11th | D Minor 11th | E Minor 11th Flat 9th | F Major 9th Sharp 11th | G 11th | A Minor 11th | B Minor 11th Flat 9th Flat 5th | ||
| 1–3–5–7–9–11–13 (Thirteenth chords) | C Major 13th | D Minor 13th | E Minor 11th Flat 13th Flat 9th | F Major 13th Sharp 11th | G 13th | A Minor 11th Flat 13th | B Minor 11th Flat 13th Flat 9th Flat 5th |
Documentation
What is Chord Generator?
Chord Generator is an application for enumerating the possible chords in a selected scale. In particular, Chord Generator will show what the chord is for a given chord type and position, if such a chord exists. This app even allows you to hear the chord by pressing and holding the cell.
Usage
There are two sets of controls for Chord Generator. The main set, "Choose a scale to find the chords it contains", allows you to select a scale for analysis:
- Key: This sets the root note for the scale. Select from C, C♯, D♭ and all up to B.
- Scale: This sets the scale under study. There are plenty to choose from, such as Major, Dorian (a mode of the Major), and Harmonic Minor. For a listing of all the scales used in the app, see the appendix.
- Octave: This sets the octave range for the chord roots (Cn–Bn). The default is 4 for C4–B4 (261.53Hz to 493.88 Hz).
- ASCII friendly: By default, the app prints out the Unicode character "♭" for the flat symbol and "♯" for the sharp symbol. If these are displayed as blocks, it probably means you are using a browser like IE6. Click "ASCII friendly" to see ASCII equivalents like "b" and "#".
- Sonorities: The set of chord types or sonorities used for generating and displaying scales. Chord Generator start with the compact default of Essential, but users can choose to expand to Important or All. Stick with Essential for a leaner table of more interesting chord variations.
Results
Chord Generator generates a table organised as follows:
- The left-hand column shows different sonorities, which are also called chord types. Which sonorities appear depends on the scale. Seven-note scales use well-known chord types such as triads — three-note chords where the 1st, 3rd and 5th notes are chosen from a position in the scale — and sevenths — when the 1st, 3rd, 5th and 7th notes are chosen instead. Eight-note scales have their own particular sonorities. For more clarity, see the explanation in the appendix.
- The top row of the table indicates the starting position of the chord in the scale. The first position in a C major scale is "C", the second position is a "D", and so on unto "B". The number of columns matches the number of notes in the scale.
- The intersection of a column and a row shows the name of the chord for that position and that sonority. It also shows the chord abbreviation (if it exists) and the notes that make it up.
Let's take the C major scale for the triad row as an example.
- The first triad is C, E, G — a major chord, or "maj" for short.
- The second and third chords are D, F, A and E, G, B — D minor and E minor chords.
- The fourth and fifth triads are F, A, C and G, B, D — F major and G major chords.
- The sixth is A, C, E — A minor. The seventh — B, D, F — is what I call "Diminished Fifth". This should not be confused with "Diminished Seventh", which is a different chord.
The default shows the chords for the C major scale, with "ASCII Friendly" mode turned off.
Audio
Chord Generator, as of version 0.7 and above not only allows you to read the chords in a given scale, it allows you to hear them as well. Press and hold a cell, and the browser — assuming you are using the right sort of browser — will play the chord until you release. The parameters for the sound are set in "Audio Controls", the supplementary control set for this app:
- Volume: This ranges from 0% (silence) to 100% (peak gain during the attack phase). This is for playing sound in the browser.
- MIDI out: When checked, each pressed chord is also sent as MIDI note-on and note-off signals to a selected Web MIDI output; independent of the browser sound. This feature requires a supporting browser and a MIDI destination.
- MIDI volume: This sets MIDI note velocity (0–127) for the MIDI destination.
- Waveform: The shape of the tones used for the chords. The default is "Sine" (extremely mellow, with no supplementary harmonics), but other choices are "Triangle", "Sawtooth", and "Square".
- Envelope (ADSR): The attack, decay, sustain, release, and time scale sliders shape how each chord fades in and out. The sustain lasts while you hold the cell; the release begins when you let go. The scheduling approach follows fukagai's Web Audio ADSR tutorial on LeafWindow.
- Mode wheel (◀ / ▶): When you are running out of notes to play on a scale, and want to go up or down without hitting "Submit". Want to go up from a Major scale to a Dorian, or go down to a Locrian? These buttons allow you step up or down. Even better, the Degree columns automatically rotate in place, and the Key, Scale and Octave controls automatically update as necessary. The arrow keys ← and → do the same as pressing ◀ and ▶ when the focus is on the table. A held chord keeps the same pitches when rotating; while Esc or Space releases the pitches.
Questions
You may have none, some or many. Some of those questions may be of the form "What the hell is a "Minor Added 6th Added 9th?" For this particular chord, the answer is "It's the chord with the 1st, 2nd (9th), 3rd, 5th and 6th notes of a major scale." For other chords, I'd advise using a search engine. I made this application because I wanted to; any educational usage is just a bonus.
I'd like to extend this app to show what notes are in a chord - such as "Minor", without the need to provide a key. It would be nice to add functionality that shows how the chord may appear on a fretboard, whether it be a guitar, a violin, or a 4/5/6 string bass. I'd even like to expand the set of all sonorities, and support 24-TET down the track.
Installation and Dependencies
You can get Chord Generator from PyPI through the command:
pip install chordgenerator
Once installed, just add "chordgenerator" to your INSTALLED_APPS list in settings.py, and add the
desired URL in one of the urls.py files.
There are two Python dependencies. Apart from Django, the app depends on musictheory. This package — also made by myself — is the guts of the application, and can be used outside of Django. It contains classes for musical temperaments, scales and chords.
Chord playback uses plain browser APIs only: standard DOM events and the Web Audio API. Early versions of this app used jQuery, but that has been removed as of version 0.10.0
Feel free to customise the templates and styles: the app is released under a 3-clause BSD license. If you wish to do any changes to the app, pop over to the GitHub repository. (There is also a GitHub repository for musictheory.)
For more information about the amazing Web Audio API, see Creating Sound with the Web Audio API and Oscillators and HTML5 Web Audio API Tutorial: Building a Virtual Synth Pad.
History
- 0.1 (May 1st 2011) - Initial release. Took code and made setup script.
- 0.2 (May 11th 2011) - Remove bugs.
- 0.3 (June 6th 2011) - Add license information. Add more scales.
- 0.4 (June 2nd 2013) - Try to make a half-decent PyPI package.
- 0.5 (January 30th 2014) - Updated to be compatible with Django 1.6 and Mezzanine 3.0.
- 0.6 (February 15th 2014) - Added more styling to be compatible with Bootstrap. More history described.
- 0.7 (August 27th 2014) - Added the ability for users to hear the chords.
- 0.8 (March 1st 2017) - Updated to be compatible with Django 1.10.
- 0.9 (December 5th 2020) - Updated for Python 3 compatibility.
- 0.10.0 (October 30th 2026) - ADSR envelope for Web Audio playback (soft drive, Noise waveform); Django path() URL routing; ship chord table / envelope styles as package static CSS; replace jQuery with standard DOM APIs (no jQuery dependency); packaging and docs reconciliation; scale-dependent sonorities (heptatonic vs octatonic diminished); shared HTML table core with musictheory.
Copyright © Peter Murphy 2008–2026.
Appendix
This is a little preliminary explanation about the concepts and "theory" behind the application.
Sonorities
A sonority is a pattern of scale-degree offsets used to select notes from a scale for playing and displaying. Row labels show the degrees in 1-based form, and also give a short name. A good example is "1–3–5 (Triad chords)", which means "Pick the first, third and fifth note at this position". There are "Heptatonic sonorities" for seven note scales such as the Major Scale, and "Octatonic sonorities" for eight note scales such as the Diminished Scale. Here's some selection for "Heptatonic sonorities".
- 1–5 (Power chords): useful for power chords.
- 1–4–5 (Suspended chords): Pinball Wizard territory.
- 1–3–5 (Triad chords): enough for interesting music.
- 1–3–5–6 (Sixth chords): often inversions of seventh chords.
- 1–4–5–7 (Suspended Seventh chord): built on suspended chords.
- 1–3–5–7 (Seventh chords): when harmonics get interesting.
- 1–3–5–9 (Added Ninth chords): Foo Fighters territory, somehow.
- 1–3–5–7–9 (Ninth chords): when chords get jazzy.
- 1–3–5–7–9–11 (Eleventh chords): when chords get too jazzy for their own good.
- 1–3–5–7–9–11–13 (Thirteenth chords): the aeons are closing in.
Octatonic sonorities, unlike the heptatonic sonorities, aren't built on standard forms such as "Seventh" or "Ninth"; things are really different. So rather than overthinking their names, I've gone with Roman numerals. Some selections:
- 1–5 (Interval II): always Tritones.
- 1–3–5 (Triad IV): always Diminished 5ths.
- 1–3–6 (Triad V): Minor Sharp 5ths and Minors.
- 1–5–6 (Triad XI):. Suspended Sharp 5ths and Majors.
- 1–3–5–7 (Four Notes IV): always Diminished 7ths.
That's probably enough flexibility to select every possible interesting chord. Note that the more 'complicated' a chord is, the more melancholy and/or discordant the result generally is.
Scales
There are a whole load of "scales" used in this app, most of which most people would not have heard of. Fortunately, most of the scales are modes and transpositions of other scales. Most of the terminology is grabbed from such places as Solfege and Dolmetsch. One of the few exceptions is the "Discordant Minor", which I invented for shit and giggles. Where a scale has two common names, both appear separated by a slash; the best example is "Major / Ionian". Here's the scales of interest for seven notes in the 12-tone equal temperament scale.
|
Scales |
Pattern |
2nd Mode |
3rd Mode |
4th Mode |
5th Mode |
6th Mode |
7th Mode |
|---|---|---|---|---|---|---|---|
|
Major / Ionian |
1-2-3-4-5-6-7 |
Dorian |
Phrygian |
Lydian |
Mixolydian |
Natural Minor / Aeolian |
Locrian |
|
Melodic Minor / Jazz Minor |
1-2-♭3-4-5-6-7 |
Dorian ♭9 |
Lydian Augmented |
Lydian Dominant |
Mixolydian ♭13 |
Semilocrian |
Superlocrian |
|
Harmonic Minor |
1-2-♭3-4-5-♭6-7 |
Locrian ♯6 |
Ionian Augmented |
Romanian |
Phrygian Dominant |
Lydian ♯2 |
Ultralocrian |
|
Harmonic Major |
1-2-3-4-5-♭6-7 |
Dorian ♭6 |
Phrygian ♭4 |
Lydian ♭3 |
Mixolydian ♭9 |
Lydian ♯2 ♯5 |
Locrian ♭♭7 |
|
Melodic Minor ♭5 / Discordant Minor |
1-2-♭3-4-♭5-6-7 |
Dorian ♭9 ♭4 |
Minor Lydian Augmented |
Lydian Dominant ♭9 |
Lydian Augmented ♯2 ♯3 |
Semilocrian ♭♭7 |
Superlocrian ♭♭6 |
|
Harmonic Minor ♭5 |
1-2-♭3-4-♭5-♭6-7 |
Superlocrian ♯6 |
Melodic Minor ♯5 |
Dorian ♭9 ♯11 |
Lydian Augmented ♯3 |
Hungarian |
Superlocrian ♭♭6 ♭♭7 |
For eight notes in 12-TET, it is a lot simpler, as the only scale we are interested in is the Diminished scale and its modes.
|
Scales |
Pattern |
2nd Mode |
3rd Mode |
4th Mode |
5th Mode |
6th Mode |
7th Mode |
8th Mode |
|---|---|---|---|---|---|---|---|---|
|
(Whole Half) Diminished |
1-2-♭3-4-♭5-♭6-6-7 |
Half Whole Diminished |
(Whole Half) Diminished |
Half Whole Diminished |
(Whole Half) Diminished |
Half Whole Diminished |
(Whole Half) Diminished |
Half Whole Diminished |