Skip to content

Improve and finalize scale_identification #30

Open
@Datseris

Description

@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) .

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions