Skip to main content

Module analysis

Module analysis 

Source
Expand description

Key-finding and compact analysis helpers.

Structs§

KeyEstimate
A ranked key estimate.

Enums§

KeyProfile
A set of key-finding weights for the Krumhansl-Schmuckler algorithm.

Functions§

estimate_key_from_chords
Estimates likely keys from chords using the Krumhansl-Schmuckler weights.
estimate_key_from_chords_with
Estimates likely keys from chords using the given weights.
estimate_key_from_pitches
Estimates likely keys from pitches using the Krumhansl-Schmuckler weights.
estimate_key_from_pitches_with
Estimates likely keys from pitches using the given weights.
tonal_certainty
How decisively the first of a ranked list of key estimates wins: music21’s Key.tonalCertainty for a key that came out of analysis. It is the leader’s score plus twice its lead over the next positive score; with no positive runner-up it is the leader’s score, floored at zero.
tonal_certainty_from_scores
The same measure over the scores alone, for a ranking that came from somewhere else — music21 hands its own analysis results around as keys carrying a correlationCoefficient rather than as estimates.