Algorithms

This module allows to extract, modify and predict different aspects of a music piece.

Harmonic Shifting

harmonic_shifting(origin_notes, ...)

This function maps the pitches of a midi to a new scale and chord progression.

Key-Profiles

State of the Art algorithms for key finding in symbolic music. The key-profiles weights in the library are the following:

  • KRUMHANSL_KESSLER

[1] Krumhansl, C. L., & Kessler, E. J. (1982). Tracing the dynamic changes in perceived tonal organization in a spatial representation of musical keys. Psychological review, 89(4), 334.

  • TEMPERLEY

[2] Temperley, D. (1999). What’s key for key? The Krumhansl-Schmuckler key-finding algorithm reconsidered. Music Perception, 17(1), 65-100.

  • ALBRETCH_SHANAHAN

[3] Albrecht, J., & Shanahan, D. (2013). The use of large corpora to train a new type of key-finding algorithm: An improved treatment of the minor mode. Music Perception: An Interdisciplinary Journal, 31(1), 59-67.

  • SIGNATURE_FIFTHS

KeyDetectionAlgorithms(value)

An enumeration.

KrumhanslKessler()

Krumhansl-Schmuckler/Kessler weights for Krumhansl-Schmuckler key-profiles algorithm.

Temperley()

Temperley/Kostka/Payne weights for key-profiles algorithm.

AlbrechtShanahan()

Albrecht/Shanahan weights for key-profiles algorithm.

key_detection(notes[, method])

Algorithm description: