A rhythm analysis program in Python