Bandeau de titre - Opéra-Conseil

Music and Artificial Intelligence

While some applications of artificial intelligence are already well-known, there are others that are less recognized but have significant development potential. This is the case in the field of music. Sound is a unique type of data that doesn't have the classic tabular structure; it's a waveform. Using sounds as input data for a machine learning model requires processing and measurements on the waveform, which have advanced considerably in recent years, particularly thanks to the Python library Librosa.

Librosa - Musique et intelligence artificielle - Blog - Opéra-Conseil

The field of music benefits from numerous opportunities thanks to artificial intelligence, with possibilities for automatic classification of styles or automatic generation of music from examples. Generating music with artificial intelligence poses the challenge of accounting for temporal events. Classic machine learning models such as feedforward neural networks are not well-suited for this. As illustrated in the diagram below, such a model designed to generate a note following an existing melody would make the same prediction if given either Do-Re-Mi-Fa-Sol or Sol-Fa-Mi-Re-Do, because the notes are the same and this model doesn't consider the order in which they appear. However, for a musician, these are obviously two different melodies, and the possibilities that come to mind for continuing them are, of course, not the same.

Schema d'un réseau de nerones classique - Musique et intelligence artificielle - Blog - Opéra-Conseil
Schéma d'un réseau de neurones récurrent - Musique et intelligence artificielle - Blog - Opéra-Conseil

Such a model imposes more complexity for the data scientist but is theoretically capable of finishing a piece from its beginning or generating music in the style of examples it has learned from. For instance, it would be possible to train a model with all of Mozart's piano sonatas and use it to generate piano music in Mozart's style. A perfectly trained model might give the impression of having done 'as well as' Mozart himself to the ear, but the artistic value of such an approach should be viewed with caution, as this model would only be an imitator of Mozart, since it learned from the music written by the composer. It would be very risky to equate a genius with an imitator of that genius. To claim that an artificial intelligence has truly done 'as well as' Mozart, it would need to generate music of the same quality and innovation as the composer without having used any of Mozart's music for training. The model would need to have learned only from music strictly prior to 1756 (Mozart was born on January 27, 1756, and began music almost immediately!). It must be acknowledged that current machine learning techniques do not offer this capability. However, if 'all thought is the result of calculation,' there must be a way to mathematically reconstruct the thought process of a genius when creating something completely new.


Discover more articles from our blog