A study of hundreds of thousands of popular songs over the past three decades has found a downward sonic trend in happiness and an increase in sadness, as the chirpy band Wham! gave way to the moody Sam Smith.

For the report in the journal Royal Society Open Science, researchers at the University of California at Irvine looked at 500,000 songs released in the UK between 1985 and 2015, and categorized them according to their mood.

“‘Happiness’ is going down, ‘brightness’ is going down, ‘sadness’ is going up, and at the same time, the songs are becoming more ‘danceable’ and more ‘party-like,’” co-author Natalia L. Komarova told The Associated Press.

Of course, the researchers emphasize that a gradual decrease in the average “happiness” index does not mean that all successful songs in 1985 were happy and all successful songs in 2015 were sad. They were looking for average trends in the acoustic properties of the music and the moods describing the sounds.

Some songs with a low happiness index in 2014 include “Stay With Me” by Sam Smith, “Whispers” by Passenger and “Unmissable” by Gorgon City. Some from 1985 with a high happiness index include “Glory Days” by Bruce Springsteen, “Would I Lie to You?” by the Eurythmics, and “Freedom” by Wham!

“The public seems to prefer happier songs, even though more and more unhappy songs are being released each year,” the researchers wrote. They also found the most successful genres of music were dance and pop, as well as a “clear downward trend” in the success of rock, starting in the early 2000s.

The overall mood shifts in the songs’ musical features mirror other studies that have examined lyric changes over the years. They have found the use of positive emotions has declined and indicators of loneliness and social isolation have increased.

“So it looks like, while the overall mood is becoming less happy, people seem to want to forget it all and dance,” emailed Komarova, who wrote the report with Myra Interiano, Kamyar Kazemi, LijiaWang, Jienian Yang and Zhaoxia Yu.

The researchers also found that the “maleness” of songs — the frequency of male singers in popular music — has decreased over the last 30 years. “Successful songs are characterized by a larger percentage of female artists compared to all songs,” they write.

That finding comes at a time when the music industry is wrestling with the issue of gender inequality, and men overwhelmingly dominate the ranks of artists and songwriters.