From ef7e496b7b447ff79d984c771f88545847d609b3 Mon Sep 17 00:00:00 2001 From: tbareta Date: Tue, 11 Apr 2017 17:02:05 +0200 Subject: [PATCH 1/2] adding chord m7b9 adding chord minor seventh flat ninth --- mingus/core/chords.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/mingus/core/chords.py b/mingus/core/chords.py index 65d7b75c..7eac86ce 100644 --- a/mingus/core/chords.py +++ b/mingus/core/chords.py @@ -52,6 +52,7 @@ * minor_ninth * major_ninth * dominant_ninth + * minor_seventh_flat_ninth * Elevenths * minor_eleventh * eleventh @@ -146,10 +147,11 @@ '69': ' sixth ninth', '9': ' dominant ninth', 'add9': ' dominant ninth', - '7b9': ' dominant flat ninth', - '7#9': ' dominant sharp ninth', 'M9': ' major ninth', 'm9': ' minor ninth', + '7b9': ' dominant flat ninth', + '7#9': ' dominant sharp ninth', + 'm7b9': ' minor flat ninth', '7#11': ' lydian dominant seventh', 'm11': ' minor eleventh', 'M13': ' major thirteenth', @@ -347,6 +349,17 @@ def minor_ninth(note): """ return minor_seventh(note) + [intervals.major_second(note)] +def minor_flat_ninth(note): + """Build a minor flat ninth chord on note. + + Example: + >>> minor_ninth('C') + ['C', 'Eb', 'G', 'Bb', 'Db'] + """ + res = dominant_ninth(note) + return minor_seventh(note) + [intervals.minor_second(note)] + return res + def major_ninth(note): """Build a major ninth chord on note. @@ -738,7 +751,7 @@ def from_shorthand(shorthand_string, slash=None): Sixths: '6', 'm6', 'M6', '6/7' or '67', '6/9' or '69' - Ninths: '9' or 'add9', 'M9', 'm9', '7b9', '7#9' + Ninths: '9' or 'add9', 'M9', 'm9', '7b9', '7#9', 'm7b9' Elevenths: '11' or 'add11', '7#11', 'm11' @@ -1270,6 +1283,7 @@ def determine_polychords(chord, shorthand=False): '9': dominant_ninth, '7b9': dominant_flat_ninth, '7#9': dominant_sharp_ninth, + 'm7b9': minor_flat_ninth, 'M9': major_ninth, 'm9': minor_ninth, '7#11': lydian_dominant_seventh, From 9f0e43ba55d88a8d1d2428a75c80102e6dd78fcc Mon Sep 17 00:00:00 2001 From: tbareta Date: Tue, 11 Apr 2017 17:38:45 +0200 Subject: [PATCH 2/2] restored sequence in chord_shorthand_meaning had inadvertently moved the dominant chords a couple of slots down --- mingus/core/chords.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mingus/core/chords.py b/mingus/core/chords.py index 7eac86ce..c1040789 100644 --- a/mingus/core/chords.py +++ b/mingus/core/chords.py @@ -147,10 +147,10 @@ '69': ' sixth ninth', '9': ' dominant ninth', 'add9': ' dominant ninth', - 'M9': ' major ninth', - 'm9': ' minor ninth', '7b9': ' dominant flat ninth', '7#9': ' dominant sharp ninth', + 'M9': ' major ninth', + 'm9': ' minor ninth', 'm7b9': ' minor flat ninth', '7#11': ' lydian dominant seventh', 'm11': ' minor eleventh',