Music score comparison made easier with new tree-based algorithm
TSM diff: A new Parallel-Tree-Traversal Algorithm for the Comparison of Music Score Files
Multimedia
Summary
Comparing digital music scores is tricky because they have complex structures, unlike plain text files. The authors developed an algorithm that converts music scores into a graph-like model, then finds differences based on timing and notation. Their method also gives scores telling how much two versions differ, combining both timing and notation changes. They built a tool implementing this algorithm and tested it on Mozart sonatas and jazz transcriptions, showing it works efficiently.
What this means in practice
- •For music software developers: Integrate the tool to enable precise comparison and version tracking of complex digital music scores.
- •For digital music publishers: Use the algorithm to verify and manage differences between score editions and transcriptions efficiently.
Authors
Xiaobo Wang, Florent Jacquemard
Abstract
Music score files are more difficult to compare than their text-based equivalents, as their content is more complex and organised into hierarchical structures. This explains the lack of tools for processing music scores similar to the widely used old Unix diff command. We propose a new algorithm and tool for comparing digital music scores in various encodings, such as MusicXML or MEI, based on a graph-structured abstract representation called Tree Score Model (TSM). Given two scores, after conversion into TSM, our procedure calculates jointly: A list of differences, localised by time positions in the input scores; A time distance, cumulated duration of time-spans where scores differ; An edit distance, called surface distance, based on notational attributes not related to time. The two later measures are normalised and combined into a similarity distance between scores. Our procedure has been implemented in C++ and is available as a Python module. Our first experiments have shown a very good efficiency even on challenging data. As a proof of concept, we propose two demos based on different versions of some Mozart's piano sonata, and transcriptions of monophonic soli on the same jazz standards by different performers. https://tsm-diff-lbd-7a7e2a.gitlab.io/demo.html