Music relies on repetition: we expect the beat to return, like a chorus coming back. But if you repeat the same thing for too long, it gets boring. The composer seems to walk a tightrope between the familiar and the unexpected.
Scientists translated this balance into the language of physics. They represented rhythm as a system where each note is a particle that 'wants' to be like its neighbors (order) but also 'wants' to be different (variety). In physics, such opposing forces are described by free energy — a quantity that tells how stable a system is. It turned out that under certain conditions, a phase transition occurs in rhythm: just as water turns into ice, disordered beats suddenly snap into a clear pattern.
The model was tested on the music of Johann Sebastian Bach. His rhythmic patterns turned out to be very close to those predicted by the model. This means that Bach intuitively found that very balance between predictability and surprise that physicists described with formulas.
This approach can be useful not only for analyzing old music but also for creating new music. A composer or a program can tune the 'temperature' of the rhythm: more order (you get a march, more chaos) free improvisation. Music, like matter, has its states.
as written by the authors arXiv:2604.07476
We develop a model of musical rhythm and meter based on optimizing the trade-off between human psychological preferences for perceiving repeated patterns in time with a desire for variety and complexity. By mapping these competing preferences onto analogous quantities in statistical physics, we define an effective free energy which is minimized in the grand canonical ensemble. Using a mean field approximation, we observe phase transitions in the model from disordered events in time to orderings that closely reproduce those seen in music. We then compare the range of rhythmic characteristics predicted by the model to a dataset drawn from compositions by Johann Sebastian Bach, finding generally good quantitative agreement. The results provide a new lens through which to study musical rhythm, and a method for generatively producing rhythms.
In the model, rhythm 'freezes' into a pattern just as water turns into ice. Only instead of temperature, it's the ratio between the drive for repetition and the craving for novelty.