Music-induced analgesia (MIA) is a phenomenon that describes a situation in which listening to music influences pain perception. The heterogeneity of music used in MIA studies leads to a problem of a specific effect for an unspecified stimulus. To address this, we use a previously established model of musical preferences that categorizes the multidimensional sonic space of music into three basic dimensions: arousal, valence and depth. Participants entered an experimental pain stimulation while listening to compilations of short musical excerpts characteristic of each of the three attribute dimensions. The results showed an effect on the part of music attribute preferences on average pain, maximal pain, and pain tolerance after controlling for musical attributes and order effects. This suggests that individual preferences for music attributes play a significant role in MIA and that, in clinical contexts, music should not be chosen arbitrarily but according to individual preferences.