Abstract
We performed an unsupervised cluster analysis of emotions in music. We considered ten distinct perceived emotions (happy, sad, amusing, annoying, anxious, relaxing, dreamy, energizing, joyful, and neutral) from four genres (rock, pop, classical, and electronic). We first clustered emotions based on their co-occurrence across songs, revealing that the emotion pairs of amusing/annoying, energizing/anxious, and relaxing/sad exhibited a strong correlation. We then clustered the songs into eight groups using the random swap clustering algorithm based on their emotional profiles (the distribution of emotion ratings for each song). The results revealed six clusters with one dominant emotion (relaxing, annoying, happy, amusing, anxious, and dreamy), one cluster with no emotion (neutral), and one cluster with an equal distribution of all emotions. Notably, some song clusters included both positive and negative emotions, thereby highlighting the presence of mixed emotional responses to music. The results are informative for future studies on emotions and emotional responses to music. These findings deepen our understanding of emotions evoked by music and provide a foundation for advancing research in music emotion recognition (MER). The same approach can also be applied to other types of media, such as poetry, painting, film music, and social media conversations. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1038/s41598-025-22336-0.