Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions mir_eval/chord.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,11 @@ def scale_degree_to_bitmap(scale_degree, modulo=False, length=BITMAP_LENGTH):
"maj9": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1],
"min9": [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0],
"9": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
"b9": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
"#9": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
"min11": [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0],
"11": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
"#11": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
"maj13": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1],
"min13": [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0],
"13": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
"b13": [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],
"1": [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"5": [1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],
"": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
Expand Down
8 changes: 8 additions & 0 deletions tests/test_chord.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,3 +638,11 @@ def test_validate():
# Test that error is thrown on different-length labels
with pytest.raises(ValueError):
mir_eval.chord.validate([], ["C"])

@pytest.mark.parametrize("quality", list(mir_eval.chord.QUALITIES.keys()))
def test_chord_qualities(quality):
if len(quality) > 0:
mir_eval.chord.encode(f"C:{quality}", reduce_extended_chords=True)
else:
mir_eval.chord.encode("C", reduce_extended_chords=True)

Comment thread
bmcfee marked this conversation as resolved.
Outdated