From love songs to lullabies, songs from cultures spanning the globe - despite their diversity - exhibit universal patterns, according to a new study. Drawn from a cross-cultural analysis of more than a century of research from anthropology and ethnomusicology on more than 300 societies, the study reports the first comprehensive scientific analysis of the similarities and differences of music across societies around the world. Music has long been called the universal language of humankind; however, whether any meaningful universals in music do exist is unclear and many music scholars have been highly skeptical of the notion. Here, Samuel Mehr and colleagues address this challenge by merging modern data science with musical recordings and ethnographic records from world cultures to map out the universals and variations in human song (vocal music). Mehr et al. built a discography of audio recordings of dance, healing, love and lullaby songs from 315 cultures accompanied with detailed descriptions of song contexts. They compared each recording based on formality, arousal level and religiosity. The results underscore the universality of music. They show that music - which appears in every measured society - is associated with predictable kinds of social functions and contexts, like dance and love; the social functions of a song can be predicted from its musical features across the world's societies, the authors say. Their results also show there is more variation in musical context within cultures than between them. "Overall, [Mehr et al.'s] approach, fusing data science anthropology and psychology, offers an exciting new way to tackle age-old problems in musicology, and promises deep insights into cognitive universals underlying the diverse musics our species creates and enjoys," write W. Tecumseh Fitch and Tudor Popescu in a related Perspective.