Skip to main content
Have a personal or library account? Click to login
The Music Perception Toolbox: Analytical Methods for Pitch and Rhythm Similarity, Consonance, Complexity, and Structure Cover

The Music Perception Toolbox: Analytical Methods for Pitch and Rhythm Similarity, Consonance, Complexity, and Structure

By:   
Open Access
|Oct 2026

Abstract

The Music Perception Toolbox is an open‑source package—available in both MATLAB and Python—for computing perceptually and cognitively motivated measures of pitch similarity, consonance, and scale and rhythmic structure. Inputs may be symbolic pitches or spectral peaks extracted from audio. The toolbox covers three families of measure: (i) similarity and complexity measures based on expectation tensors—continuous densities that embed weighted collections of pitches or time points into a unified framework applicable to both pitch and rhythm; (ii) consonance measures including spectral entropy, template harmonicity, tensor harmonicity, and sensory roughness; and (iii) structural features for scales and rhythms, including Fourier‑based balance and evenness, coherence, edge detection, projected centroid, mean offset, and Markov prediction. All three families operate on the same weighted multiset representation of the musical input. These measures have been validated as predictors of perceived tonal fit, consonance, affect, and rhythmic complexity across diverse empirical studies, including experiments with microtonal tunings unfamiliar to the listeners tested, and cross‑cultural fieldwork. Version 2.0 introduces a fully analytical framework for constructing, evaluating, and comparing expectation tensor densities, replacing the grid‑based discretization of earlier work with exact and substantially faster computation. This article presents the mathematical foundations—including the first publication of the analytical inner product underlying the expectation tensor cosine similarity (derived in the Supplementary Material)—describes the toolbox’s design, works through an application characterizing chordal probes by both their tonal fit and their intrinsic consonance, and surveys its prior empirical applications.

DOI: https://doi.org/10.5334/tismir.392 | Journal eISSN: 2514-3298
Language: English
Page range: 526 - 543
Submitted on: Apr 8, 2026
Accepted on: Sep 1, 2026
Published on: Oct 6, 2026
Published by: Ubiquity Press
In partnership with: Paradigm Publishing Services

© 2026 Andrew J. Milne, published by Ubiquity Press
This work is licensed under the Creative Commons Attribution 4.0 License.