Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only "proper" chord types in mir_eval.chord.QUALITIES #397

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maximoskp
Copy link

Following the discussion in #396 and thanks to @bmcfee insightful comments, this PR simply removes some chord qualities in mir_eval.chord.QUALITIES that are "unreachable" by the regexp in the same file.

I.e., even though there the aforementioned QUALITITES dictionary includes keys for the b9, #9, #11 and b13 chord qualities, these are "unreachable" from the regexp. This is for a good reason, since (agreeing with @bmcfee) writing C:#9 is a bit odd - denoting it as C:7(#9) seems to be more proper.

Even though this PR doesn't fix any error per se, it resolves an edge-case error that occurs if, for instance, someone wants to iterate through mir_eval.chord.QUALITIES to get all possible chord qualities in mir_eval. Indeed, trying to mir_eval.chord.encode(C:#9) produces and error, but this error is expected to appear if, for some reason, someone tries to iterate through all qualities.

This PR simply removes the four qualities that result in this errors in this edge case. Disclaimer: I haven't tested whether this change breaks some other functionality, but I believe it shouldn't, since any other such functionality would ultimately have to be related with the regexp that properly checks for nicely-formed qualities.

Thank you @bmcfee for the help and the clarifications!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant