Phase transitions: the math behind the music
The answer in physics—and music, Berezovsky argues—is called “phase transitions” and comes about because of a balance between order and disorder, or entropy, he said. “We can look at a balance—or a competition—between dissonance and entropy of sound—and see that phase transitions can also occur from disordered sound to the ordered structures of music,” he said. In other words, the same universal principles that guide the arrangement of atoms when they organize into a crystal from a gas or liquid are also behind the fact that “phase transitions occur in this model from disordered sound to discrete sets of pitches, including the 12-fold octave division used in Western music.”
Source: thedaily.case.edu