You can probably tell happy and sad songs apart just by listening to a few bars—but what is it, musically, that makes the difference? In Western music, major and minor chords have long been linked to joy and sorrow. So a group of scientists decided to examine how other chords might affect emotion. First, they compiled their data: nearly 90,000 popular English-language guitar songs recorded from the 1950s to the 2010s across five regions of the world. Then, they looked at how the chords matched the song lyrics. Each song got a happiness score, based on a popular crowdsourced data set that ranks 10,000 of the most common English words for positive and negative emotions. They found—as expected—that minor chords were linked with unhappy words and major chords were linked with happy ones. But the most positive emotions were conveyed by seventh chords, a triad of notes with an extra note on top that changes the sound—like this. Major and minor sevenths were both more prevalent in happier songs, the researchers report today in Royal Society Open Science. But there were some regional differences: Songs from Asia and Oceania tended to be more positive than songs from North America, whereas songs from Scandinavia tended to be more negative (thanks to the popularity there of darker genres like power and death metal, the researchers say). The study also found an overall decrease in positive music and lyrics, which peaked in the 1950s. But those good vibes may be making a comeback—since 2010, the “happiness score” of popular songs has been on the rebound.