The Mathematical Problem with Music, and How to Solve It