MusicManipulations.jl icon indicating copy to clipboard operation
MusicManipulations.jl copied to clipboard

Improve and finalize scale_identification

Open Datseris opened this issue 5 years ago • 3 comments

@johncwok

PR https://github.com/JuliaMusic/MusicManipulations.jl/pull/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) .

Datseris avatar Feb 09 '19 09:02 Datseris