For what it's worth I have implemented this in Muse2 (which I do hope to get out the door soon). I've used Phil's numbers exactly.
I note that you don't distinguish between Aeolian and minor - whereas I'd expect a piece in A minor to attract some E7 harmonies with ^g leading notes - and indeed even ^f g^ double leading notes. As the score for ^g is 0.00 and the score for ^f is very small I presume you indeed did not have any such minor pieces in the sample set. It goes nicely with an "invent some guitar chords" algorithm. I took the attitude that the user could enter "?" as a guitar chord and Muse2 would, on request, try to replace them with something sensible. The chord chosen is given a score for * matching the melody over the period until the next chord (the first melodic note is given extra weight - maybe eventually it should use stress patterns) * matching the key signature (i.e. not having out-of-key notes in it) * matching the chord before and the chord after (so that G=>A7=>D scores higher than G=>G#=>D) * random and you can set weights for deciding how important any of these are. The weights can be negative, so if you really like dissonant, out-of-key chords in a jarring sequence you can have it. The chord before and the chord after could be further "?"s so in that case it looks for the "best" overall chord sequence. There is of course no such thing as "best", but anyway that's how it scores them. To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
