Rhythm pulses inside the brain of a Ghanaian drummer, sitting in a physics laboratory in Gottingen, Germany. His hands caress the skin of a bongo drum, guided by the metronome’s tick through his headphones. He plays for five minutes, filling the sterile lab environment with staccato sounds, as a team of physicists records him, searching for a pattern.

But the researchers aren’t interested in what he does correctly — they are listening for his errors. Though the drummer is a professional, like all humans, his rhythm is imperfect. Each time his hand hits the drum, his beat falls ahead or behind the metronome by 10 to 20 milliseconds. On average, he anticipates the beat, and plays ahead of it, 16 milliseconds ahead — less than the time it takes a person to blink, or a dragonfly to flap its wings. What the physicists want to know is: Are these errors random, or correlated in a way that can be expressed by a mathematical law?

Rhythm research has implications for both audio engineering and neural clocks, said Holger Hennig, a postdoctoral fellow in the laboratory of Eric Heller in the Physics Department at Harvard, and first author of a study of the Ghanaian and other drummers in the journal Physics Today. Software for computer-generated music includes a “humanizing” function, which adds random deviations to the beat to give it a more human, “imperfect” feel. But these variations tend to make the music sound “off” and artificial. The fact that listeners are turned off by “humanized” music led Hennig and colleagues at the Max Planck Institute for Dynamics and Self-Organization in Germany to wonder whether human error in musical rhythm might show a pattern. Perhaps the “humanizing” features of computer-generated rhythms fail because they produce the wrong kind of errors — deviations unlike the kind humans produce. There are rhythms inherent in the human brain, which may affect our musical rhythm. The primal bio-rhythm in the neurons of the Ghanaian drummer might be echoed in the rhythm of his music, the physicists suspected.

When they analyzed the drummer’s playing statistically, Hennig and colleagues found that his errors were correlated across long timescales: tens of seconds to minutes. A given beat depended not just on the timing of the previous beat, but also on beats that occurred minutes before.

“You can have these trends,” said Hennig. “For example, the drummer plays ahead of the beat for 30 consecutive beats, while half a minute earlier, he tended to play slightly behind the metronome clicks. These trends are pleasant to the ear.”

The trends, Hennig found, are correlated: Patterns of fluctuations are likely to be repeated. “This property is found for short and long patterns — hence on different timescales, ” Hennig explained. “The pattern can be seen as a fractal — a self-similar structure.” Fractal patterns are the recurring shapes seen in snowflakes, the leaves of a fern, and “even the coastline of Britain,” Hennig said. “If you zoom into a fractal, you see something that looks similar to the whole thing again.” Deviations in human musical rhythms, like snowflakes and coastlines, are fractals.

The discovery that human errors in musical rhythm follow a pattern could influence how audio engineers “humanize” computer-generated music.

In a paper published in 2011 in the journal PLoS ONE, Hennig and his lab mates showed that rhythm deviations follow this pattern whether the rhythm is played by hand, foot, or vocals — suggesting it is intrinsic to musical sense. They also produced versions of a pop song “humanized” using either the usual “random-error” method, or a new “long-range-correlated-error” method where the timing of the beats was related. Seventy-nine percent of listeners said the correlated-error version “sounded more precise,” while 64 percent of participants preferred it to the random-error version, suggesting that people prefer music that deviates from perfection in a natural way: “a mix of predictability and surprise,” Hennig said.

So these deviations in rhythm patterns seem to be intrinsic, and preferred. But how do they relate to the beat of our brains?

“There are different clocks in the brain,” Hennig explained, “clocks on different timescales, like circadian clocks on a 24-hour timescale. However, for the millisecond regime it is totally unknown which neuronal network allows the human to be so precise.”

The same long-range correlations discovered in musical rhythm have been found in the fluctuation of auditory nerve firing in cats, in human brainwaves, and in heart rate during sleep: Head, heart, and hand seem to march to the same drummer.

Going forward, Hennig hopes to find the link between the beats of brain and body, to help neuroscientists hone in on the mysterious timekeeper of the brain.