Postdoc Jens Madsen is developing an algorithm which can find just the right music to suit your mood and situation from millions of tracks.
Jens Madsen from DTU Compute is crazy about music—or rather, what music does for him: It boosts his spirits, it gets him to relax, or it creates just the right party mood. Spotify, Wimp, TDC Play, and similar streaming services entice him with more than 30 million music numbers, but Jens Madsen is looking for a service which he can use to sort through the large data volumes and help people find the right music for a given situation. Therefore he is in the process of developing an algorithm which can predict which feelings a given track will induce.
‘You can search by artist or title, and there are also playlists and radio channels based on previous choices, but this is of course limited by what you know or have listened to previously. I want a service that builds on a deeper understanding of both the user and the music,’ says Jens.
Jens Madsen first studied for a Bachelor of Engineering in Information Technology degree at Aarhus University School of Engineering, and was then an intern at Bang & Olufsen A/S. However, he wanted to explore sound in greater depth, and therefore continued his studies with an Master’s degree at DTU Electrical Engineering where he focused on sound perception. Afterwards, he continued at DTU Compute, where he started to look at the cognitive aspects of sound and people’s feelings in relation to music, and did a PhD project to create these musical algorithms.
“An algorithm will, of course, never be able to describe the magic in the music. All I want to do is to describe which aspects of the music make you happy, or arouse other feelings within you. ”
Postdoc Jens Madsen, DTU ComputeThe first step involved finding out why we listen to music in the first place.
‘I had to disassociate myself from numbers and equations, and immerse myself in psychological literature. This confirmed that, like me, many people use music to regulate their feelings—both for the positive and the negative,’ says Jens.
‘However, there can also be unpredictable factors such as unique links between a feeling and a specific piece of music. Therefore, I chose to focus on the feelings which are expressed by the music, rather than on the feelings that people say they feel when listening to music.’
To start with, Jens chose 20 pieces of music which he asked his test subjects to categorize on a scale from one to 10. However, it proved too difficult to classify the pieces individually when listening to all them from the top. Instead, he switched to asking people to choose the most cheerful piece of music, for example. This, on the other hand, gave rise to too many possible comparisons, so he was forced to design some algorithms which could select the music pair which made most sense to ask about.
What effect does the music have?
The next step was to describe the actual music, i.e. the aspects which have an effect. Is the timbre or dynamics, how it is played, or something to do with the energy in the different frequency areas and the connection between the tones? Jens was becoming immersed in the science of music.
‘I used hundreds of parameters in my initial studies to find out which aspects best explained the emotional annotations which the test subjects had noticed. The aim was to arrive at a model which could predict the annotations,’ explains Jens Madsen.
He has now received a postdoc grant, and is about to start his third study. The methodology is slowly but surely beginning to fall into place, so he can include a lot more music in the study. Finally, he is beginning to realize his dream: An algorithm that can predict which feelings a random piece of music will evoke.
Musicians are sceptical about Jens’ project—they don’t like the idea of transferring delicate feelings and beauty to a coordinate system.
‘An algorithm will, of course, never be able to describe the magic in the music. All I want to do is to describe which aspects of the music make you happy, or arouse other feelings within you. And I think it’s possible,’ he says.
‘At the end of the day, I want to produce a tool which will be useful—a sort of psychological tool without side effects. The worst an algorithm can do is suggest a music number which irritates you—but it won’t harm you in any way.’