Skip to content

Commit

Permalink
Added the missing m7b9b5 chords
Browse files Browse the repository at this point in the history
All chord progressions are now available in 4 styles
  • Loading branch information
ldrolez committed Jan 14, 2021
1 parent 79951bb commit 0211665
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 41 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ with your favorite DAW.
This collection is FREE and you can contribute to it using the issue tracker above.
Please use the bug tracker if you find incorrect chords!

All the files are licensed under the MIT license, and you can use in any project freely.
All the MIDI files are licensed under the MIT license, and **you can them use in any musical project freely**.

* More details in [my blog](https://drolez.com/blog/music/free-midi-chords-progressions.php)
* Quick [Video demo](https://youtu.be/mNBI6uQXltY) with Ableton
Expand All @@ -28,9 +28,11 @@ The chords collection is organized using 3 levels of directories:
* 1/ Triads
* 2/ 7ths and 9ths chords
* 3/ All other chords
* 4/ And progressions
* 4/ Chord progressions
* 3rd level: Major and Minor scales

Below the progressions directory, you'll find 3 more directories. They contain the same MIDI chord progressions files but with different timings: basic4 style, alt4 style and hiphop style.

## Related

The script uses chords2midi from Rich Jones, and Python Mingus.
Expand Down
83 changes: 44 additions & 39 deletions gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,21 @@ def gen(dir, key, chords, prefix):
#
# Generate a chord progression
#
def genprog(dir, key, chords, prefix):
if not os.path.exists(dir):
os.makedirs(dir)
def genprog(dir, key, chords, prefix, style = ''):
c2m_obj = c2m.Chords2Midi()
args = chords.split(" ")
args.extend(["-t", "5", "-p", "long", "-d", "4", "-B",
if style != '':
args.extend(["-p", style])
dir = dir + "/" + style + " style"
else:
args.extend(["-d", "4", "-p", "long"])
args.extend(["-t", "5", "-B",
"--key", f"{key}", "-N", f"{prefix} - {chords}", "--output",
f"{dir}/{prefix} - {chords}.mid"])
if not os.path.exists(dir):
os.makedirs(dir)
c2m_obj.handle(args)


num = 1
# Iterate for each key
for key in keys:
Expand All @@ -101,18 +105,17 @@ def genprog(dir, key, chords, prefix):

# Major 7th
i = 0
# bug: pychord cannot create a m7-5add9
for n in [['M7', 'M9'], ['m7', 'm9'], ['m7', 'm9'],
['M7', 'M9'], ['7', '9'], ['m7', 'm9'],
['m7-5']]:
['m7-5', 'm7b9b5']]:
for c in n:
chord = scale_maj[i] + c
gen(f'{base}/2 7th and 9th/Major', root_maj, chord, deg_maj[i])
i = i + 1

# Minor 7th
i = 0
for n in [['m7', 'm9'], ['m7-5'], ['M7', 'M9'],
for n in [['m7', 'm9'], ['m7-5', 'm7b9b5'], ['M7', 'M9'],
['m7', 'm9'], ['m7', 'm9'],
['M7', 'M9'], ['7', '9']]:
for c in n:
Expand Down Expand Up @@ -157,39 +160,41 @@ def genprog(dir, key, chords, prefix):
i = i + 1

# Major progressions
for n in [
"I iii vi IV", "I iii IV vi", "I bIIM I iii", "I bIIM bIIIM bIIM",
"I bIIIM bVIM bVIIM", "I bIIIM bVIIM IV",
"I bVIM I bIIM", "I bVIIM bVIM bIIM", "I IV ii V",
"I IV vi V", "I IV V V", "I IV V bVIIM", "I IV bIIIM bVIM",
"I IV bVIIM IV", "I V vi ii", "I V vi IV",
"I V vi iii IV", "I V vi V", "I V bVIIM IV", "I vi IV V",
"I V vi iii IV I IV V",
"I bVIIM IV I",
"ii bIIM I bVIIM", "ii IV V V", "ii V I I", "ii V I IV",
"ii bVIIM7 I", "ii7 V9 I7 I7", "iim7 V7 iiim7 vi7 iim7 V7",
"bIIIM ii bIIM I", "iii vi IV I",
"IV I ii vi", "IV I iii IV", "IV I V vi",
"V I vi V", "V IV vi I", "V vi IV I",
"vi IV I V", "vi bVIM bVIIM I", "vi V IV V",
]:
genprog(f'{base}/4 Progression/Major', root_maj, n, root_maj)
for style in [ '', 'basic4', 'alt4', 'hiphop' ]:
for n in [
"I iii vi IV", "I iii IV vi", "I bIIM I iii", "I bIIM bIIIM bIIM",
"I bIIIM bVIM bVIIM", "I bIIIM bVIIM IV",
"I bVIM I bIIM", "I bVIIM bVIM bIIM", "I IV ii V",
"I IV vi V", "I IV V V", "I IV V bVIIM", "I IV bIIIM bVIM",
"I IV bVIIM IV", "I V vi ii", "I V vi IV",
"I V vi iii IV", "I V vi V", "I V bVIIM IV", "I vi IV V",
"I V vi iii IV I IV V",
"I bVIIM IV I",
"ii bIIM I bVIIM", "ii IV V V", "ii V I I", "ii V I IV",
"ii bVIIM7 I", "ii7 V9 I7 I7", "iim7 V7 iiim7 vi7 iim7 V7",
"bIIIM ii bIIM I", "iii vi IV I",
"IV I ii vi", "IV I iii IV", "IV I V vi",
"V I vi V", "V IV vi I", "V vi IV I",
"vi IV I V", "vi bVIM bVIIM I", "vi V IV V",
]:
genprog(f'{base}/4 Progression/Major', root_maj, n, root_maj, style)

# Minor progressions
for n in [
"i ii v i", "i iv v iv", "i iv VI v", "i iv VII i",
"i iv VII v i i ii V", "i v iv VII",
"i VI III bii", "i VI iv ii", "i VI III VII", "i VI VII VII",
"i VI VII v", "i VI III VII i VI9 III VII",
"i bVIIM VI bii", "i VII VI III", "i VII VI VII", "i VII i v",
"i VII i v III VII i v i", "i bVIIM bVIM bVIIM",
"ii v i i", "ii v i iv", "ii VI i iv", "ii7 v9 i7",
"iv i v VI", "iv VI VII i", "iv III VII i", "iv v VI VII",
"v i iv VII", "v iv i i", "v VI v i", "v VI III i",
"VI i v v", "VI VI i VII", "VI VII i III", "VI VII v III",
"VII iv VII i", "VII iv v i",
]:
genprog(f'{base}/4 Progression/Minor', root_min.lower(), n, root_min)
for style in [ '', 'basic4', 'alt4', 'hiphop' ]:
for n in [
"i ii v i", "i iv v iv", "i iv VI v", "i iv VII i",
"i iv VII v i i ii V", "i v iv VII",
"i VI III bii", "i VI iv ii", "i VI III VII", "i VI VII VII",
"i VI VII v", "i VI III VII i VI9 III VII",
"i bVIIM VI bii", "i VII VI III", "i VII VI VII", "i VII i v",
"i VII i v III VII i v i", "i bVIIM bVIM bVIIM",
"ii v i i", "ii v i iv", "ii VI i iv", "ii7 v9 i7",
"iv i v VI", "iv VI VII i", "iv III VII i", "iv v VI VII",
"v i iv VII", "v iv i i", "v VI v i", "v VI III i",
"VI i v v", "VI VI i VII", "VI VII i III", "VI VII v III",
"VII iv VII i", "VII iv v i",
]:
genprog(f'{base}/4 Progression/Minor', root_min.lower(), n, root_min, style)

# next key
num = num + 1

0 comments on commit 0211665

Please sign in to comment.