A new AI algorithm recognizes the complex range of emotions invoked when people listen to pieces of music.