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

Improve and finalize scale_identification #30

Open
4 tasks
Datseris opened this issue Feb 9, 2019 · 3 comments
Open
4 tasks

Improve and finalize scale_identification #30

Datseris opened this issue Feb 9, 2019 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Datseris
Copy link
Member

Datseris commented Feb 9, 2019

@johncwok

PR #28 introduced the scale_identification functionality. Currently is not yet exported because the following things must be improved / modified:

  • tests! The file seranade_full.mid is a recording of serenade to a cuckoo. It should be tested as well. In addition the file testmidi() is Doxy, which should also be tested.
  • Improve the algorithm description. Right now the function does not do as it claims. It claims to find the "most probable scale" but this is untrue. It just returns the first scale with a match of the seven notes.
  • Consider the return signature in case of failure. What should we return in the case that the function fails to find a scale? You cannot print from within a proper high level function. I suggest the function to simply error saying "we couldn't find a scale" and also show the 7 most frequent notes in the printed string.
  • sort(Dict( is deprecated, we have to re-work the code a bit to do sorting after the dict is collected (sort keys and use sort indices on values as well) .
@NeroBlackstone
Copy link
Member

NeroBlackstone commented Dec 9, 2022

I have read relative codes. I think it's a simple implementation and can't identify Gregorian mode.
So I think if someone is willing to contribute a more advanced algorithm, it will be more useful.

Key identification in music21
Music21 Key-finding algorithm algorithm

@NeroBlackstone
Copy link
Member

If a melody has more than one key, what behavior is appropriate?
Complicate... Maybe a perfect solution will be found in the latest paper.
If someone can implement an algorithm better than music21, it would be exciting.

@Datseris
Copy link
Member Author

Datseris commented Dec 9, 2022

The Krumhansl-Schmuckler key-finding algorithm is super easy to implement as well thankfully!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants