Chord Families
This commit is contained in:
@@ -36,11 +36,11 @@ class VoicingTests(unittest.TestCase):
|
||||
for symbol, melody, expected in (('FM7', 69, (3, 5, 5, 5)), ('Gm7', 67, (3, 3, 3, 3))):
|
||||
with self.subTest(symbol=symbol):
|
||||
self.assertEqual(ranked(symbol, (melody,))[0], grip(expected))
|
||||
def test_four_strings_precede_melody_height_and_root_presence(self):
|
||||
def test_melody_height_precedes_four_strings_and_optional_root(self):
|
||||
candidates = ranked('C#M7', (65,))
|
||||
four = next(c for c in candidates if len(c) == 4 and max(p.midi for p in c) > 65)
|
||||
three = next(c for c in candidates if len(c) == 3 and max(p.midi for p in c) == 65)
|
||||
self.assertLess(candidates.index(four), candidates.index(three))
|
||||
self.assertLess(candidates.index(three), candidates.index(four))
|
||||
candidates = ranked('FM7', (69,))
|
||||
rootless = next(c for c in candidates if len(c) == 4 and 5 not in {p.midi % 12 for p in c})
|
||||
rooted = next(c for c in candidates if len(c) == 3 and 5 in {p.midi % 12 for p in c})
|
||||
|
||||
Reference in New Issue
Block a user