Musical Key Detection Using a Triple Composite Signature of Fifths - Łukaszewicz, Tomasz; Kania, Dariusz (Archives of Acoustics, 2026)
The article introduces a novel algorithm for key detection in musical compositions represented in symbolic form, such as MIDI. The method is based on the analysis of the triple composite signature of fifths, which is formed by combining the signatures of fifths obtained individually for the beginning, end, and entirety of the analyzed piece. The key is determined by the sign of the angle between the characteristic vector of the triple composite signature of fifths and the major/minor mode axis derived from that signature. To evaluate the algorithm’s effectiveness, experiments were conducted using Chopin’s Preludes, Op. 28, pieces from the Saarland Music Data: MIDI-Audio Piano Music, as well as pieces from the Schubert Winterreise Dataset. As a reference method, a correlation-based algorithm implementing various tonal profiles was used. The proposed algorithm achieved the highest accuracy for Chopin’s Preludes and the Schubert Winterreise Dataset (91.67% in both cases), while for the Saarland Music Data, its accuracy was lower than that of the correlational approaches (72.34%). The main advantages of the presented algorithm are low computational complexity, stable decision-making when extending the analytical window, as well as incorporation of expert analysis aspects, particularly by focusing on the beginning and end of the composition.