Key Finding Algorithm

• May 12, 2012 - 07:18

I notice that Musescore uses three profiles in key finding, the CBMS profile, the Bayesian profile and Krumhansl's profile.

I wish to know if the Bayesian profile is the one proposed by Temperley: http://homepage.psy.utexas.edu/homepage/class/psy341k/gilden/Readings/t…


keyFinder.cpp

/*
CBMS profiles:

major_profile = 5.0 2.0 3.5 2.0 4.5 4.0 2.0 4.5 2.0 3.5 1.5 4.0
minor_profile = 5.0 2.0 3.5 4.5 2.0 4.0 2.0 4.5 3.5 2.0 1.5 4.0

Bayesian profiles (based on frequencies in Kostka-Payne corpus):

major_profile = 0.748 0.060 0.488 0.082 0.670 0.460 0.096 0.715 0.104 0.366 0.057 0.400
minor_profile = 0.712 0.084 0.474 0.618 0.049 0.460 0.105 0.747 0.404 0.067 0.133 0.330

Krumhansl's profiles:

major_profile = 6.35 2.23 3.48 2.33 4.38 4.09 2.52 5.19 2.39 3.66 2.29 2.88
minor_profile = 6.33 2.68 3.52 5.38 2.60 3.53 2.54 4.75 3.98 2.69 3.34 3.17

Krumhansl's minor, normalized: 5.94 2.51 3.30 5.05 2.44 3.31 2.38 4.46 3.73 2.52 3.13 2.97
*/


Comments

Actually MuseScore is using the CBMS profile only. See the line just above the ones you quoted.
The Bayesian profile numbers are probably the Temperley's one indeed but are not used. Check here for more information.

Btw, it would be great if you could publish your findings while anlysing the Musescore codebase for MIDI import. Do you plan to make a paper ? or a serie of blog post ?

In reply to by [DELETED] 5

Thanks so much for your help, lasconic!

In fact, our supervisor asked us to use the tools from the Melisma Music Analyzer project. But then we found that while converting midi files into MusicXML, Musescore seems to be doing some things that MMA also does. And MMA doesn't always work for us. So we wish to know how Musescore works so as to justify that Musescore is an alternative to MMA.

Now we wish to extract musical features from the MusicXML output by Musescore. Actually we're extracting melody (melodic segmentation), chord progression, key signature, time signature, rhythm (by rhythm we mean percussion), instrumentation, dynamics, and tempo.

So I'm now writing a kind of "documentation" for our supervisor, trying to convince him that Musescore is an alternative to MMA. Therefore, in the documentation I briefly compare the chord finding and key finding algorithms the two programs use (since both find chords and keys). For the rest of the musical features, I will look into how Musescore finds them out if it ever does. I will also write about how Musescore imports MIDI (briefly).

We can definitely publish our findings, perhaps in a blog post. :)

Do you still have an unanswered question? Please log in first to post your question.