Skip to main content

Pereval: Piano Performance Evaluation toolkit

Integrating Contextual Embeddings into Evaluation of Expressive MIDI Piano Performances

arXiv PyPI

Dmitrii Gavrilev, Ilya Borovik, and Vladimir Viro

This is an official repository for the paper "Integrating Contextual Embeddings into Evaluation of Expressive MIDI Piano Performances" (Accepted at ISMIR 2026).

Documentation (WIP)

Overview

In this paper, we tackle the problem of evaluating and comparing sets of piano MIDI performances.

Traditional metrics (which we coin attribute-scoped), such as Pearson correlation and reconstruction error, that are most commonly used in Expressive Performance Rendeering (EPR) have several drawbacks. Namely, they are limited by a single expressive attribute, such as tempo, articulation, and dynamics of a performance, disregarding other musical aspects and context. Second, they often require a note-level alignment between a score and a performance, hindering the scalability of evaluation.

We adapt recently proposed kernel-based methods from image and audio generation domains for EPR. Deep feature metrics, Kernel Music Distance (KMD) and Kernel Performance Distance (KPD), leverage rich contextual features from Aria and CLaMP3 symbolic music understanding models. The adapted metrics are scalable (do not require alignments) and contextual.

In short, this project aims to go beyond the traditional metrics for expressive MIDI piano performances and unify them under one toolkit to simplify evaluation routines for MIR practitioners.

Fidelity Diversity Alignment-free Score-aware Contextual Per-sample
Reconstruction error ✅ ❌ ❌ ✅ ❌ ✅
Inter-correlation ✅ ❌ ❌ ✅ ❌ ✅
Intra-correlation ❌ ✅ ❌ ✅ ❌ ❌
KL Divergence ✅ ✅ ✅ ❌ ❌ ❌
Fréchet Music Distance ✅ ✅ ✅ ❌ ✅ ✅
Kernel Music Distance ✅ ✅ ✅ ❌ ✅ ✅
Kernel Performance Distance ✅ ✅ ✅ ✅ ✅ ✅
Mahalanobis Distance ✅ ❌ ✅ ✅ ✅ ✅
Relative Mahalanobis Distance ✅ ❌ ✅ ✅ ✅ ✅
Marginal Mahalanobis Distance ✅ ❌ ✅ ❌ ✅ ✅

Comparison of attribute-scoped and deep feature metrics for evaluating MIDI piano performances.

Installation

  1. Prerequisites:
  1. Install pereval:
pip install -U pereval

Repository structure:

  • /pereval/ contains the main utilities (such as alignment, feature extraction, calculation of attribute-scoped and deep feature metrics) used in our research paper
  • /examples/ contains the notebooks for data analysis and examples of usage

Command-line interface: Please refer to the documentation for examples of CLI usage.

Notebooks:

  • kpd_estimation.ipynb - Kernel Performance Distance between two sets of MIDI performances
  • mahalanobis_pseudo_ratings.ipynb - comparing Mahalanobis-based Aria pseudo-ratings with human MOS from the listening test

Acknowledgements

We would like to thank the authors of FADtk, KADtk, Aria, CLaMP3, Parangonar, and symusic for their open source contributions in music and audio research.

Metadata

Release files for pereval 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pereval 0.2.0
File Size Uploaded Provenance Actions
pereval-0.2.0.tar.gz 18.2 kB Without provenance Details for pereval-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pereval 0.2.0
File Interpreter ABI Platform Actions
pereval-0.2.0-py3-none-any.whl Python 3 none any Details for pereval-0.2.0-py3-none-any.whl

Total release size: 40.6 kB

Release files / pereval-0.2.0.tar.gz

Download URL pereval-0.2.0.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6b3b612865862068cf7cc38fc25f0f1f399c9b02d13af2c49919eb8d357d3c26
BLAKE2b-256 checksum
How to use checksums
dc14c43c6f8e5c21e60468b60d4bc2794a4dce574db346c540a38f16b776f13a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.14 Linux/5.4.0-172-generic

Release files / pereval-0.2.0-py3-none-any.whl

Download URL pereval-0.2.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
138032ef80685e2aa539077f59c9252a97b9fbda1501b4a72eb46738755cfc47
BLAKE2b-256 checksum
How to use checksums
02cdb08b18a287f4addd633c5bf1101eb0ae858ae1d41c8ae901c4db4223bfd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.14 Linux/5.4.0-172-generic

Security for pereval 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page