An investigation of more than 17,000 hit tunes suggests popular music undergoes periods of shifting diversity, and that new styles evolve in bursts. Christopher Intagliata reports