A Real-Time Key-Finding Algorithm Based on the Signature of Fifths

Downloads

Authors

  • Paulina KANIA Faculty of Physics, Adam Mickiewicz University, Poland
  • Dariusz KANIA Faculty of Automatic Control, Electronics and Computer Science, Silesian University of Technology, Poland
  • Tomasz ŁUKASZEWICZ Faculty of Automatic Control, Electronics and Computer Science, Silesian University of Technology, Poland

Abstract

The signature of fifths is a special kind of music representation technique enabling acquisition of musical knowledge. The technique is based on geometrical relationships existing between twelve polar vectors inscribed in the circle of fifths, which represent individual pitch-classes detected in a given composition. In this paper we introduce a real-time key-detection algorithm which utilizes the concept of the signature of fifths. We explain how to create the signature of fifths and how to derive its descriptors required by the algorithm, i.e., the main directed axis of the signature of fifths, the major/minor mode axis, the characteristic vector of the signature of fifths, the characteristic angle of the signature of fifths, and the angle of the major/minor mode. We performed a series of experiments to test the algorithm’s effectiveness. The results were compared with those obtained using key-detection approaches based on key-profiles. All experiments were conducted using works composed by J.S. Bach, F. Chopin, and D. Shostakovich. The distinctive features of the presented algorithm, with respect to the considered key-detection approaches, are computational simplicity and stability of the decision-making process.

Keywords:

music key-detection, tonality, music information retrieval, music classification

References

1. Aarden B. (2003), Dynamic melodic expectancy, Ph.D. Thesis, Ohio State University.

2. Albrecht J., Shanahan D. (2013), The use of large corpora to train a new type of key-finding algorithm: An improved treatment of the minor mode, Music Perception: An Interdisciplinary Journal, 31(1): 59–67, https://doi.org/10.1525/mp.2013.31.1.59

3. Anglade A., Benetos E., Mauch M., Dixon S. (2010), Improving music genre classification using automatically induced harmony rules, Journal of New Music Research, 39(4): 349–361, https://doi.org/10.1080/09298215.2010.525654

4. Baumann S.A. (2021), Deeper convolutional neural networks and broad augmentation policies improve performance in musical key estimation, [in:] Proceedings of the 22nd International Society for Music Information Retrieval Conference, pp. 42–49.

5. Bellmann H. (2005), About the determination of key of a musical excerpt, [in:] Kronland-Martinet R., Voinier T., Ystad S. [Eds.], Computer Music Modeling and Retrieval, CMMR 2005, Lecture Notes in Computer Science, 3902: 76–91, https://doi.org/10.1007/11751069_7

6. Bernardes G., Cocharro D., Caetano M., Guedes C., Davies M.E.P. (2016), A multi-level tonal interval space for modelling pitch relatedness and musical dissonance, Journal of New Music Research, 45(4): 281–294, https://doi.org/10.1080/09298215.2016.1182192

7. Bernardes G., Davies M., Guedes C. (2017), Automatic musical key estimation with mode bias, [in:] 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 316–320, https://doi.org/10.1109/ICASSP.2017.7952169

8. Boulanger-Lewandowski N., Bengio Y., Vincent P. (2013), Audio chord recognition with recurrent neural networks, [in:] Proceedings of the 14th International Conference on Music Information Retrieval (ISMIR), pp. 335–340.

9. Cancino Chacón C.E., Lattner S., Grachten M. (2014), Developing tonal perception through unsupervised learning, [in:] The 15th International Society for Music Information Retrieval Conference, pp. 195–200.

10. Chapin H., Jantzen K., Kelso J.S., Steinberg F., Large E. (2010), Dynamic emotional and neural responses to music depend on performance expression and listener experience, PLOS ONE, 5(12): e13812, https://doi.org/10.1371/journal.pone.0013812

11. Chen T-P., Su L. (2018), Functional harmony recognition of symbolic music data with multi-task recurrent neural networks, [in:] Proceedings of the 19th ISMIR Conference, pp. 90–97.

12. Chew E. (2000), Towards a mathematical model of tonality, Ph.D. Thesis, Massachusetts Institute of Technology.

13. Chew E. (2007), Out of the grid and into the spiral: Geometric interpretations of and comparisons with the spiral-array model, Computing in Musicology, 15: 51–72.

14. Chuan C.-H., Chew E. (2005), Polyphonic audio key finding using the spiral array CEG algorithm, [in:] 2005 IEEE International Conference on Multimedia and Expo, pp. 21–24, https://doi.org/10.1109/ICME.2005.1521350

15. Chuan C.-H., Chew E. (2007), Audio key finding: Considerations in system design and case studies on Chopin’s 24 Preludes, EURASIP Journal on Advances in Signal Processing, 2007(1): 056561, https://doi.org/10.1155/2007/56561

16. Chuan C.-H., Chew E. (2014), The KUSC classical music dataset for audio key finding, The International Journal of Multimedia & Its Applications, 6(4): 1–18, https://doi.org/10.5121/ijma.2014.6401

17. Dawson M.R.W. (2018), Connectionist Representations of Tonal Music: Discovering Musical Patterns by Interpreting Artificial Neural Networks, AU Press, Athabasca, https://doi.org/10.15215/aupress/9781771992206.01

18. Deng J., Kwok Y-K. (2017), Large vocabulary automatic chord estimation using deep neural nets: Design framework, system variations and limitations, https://doi.org/10.48550/arXiv.1709.07153

19. Foscarin F., Audebert N., Fournier-S’Niehotta R. (2021), PKSpell: Data-driven pitch spelling and key signature estimation, [in:] Proceedings of the 22nd International Society for Music Information Retrieval Conference, pp. 197–204.

20. Gebhardt R., Lykartsis A., Stein M. (2018), A confidence measure for key labelling, [in:] Proceedings of the 19th International Symposium on Music Information Retrieval (ISMIR), pp. 3–9.

21. Gomez E., Herrera P. (2004), Estimating the tonality of polyphonic audio files: Cognitive versus machine learning modeling strategies, [in:] Proceedings of the 5th International Conference on Music Information Retrieval, pp. 92–95.

22. Harte C., Sandler M., Gasser M. (2006), Detecting harmonic change in musical audio, [in:] Proceedings of Special 1st ACM Workshop on Audio and Music Computing Multimedia, pp. 21–26, https://doi.org/10.1145/1178723.1178727

23. Herremans D., Chew E. (2019), MorpheuS: Generating structured music with constrained patterns and tension, IEEE Transactions on Affective Computing, 10(4): 520–523, https://doi.org/10.1109/TAFFC.2017.2737984

24. Hori T., Nakamura K., Sagayama S. (2017), Music chord recognition from audio data using bidirectional encoder-decoder LSTMs, [in:] 2017 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), pp. 1312–1315, https://doi.org/10.1109/APSIPA.2017.8282235

25. Huang C.-Z.A., Duvenaud D., Gajos K.Z. (2016), Chordripple: Recommending chords to help novice composers go beyond the ordinary, [in:] Proceedings of the 21st International Conference on Intelligent User Interfaces, pp. 241–250, https://doi.org/10.1145/2856767.2856792

26. Jacoby N., Tishby N., Tymoczko D. (2015), An information theoretic approach to chord categorization and functional harmony, Journal of New Music Research, 44(3): 219–244, https://doi.org/10.1080/09298215.2015.1036888

27. Kania D., Kania P. (2019), A key-finding algorithm based on music signature, Archives of Acoustics, 44(3): 447–457, https://doi.org/10.24425/aoa.2019.129260

28. Kania P. (2021), The parametrization of signature of fifths aimed at music data mining [in Polish: Parametryzacja sygnatury kwintowej ukierunkowana na pozyskiwanie wiedzy muzycznej], MSc. Thesis, Faculty of Physics, Adam Mickiewicz University in Poznan, Poland.

29. Kania P., Kania D., Łukaszewicz T. (2021a), A hardware-oriented algorithm for real-time music key signature recognition, Applied Sciences, 11(18): 8753, https://doi.org/10.3390/app11188753

30. Kania D., Kania P., Łukaszewicz T. (2021b), Trajectory of fifths in music data mining, IEEE Access, 9: 8751–8761, https://doi.org/10.1109/ACCESS.2021.3049266

31. Kania M., Łukaszewicz T., Kania D., Moscinska K., Kulisz J. (2022), A comparison of the music key detection approaches utilizing key-profiles with a new method based on the signature of fifths, Applied Sciences, 12(21): 11261, https://doi.org/10.3390/app122111261

32. Korzeniowski F., Widmer G. (2017), End-to-end musical key estimation using a convolutional neural network, [in:] Proceedings of the 25th European Signal Processing Conference (EUSIPCO), pp. 966–970.

33. Korzeniowski F., Widmer G. (2018), Genre-agnostic key classification with convolutional neural networks, [in:] 19th International Society for Music Information Retrieval Conference, pp. 264–270.

34. Krumhansl C.L. (1990), Cognitive Foundations of Musical Pitch, Oxford University Press, New York, https://doi.org/10.1093/acprof%3Aoso/9780195148367.001.0001

35. Krumhansl C.L., Kessler E.J. (1982), Tracing the dynamic changes in perceived tonal organization in a spatial representation of musical keys, Psychological Review, 89(4): 334–368, https://doi.org/10.1037/0033-295X.89.4.334

36. Longuet-Higgins H.C. (1962a), Letter to a musical friend, The Music Review, 23: 244–248.

37. Longuet-Higgins H.C. (1962b), Second letter to a musical friend, The Music Review, 23: 271–280.

38. Łukaszewicz T., Kania D. (2022), A music classification approach based on the trajectory of fifths, IEEE Access, 10: 73494–73502, https://doi.org/10.1109/ACCESS.2022.3190016

39. Masada K., Bunescu R. (2017), Chord recognition in symbolic music using semi-Markov conditional random fields, [in:] Proceedings of the 18th International Society for Music Information Retrieval Conference, pp. 272–278.

40. Mauch M., Dixon S. (2010), Approximate note transcription for the improved identification of difficult chords, [in:] Proceedings of the 11th International Society for Music Information Retrieval Conference, pp. 135–140.

41. McFee B., Bello J.P. (2017), Structured training for large-vocabulary chord recognition, [in:] Proceedings of the 18th International Conference on Music Information Retrieval (ISMIR), pp. 188–194.

42. Nápoles López N., Arthur C., Fujinaga I. (2019), Key-finding based on a hidden Markov model and key profiles, [in:] Proceedings of the 6th International Conference on Digital Libraries for Musicology, pp. 33–37, https://doi.org/10.1145/3358664.3358675
43. Nápoles López N., Feisthauer L., Leve F., Fujinaga I. (2020), On local keys, modulations, and tonicizations: A dataset and methodology for evaluating changes of key, [in:] Proceedings of the 7th International Conference on Digital Libraries for Musicology, pp. 18–26, https://doi.org/10.1145/3424911.3425515

44. Ni Y., McVicar M., Santos-Rodríguez R., De Bie T. (2013), Understanding effects of subjectivity in measuring chord estimation accuracy, IEEE Transactions on Audio, Speech, and Language Processing, 21(12): 2607–2615, https://doi.org/10.1109/TASL.2013.2280218

45. Osmalskyj J., Embrechts J.-J., Piérard S., van Droogenbroeck M. (2012), Neural networks for musical chords recognition, Journées d’Informatique Musicale, pp. 39–46.

46. Papadopoulos H., Peeters G. (2012), Local key estimation from an audio signal relying on harmonic and metrical structures, IEEE Transactions on Audio, Speech, and Language Processing, 20(4): 1297–1312, https://doi.org/10.1109/TASL.2011.2175385

47. Peeters G. (2006), Musical key estimation of audio signal based on HMM modeling of chroma vectors, [in:] Proceedings of the 9th International Conference on Digital Audio Effects, pp. 127–131.

48. Peiszer E., Lidy T., Rauber A. (2008), Automatic audio segmentation: Segment boundary and structure detection in popular music, [in:] Proceedings of the International Workshop on Learning the Semantics of Audio Signals, pp. 45–59.

49. Pérez-Sanchio C., Rizo D., Iñesta J.M., Ponce de León P.J., Kersten S. (2010), Genre classification of music by tonal harmony, Intelligent Data Analysis, 14(5): 533–545.

50. Quinn I., White C.W. (2017), Corpus-derived key profiles are not transpositionally equivalent, Music Perception, 34(5): 531–540, https://doi.org/10.1525/mp.2017.34.5.531

51. Raphael Ch., Stoddard J. (2004), Functional harmonic analysis using probabilistic models, Computer Music Journal, 28(3): 45–52.

52. Roig C., Tardón L.J., Barbancho I., Barbancho A.M. (2014), Automatic melody composition based on a probabilistic model of music style and harmonic rules, Knowledge-Based Systems, 71: 419–434, https://doi.org/10.1016/j.knosys.2014.08.018

53. Sabathé R., Coutinho E., Schuller B. (2017), Deep recurrent music writer: Memory-enhanced variational autoencoder-based musical score composition and an objective measure, [in:] 2017 International Joint Conference on Neural Networks (IJCNN), pp. 3467–3474, https://doi.org/10.1109/IJCNN.2017.7966292

54. Sapp C.S. (2001), Harmonic visualizations of tonal music, International Computer Music Conference (ICMC) 2001, pp. 423–430.

55. Shepard R. (1982), Geometrical approximations to the structure of musical pitch, Psychological Review, 89: 305–333, https://doi.org/10.1037/0033-295X.89.4.305

56. Sigtia S., Boulanger-Lewandowski N., Dixon S. (2015), Audio chord recognition with a hybrid recurrent neural network, [in:] 16th International Society for Music Information Retrieval Conference, pp. 127–133.

57. Temperley D. (2004), Bayesian models of musical structure and cognition, Musicae Scientiae, 8(2): 175–205, https://doi.org/10.1177/102986490400800204

58. Temperley D., Marvin E.W. (2008), Pitch-class distribution and key identification, Music Perception, 25(3): 193–212, https://doi.org/10.1525/mp.2008.25.3.193

59. Toiviainen P., Krumhansl C.L. (2003), Measuring and modeling real-time responses to music: The dynamics of tonality induction, Perception, 32(6): 741–766, https://doi.org/10.1068/p3312

60. Tymoczko D. (2006), The geometry of musical chords, Science, 313(5783): 72–74, https://doi.org/10.1126/science.1126287

61. Tymoczko D. (2011), A Geometry of Music: Harmony and Counterpoint in the Extended Common Practice, Oxford University Press, New York.

62. Weiss C. (2013), Global key extraction from classical music audio recordings based on the final chord, [in:] Proceedings of the Sound and Music Computing Conference, pp. 742–747.

63. Wu Y., Li W. (2018), Music chord recognition based on MIDI-trained deep feature and BLSTM-CRF hybrid decoding, [in:] International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 376–380, https://doi.org/10.1109/ICASSP.2018.8461439

64. Yang S., Reed C., Chew E., Barthet M. (2021), Examining emotion perception agreement in live music performance, IEEE Transactions on Affective Computing, 14: 1442–1460, https://doi.org/10.1109/TAFFC.2021.3093787

65. Yust J. (2019), Stylistic information in pitch-class distributions, Journal of New Music Research, 48(3): 217–231, https://doi.org/10.1080/09298215.2019.1606833

66. Zhou X.H., Lerch A. (2015), Chord detection using deep learning, [in:] Proceedings of SIMIR 2015, pp. 52–58.

Other articles by the same author(s)