Calculate the beat per minute