Skip to content

mus.keystrength

Olivier Lartillot edited this page Feb 4, 2018 · 3 revisions

Computes the key strength, a score between -1 and +1 associated with each possible key candidate, by computing correlation coefficients between the chromagram returned by mirchromagram, wrapped and normalized (using the ‘Normal’ option), and similar profiles representing all the possible tonality candidates (Krumhansl, 1990; Gomez, 2006).

The resulting graph indicate the correlation coefficient for each different tonality candidate.

For the moment, only the ‘Weight’ and ‘Triangle’ options used in mus.chromagram can be tuned directly in mus.keystrength.

mus.keystrength accepts either:

  • mus.Chromagram objects,
  • mus.Spectrum objects,
  • sig.Signal objects (same as for mus.chromagram),
  • mus.Sequence objects
  • file name or the ‘Folder’ keyword.

mus.keystrength can return several outputs:

  • the key strength itself, and
  • the mus.chromagram data.

Frame decomposition

mus.keystrength(..., ‘Frame’, ...) performs first a frame decomposition, with by default a frame length of 200 ms and a hop factor of 5% (10 ms). For the specification of other frame configuration using additional parameters, cf. this page.

Accessible Output

Accessible using the get method.

  • 'Strength': the key strength value for each key and each temporal position (same as 'Data')
  • 'Key': the different keys (same as 'Pos')
Clone this wiki locally