Try out a my bjorklund M4L:
G. T. Toussaint, The Euclidean algorithm generates traditional musical rhythms, Proceedings of BRIDGES: Mathematical Connections in Art, Music, and Science, Banff, Alberta, Canada, July 31 to August 3, 2005, pp. 47–56.
E. Bjorklund. The theory of rep-rate pattern generation in the SNS timing system. SNS ASD Technical Note SNS-NOTE-CNTRL-99, Los Alamos National Laboratory, Los Alamos, U.S.A., 2003.