Exploring the Features to Classify the Musical Period of Western Classical Music
Total Page:16
File Type:pdf, Size:1020Kb
Technological University Dublin ARROW@TU Dublin Dissertations School of Computer Sciences 2018 Exploring the Features to Classify the Musical Period of Western Classical Music Arturo Martínez Gallardo Technological University Dublin Follow this and additional works at: https://arrow.tudublin.ie/scschcomdis Part of the Computer Sciences Commons Recommended Citation Gallardo, Arturo Martínez (2018). Exploring the features to classify the musical period of western classical music. Masters dissertation, DIT, 2018. This Dissertation is brought to you for free and open access by the School of Computer Sciences at ARROW@TU Dublin. It has been accepted for inclusion in Dissertations by an authorized administrator of ARROW@TU Dublin. For more information, please contact [email protected], [email protected]. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 4.0 License Exploring the features to classify the musical period of Western classical music Arturo Martínez Gallardo A dissertation submitted in partial fulfilment of the requirements of Dublin Institute of Technology for the degree of M.Sc. in Computing (Data Analytics) January 2018 DECLARATION I certify that this dissertation which I now submit for examination for the award of MSc in Computing (Data Analytics), is entirely my own work and has not been taken from the work of others save and to the extent that such work has been cited and acknowledged within the test of my work. This dissertation was prepared according to the regulations for postgraduate study of the Dublin Institute of Technology and has not been submitted in whole or part for an award in any other Institute or University. The work reported on in this dissertation conforms to the principles and requirements of the Institute’s guidelines for ethics in research. Signed: Arturo Martínez Gallardo Date: 29 January 2018 i ABSTRACT Music Information Retrieval (MIR) focuses on extracting meaningful information from music content. MIR is a growing field of research with many applications such as music recommendation systems, fingerprinting, query-by-humming or music genre classification. This study aims to classify the styles of Western classical music, as this has not been explored to a great extent by MIR. In particular, this research will evaluate the impact of different music characteristics on identifying the musical period of Baroque, Classical, Romantic and Modern. In order to easily extract features related to music theory, symbolic representation or music scores were used, instead of audio format. A collection of 870 Western classical music piano scores was downloaded from different sources such as KernScore library (humdrum format) or the Musescore community (MusicXML format). Several global features were constructed by parsing the files and accessing the symbolic information, including notes and duration. These features include melodic intervals, chord types, pitch and rhythm histograms and were based on previous studies and music theory research. Using a radial kernel support vector machine algorithm, different classification models were created to analyse the contribution of the main musical properties: rhythm, pitch, harmony and melody. The study findings revealed that the harmony features were significant predictors of the music styles. The research also confirmed that the musical styles evolved gradually and that the changes in the tonal system through the years, appeared to be the most significant change to identify the styles. This is consistent with the findings of other researchers. The overall accuracy of the model using all the available features achieved an accuracy of 84.3%. It was found that of the four periods studied, it was most difficult to classify music from the Modern period. Key words: MIR, Supervised machine learning, music genre classification, symbolic representation, Western classical music, Support Vector Machine ii ACKNOWLEDGEMENTS I would like to express my sincere thanks to my supervisor Andrea Curley, for her support, direction and guidance during the development of this dissertation. Her musical knowledge was particularly helpful. Thank you to all my lecturers at DIT. I learnt a lot from each of them and the knowledge they passed on to me was vital to complete this work. Finally and especially, I would like to express my deep gratitude to my lovely wife, Áine. I would like to thank her for her patience, help and support when I most needed it. This dissertation is dedicated to the memory of my father, who passed away just weeks before I started this course. His continuous listening to classical music, developed my enthusiasm for music. I only wish I could have shared and discussed the process and findings of this thesis with him. iii TABLE OF CONTENTS Declaration .................................................................................................................... i Abstract ........................................................................................................................ ii Acknowledgements ..................................................................................................... iii Table of contents ......................................................................................................... iv Table of figures .......................................................................................................... vii Table of tables ........................................................................................................... viii 1. Introduction ........................................................................................................... 1 1.1 Background ...................................................................................................... 1 1.2 Research problem ............................................................................................. 1 1.3 Research objectives .......................................................................................... 2 1.4 Research methodology ..................................................................................... 3 1.5 Scope and limitations ....................................................................................... 3 1.6 Document Outline ............................................................................................ 4 2. Literature review .................................................................................................. 6 2.1 Introduction ...................................................................................................... 6 2.2 What is MIR ..................................................................................................... 6 2.3 Music data representations ............................................................................... 7 2.3.1 Audio formats ............................................................................................ 7 2.3.2 Symbolic notation formats ......................................................................... 8 2.4 Music score notation system fundamentals ...................................................... 9 2.5 Music genre classification .............................................................................. 12 2.5.1 Feature extraction ................................................................................... 12 2.5.2 Machine learning algorithms .................................................................. 15 2.5.3 Variable ranking ...................................................................................... 16 2.6 Classical Music time period classification ..................................................... 16 2.7 Conclusion ...................................................................................................... 17 iv 3. Design of the experiment .................................................................................... 19 3.1 Introduction .................................................................................................... 19 3.2 Design overview ............................................................................................. 19 3.3 Data collection ................................................................................................ 20 3.3.1 Music formats used .................................................................................. 20 3.3.2 Score collection process .......................................................................... 21 3.3.3 Labelling the dataset................................................................................ 22 3.3.4 Dataset overview ..................................................................................... 23 3.4 Data preparation ............................................................................................. 24 3.4.1 Feature extraction ................................................................................... 24 3.4.2 Data cleaning........................................................................................... 32 3.4.3 Data transformation ................................................................................ 34 3.5 Modelling ....................................................................................................... 36 3.5.1 Group features in categories ................................................................... 36 3.5.2 Variable ranking .....................................................................................