melody-features
melody-features consolidates a wide range of computational melody analysis features into a single Python package for monophonic melodies.
This package provides over 200 features drawn from frameworks including FANTASTIC, SIMILE, melsim, jSymbolic2, IDyOM, MIDI Toolbox, MUST, and Partitura.
Note
This package is strictly for monophonic melodies. It will not compute features for polyphonic music.
Start here
Installation — install from PyPI or from source (including IDyOM)
Quick start — extract features in a few lines
Feature catalogue — searchable catalogue of every feature
API reference — API reference
GitHub repository — source, issues, and pull requests
PyPI — installable package
Contents
Quick example
import melody_features as mf
results = mf.get_all_features(input="path/to/your/midi/files")
print(results.iloc[:1,].to_json(indent=4, orient="records"))
By default, get_all_features returns a pandas DataFrame of tabulated features,
using a collection of 903 Western traditional music melodies as the reference
corpus (Pearce, 2018).