Comparing Pitch Spelling Algorithms

David Meredith, Geraint A. WigginsIsmir 2005

Abstract

Translating MIDI note numbers into correct musical pitch names—a process known as pitch spelling—is a fundamental challenge in music technology. This study evaluates several prominent algorithms against a balanced corpus of nearly 200,000 notes from eight Baroque and Classical composers. The results indicate that David Meredith’s ps1303 algorithm achieves the highest overall accuracy (99.43%), while the geometric Spiral Array Model by Chew and Chen offers the greatest consistency across varying musical styles.

The Pitch Spelling Problem

In digital music representation, the MIDI standard is "pitch-name agnostic." It records that a specific key was pressed (e.g., MIDI note 61) but does not distinguish between enharmonic equivalents like C# and Db. This ambiguity complicates automated music transcription and Music Information Retrieval (MIR). Accurate spelling requires understanding the musical context, including key signatures, scales, and harmonic progressions.

Context-dependent pitch spelling in a musical score.

Evaluated Algorithms and Methodology

The researchers compared several distinct computational approaches:

  • Rule-Based Systems: Longuet-Higgins (1987) utilizes a "theory of tonality" based on the line of fifths.
  • Interval Optimization: Cambouropoulos (1996-2003) uses overlapping windows to optimize pitch intervals based on traditional scale frequencies.
  • Preference Rule Systems: Temperley and Sleator (2001) rely on metrical structure and harmonic feedback within the Melisma system.
  • Geometric Models: Chew and Chen (2003-2005) employ the Spiral Array Model, representing pitches in a 3D helical structure to determine the "center of effect."
  • Two-Stage Statistical Models: Meredith (2003-2005) developed ps13 and ps1303, which first determine a local tonic through pitch class frequencies and then apply post-processing to correct errors in passing and neighbor notes.

The test corpus comprised 195,972 notes across 216 movements, balanced to include approximately 24,500 notes for each of eight composers: Corelli, Vivaldi, Telemann, J.S. Bach, Handel, Haydn, Mozart, and Beethoven.

Comparative Performance

The study revealed that context is the primary driver of accuracy. Meredith’s algorithms, which analyze both "pre-context" and "post-context," outperformed others in raw accuracy. However, performance varied significantly based on an algorithm's reliance on external factors like tempo. For instance, Temperley and Sleator’s accuracy dropped when metrical data was inaccurate, whereas Meredith’s and Chew-Chen’s models remained robust.

Accuracy percentages of various pitch spelling algorithms across eight composers.

A notable finding was the "Military" Symphony anomaly: a single enharmonic jump in Haydn’s Symphony No. 100 accounted for nearly 70% of the errors in the Temperley-Sleator model. This highlights the gap between "logical" harmonic spelling and "composer-preferred" notation used for readability.

Conclusion

While Meredith’s ps1303 is the most accurate algorithm for Baroque and Classical repertoire, Chew and Chen’s spiral array model demonstrates the lowest Style Dependence (SD), making it the most consistent across different composers. Future work should address the increased chromatic complexity of Romantic and modern music, as well as the scarcity of high-quality, correctly-spelled digital datasets for these genres.

Summary updated

BibTeX
@inproceedings{meredith2005comparing,
  author = {David Meredith and Geraint A. Wiggins},
  title = {{Comparing Pitch Spelling Algorithms}},
  booktitle = {Ismir},
  year = {2005},
}
Figure