A new mathematical model demonstrates how neurons in the brain could work together to learn and keep a musical beat.