Identification of Musical Key, Mode, and Style Using Various Supervised Machine Learning Methods
ISEF · 2025 Technology Enhances the Arts
Overview
In the last decade, there have been monumental breakthroughs regarding the use of artificial intelligence in "human" fields, such as language and art. Coinciding with these developments, there has also been an unprecedented uptick in the social relevance of digital music, both as a medium for entertainment and creative expression. Hence, there is a growing need for software that can effectively classify, analyze, manipulate, and potentially create digital music. The purpose of this project was to develop these machine learning (ML) models to identify key, mode, and style in works of classical music with an accuracy of at least 80%. First, a dataset of ~4,000 MIDI files, went through extensive data preprocessing to clean and prepare the input features. Using various multiclass ML classifiers, like SVCs and KNN classifiers, models were then trained to identify each desired musical property individually. The most effective of these ML models were hyperparametrically fine-tuned to best optimize their methods. The final ML models identified the key, mode, and style of unseen data to an accuracy of ~95%, ~96%, and ~88%, respectively. Confusion matrices and learning curves were used to analyze the behavior of the classifiers. The models developed throughout this project consistently outperform commercial models, like Mixed in Key, and academic/research models, like MIT’s music21, despite there being limitations in the training dataset. Some of the many applications of the model include better algorithmic music classification, music analysis methods, and future development of tonal algorithms for artificial music generation.
Competition history
- ISEF 2025
Resources
Related projects
ISEF · 2024
Creating an Artificial Intelligence Neural Network to Critique Expressive Piano Performance
ISEF · 2022
Analyzing the Musical "Genome" With Neural Networks
ISEF · 2019
Machine Learning Approach for Harmonizing Songs
ISEF · 2018
A Fast and Accurate Open-Source Solo Musical Instrument Classifier
Closest projects by meaning, across every fair and year in the corpus.
Source: Regeneron International Science and Engineering Fair