journal article·2026-06-21Open access

Automatic Musical Key Detection Using the CQT-Based Triple Composite Signature of Fifths

Tomasz Łukaszewicz, Dariusz Kania

Applied Sciences· Volume 16· Issue 12

Abstract

The article presents an original approach to automatic musical key detection, combining Constant-Q Transform (CQT) analysis with the Triple Composite Signature of Fifths (TCSF). The method’s novelty lies primarily in the construction of the Signature of Fifths (SF), which is grounded in fundamental principles of music theory and builds on earlier SF-based studies. The proposed approach aims to preserve the algorithmic simplicity typical of SF approaches while strengthening their key advantages. In addition, the method reflects the analytical approach of experienced musicians by assigning greater importance to the initial and final sections of a piece. The use of CQT enables efficient audio analysis and offers a practical compromise between frequency resolution and alignment with the pitch-class representation. Experiments conducted on Franz Schubert’s songs from the Winterreise song cycle and Frédéric Chopin’s Preludes, Op. 28, confirm the effectiveness of the proposed algorithm, achieving 87.5% and 79.2% key-detection accuracy, respectively. The obtained results demonstrate that the proposed method is competitive with tonal profile-based key-detection approaches.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Music and Audio Processing · Music Technology and Sound Studies · Neuroscience and Music Perception

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Digital Systems, Faculty of Automatic Control, Electronics and Computer Science, Silesian University of Technology, 44-100 Gliwice, Poland

References (79)

Show source-provided references
1. Multichannel signal processing with deep neural networks for automatic speech recognition10.1109/TASLP.2017.2672401 ↗
2. Deep learning based real-time speech enhancement for dual-microphone mobile phones10.1109/TASLP.2021.3082318 ↗
3. Weiß, C., Brand, F., and Müller, M. (2019, January 12–17). Mid-level chord transition features for musical style analysis. Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP 2019), Brighton, UK.10.1109/ICASSP.2019.8682293 ↗
4. Ding, X., Zhang, Y., Li, G., Gao, X., Ye, N., Niyato, D., and Yang, K. (2026). Few-Shot Recognition and Classification Framework for Jamming Signal: A CGAN-Based Fusion CNN Approach. IEEE Trans. Veh. Technol., 1–16.10.1109/TVT.2026.3678290 ↗
5. Music information retrieval: Recent developments and applications10.1561/1500000042 ↗
6. Classification accuracy is not enough. On the evaluation of music genre recognition systems10.1007/s10844-013-0250-y ↗
7. Wide ensembles of neural networks in music genre classification
8. A music classification approach based on the trajectory of fifths10.1109/ACCESS.2022.3190016 ↗
9. Trajectory of fifths based on chroma subbands extraction—A new approach to music representation, analysis, and classification10.1109/TPAMI.2024.3519420 ↗
10. Automatic music genre classification based on musical instrument track separation10.1007/s10844-017-0464-5 ↗
11. Chapin, H., Jantzen, K., Kelso, J.S., Steinberg, F., and Large, E. (2010). Dynamic emotional and neural responses to music depend on performance expression and listener experience. PLoS ONE, 5.10.1371/journal.pone.0013812 ↗
12. Juslin, P.N., and Sloboda, J.A. (2010). Handbook of Music and Emotion: Theory, Research, Applications, Oxford University Press.10.1093/acprof:oso/9780199230143.001.0001 ↗
13. Novel audio features for music emotion recognition10.1109/TAFFC.2018.2820691 ↗
14. Automatic melody composition based on a probabilistic model of music style and harmonic rules10.1016/j.knosys.2014.08.018 ↗
15. Examining emotion perception agreement in live music performance10.1109/TAFFC.2021.3093787 ↗
16. Cho, T. (2013). Improved Techniques for Automatic Chord Recognition From Music Audio Signals. [Ph.D Thesis, New York University].
17. Harte, C., Sandler, M., and Gasser, M. (2006, January 27). Detecting harmonic change in musical audio. Proceedings of the 1st ACM Workshop on Audio and Music Computing Multimedia, Santa Barbara, CA, USA.10.1145/1178723.1178727 ↗
18. Music emotion recognition based on deep learning: A review10.1109/ACCESS.2024.3484470 ↗
19. Mauch, M. (2010). Automatic Chord Transcription from Audio Using Computational Models of Musical Context. [Ph.D Thesis, Queen Mary University of London].
20. Adaptive pooling operators for weakly labeled sound event detection
21. Pauwels, J., and Peeters, G. (2019, January 4–8). Twenty years of automatic chord recognition from audio. Proceedings of the 20th International Society for Music Information Retrieval Conference (ISMIR 2019), Delft, The Netherlands.
22. Bittner, R.M., McFee, B., Salamon, J., Li, P., and Bello, J.P. (2017, January 23–27). Deep salience representations for F0 estimation in polyphonic music. Proceedings of the 18th International Society for Music Information Retrieval Conference (ISMIR 2017), Suzhou, China.
23. Briot, J.-P., Hadjeres, G., and Pachet, F.-D. (2020). Deep Learning Techniques for Music Generation, Springer.10.1007/978-3-319-70163-9 ↗
24. Deep learning-based audio and music processing: A review
25. Application research of short-time Fourier transform in music generation based on the parallel WaveGAN system10.1109/TII.2024.3397344 ↗
26. Temperley, D. (2001). The Cognition of Basic Musical Structures, MIT Press.
27. Music emotion recognition: Toward new, robust standards in personalized and context-sensitive applications
28. Musical performance analysis in terms of emotions it evokes10.1007/s10844-018-0510-y ↗
29. Music emotion recognition using convolutional long short term memory deep neural networks
30. Audio features for music emotion recognition: A survey10.1109/TAFFC.2020.3032373 ↗
31. Music emotion classification based on lyrics-audio using corpus based emotion
32. Music emotion classification method using improved deep belief network
33. Duan, Z., Lu, L., and Zhang, C. (2008, January 23–26). Audio tonality mode classification without tonic annotations. Proceedings of the IEEE International Conference on Multimedia and Expo (ICME 2008), Hannover, Germany.
34. Trajectory of fifths in tonal mode detection10.1109/ACCESS.2025.3584400 ↗
35. Kong, Y., Meseguer-Brocal, G., Lostanlen, V., Lagrange, M., and Hennequin, R. (2025). S-KEY: Self-supervised learning of major and minor keys from audio. arXiv.10.1109/ICASSP49660.2025.10890222 ↗
36. Automatic key detection in audio recordings using the signature of fifths10.1109/ACCESS.2025.3609536 ↗
37. Niedermayer, B., Böck, S., and Widmer, G. (2011, January 24–28). On the importance of ‘real’ audio data for MIR algorithm evaluation at the note-level—A comparative study. Proceedings of the 12th International Society for Music Information Retrieval Conference (ISMIR 2011), Miami, FL, USA.
38. MTD: A multimodal dataset of musical themes for MIR research
39. Elbir, A., Ilhan, H.O., Serbes, G., and Aydin, N. (2018, January 26–27). Short time Fourier transform based music genre classification. Proceedings of the 4th Electric Electronics, Computer Science, Biomedical Engineerings’ Meeting (EBBT 2018), Istanbul, Turkey.10.1109/EBBT.2018.8391437 ↗
40. Gillan, A.R., and Hill, P.R. (2019, January 12–17). Harmonic-band complex wavelet transform audio analysis and synthesis. Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP 2019), Brighton, UK.10.1109/ICASSP.2019.8683539 ↗
41. Audio classification and categorization based on wavelets and support vector machine10.1109/TSA.2005.851880 ↗
42. Popescu, A., Gavat, I., and Datcu, M. (2009, January 18–21). Wavelet analysis for audio signals with music classification applications. Proceedings of the 5th Conference on Speech Technology and Human-Computer Dialogue (SpeD 2009), Constanta, Romania.10.1109/SPED.2009.5156187 ↗
43. A framework for invertible, real-time constant-Q transforms10.1109/TASL.2012.2234114 ↗
44. Velasco, G.A., Holighaus, N., Dörfler, M., and Grill, T. (2011, January 19–23). Constructing an invertible constant-Q transform with nonstationary Gabor frames. Proceedings of the 14th International Conference on Digital Audio Effects (DAFx-11), Paris, France.
45. Yu, Z., Xu, X., Chen, X., and Yang, D. (2020, January 11–16). CQTNET: Constant-Q transform network for cover song identification. Proceedings of the Music Information Retrieval Evaluation eXchange (MIREX 2020), Montréal, QC, Canada.
46. Chang, S., Lee, J., Choe, S.K., and Lee, K. (2017, January 8–9). Audio cover song identification using convolutional neural network. Proceedings of the Workshop on Machine Learning for Audio Signal Processing at NIPS, Long Beach, CA, USA.
47. Telila, Y., Cucinotta, T., and Bacciu, D. (2023, January 29–31). Automatic music transcription using convolutional neural networks and constant-Q transform. Proceedings of the 3rd National CINI Conference on Artificial Intelligence, Pisa, Italy.
48. Chivapreecha, S., Sinjanakhom, T., and Trirat, A. (2022, January 7–9). Musical Key Classification Using Convolutional Neural Network Based on Extended Constant-Q Chromagram. Proceedings of the 2022 International Symposium on Intelligent Signal Processing and Communication Systems (ISPACS), Penang, Malaysia.10.1109/ISPACS57703.2022.10082833 ↗
49. McLoughlin, I., Pham, L., Song, Y., Miao, X., Phan, H., Cai, P., Gu, Q., Nan, J., Song, H., and Soh, D. (2026). Spectrogram Features for Audio and Speech Analysis. Appl. Sci., 16.10.3390/app16020572 ↗
50. Chew, E. (2000). Towards a Mathematical Model of Tonality. [Ph.D Thesis, Massachusetts Institute of Technology].
51. Out of the grid and into the spiral: Geometric interpretations of and comparisons with the spiral-array model
52. Letter to a musical friend
53. A multi-level tonal interval space for modelling pitch relatedness and musical dissonance10.1080/09298215.2016.1182192 ↗
54. Euler, L. (1739). Tentamen Novae Theoriae Musicae ex Certissismis Harmoniae Principiis Dilucide Expositae, Saint Petersburg Academy.
55. Second letter to a musical friend
56. Geometrical approximations to the structure of musical pitch10.1037/0033-295X.89.4.305 ↗
57. Dawson, M. (2018). Connectionist Representations of Tonal Music: Discovering Musical Patterns by Interpreting Artificial Neural Networks, Athabasca University Press.10.15215/aupress/9781771992206.01 ↗
58. Deng, J., and Kwok, Y.-K. (2017). Large vocabulary automatic chord estimation using deep neural nets: Design framework, system variations and limitations. arXiv.
59. Korzeniowski, F., and Widmer, G. (September, January 28). End-to-end musical key estimation using a convolutional neural network. Proceedings of the 25th European Signal Processing Conference (EUSIPCO 2017), Kos, Greece.10.23919/EUSIPCO.2017.8081351 ↗
60. Zhou, X.-H., and Lerch, A. (2015, January 26–30). Chord detection using deep learning. Proceedings of the 16th International Society for Music Information Retrieval Conference (ISMIR 2015), Malaga, Spain.
61. Huang, C.-Z.A., Duvenaud, D., and Gajos, K.Z. (2016, January 7–10). Chordripple: Recommending chords to help novice composers go beyond the ordinary. Proceedings of the 21st International Conference on Intelligent User Interfaces (IUI 2016), Sonoma, CA, USA.10.1145/2856767.2856792 ↗
62. EmoMusicTV: Emotion-conditioned symbolic music generation with hierarchical transformer VAE10.1109/TMM.2023.3276177 ↗
63. Sabathé, R., Coutinho, E., and Schuller, B. (2017, January 14–19). Deep recurrent music writer: Memory-enhanced variational autoencoder-based musical score composition and an objective measure. Proceedings of the International Joint Conference on Neural Networks (IJCNN 2017), Anchorage, AK, USA.10.1109/IJCNN.2017.7966292 ↗
64. Wu, X., Huang, Z., Zhang, K., Yu, J., Tan, X., Zhang, T., Wang, Z., and Sun, L. (2023). MelodyGLM: Multi-task pre-training for symbolic melody generation. arXiv.
65. The use of large corpora to train a new type of key-finding algorithm: An improved treatment of the minor mode10.1525/mp.2013.31.1.59 ↗
66. MorpheuS: Generating structured music with constrained patterns and tension10.1109/TAFFC.2017.2737984 ↗
67. A key-finding algorithm based on music signature10.24425/aoa.2019.129260 ↗
68. Krumhansl, C.L. (1990). Cognitive Foundations of Musical Pitch, Oxford University Press.
69. Pitch-class distribution and key identification10.1525/mp.2008.25.3.193 ↗
70. Aarden, B.J. (2003). Dynamic Melodic Expectancy. [Ph.D. Thesis, The Ohio State University].
71. Bellmann, H. (2006, January 19–23). About the determination of key of a musical excerpt. Proceedings of the International Symposium on Computer Music Modeling and Retrieval (CMMR 2006), Copenhagen, Denmark. Lecture Notes in Computer Science.10.1007/11751069_7 ↗
72. Kania, P., Kania, D., and Łukaszewicz, T. (2021). A hardware-oriented algorithm for real-time music key signature recognition. Appl. Sci., 11.10.3390/app11188753 ↗
73. Kania, M., Łukaszewicz, T., Kania, D., Mościńska, K., and Kulisz, J. (2022). A comparison of the music key detection approaches utilizing key-profiles with a new method based on the signature of fifths. Appl. Sci., 12.10.3390/app122111261 ↗
74. Trajectory of fifths in music data mining10.1109/ACCESS.2021.3049266 ↗
75. Trajektoria kwintowa–dwuwymiarowa reprezentacja muzyki
76. A real-time key-finding algorithm based on the signature of fifths10.24425/aoa.2024.148817 ↗
77. (2026, February 01). Kunst der Fuge. Available online: https://www.kunstderfuge.com/chopin.htm.
78. (2026, February 01). Schubert Winterreise Dataset. Available online: https://zenodo.org/record/4122060#.YvY4YXZByUk.
79. (2026, February 01). Librosa Python Package (Version 0.11.0). Available online: https://librosa.org.