Comparative Musicology - Musical Rhythm and Mathematics
- some of my work -

"There can be no music without rhythm." - Igor Stravinski

"The mathematics of rhythm are universal. They don't belong to any particular culture." - John McLaughlin

• For general resources refer to: Comparative Musicology. This page focuses on musical rhythm from the mathematical and computational points of view. Granted, musical rhythm is a rich and mysterious multidimensional tapestry interweaving the acoustic signal with the human mind. Nevertheless focusing on only the one dimension (duration) in the context of an idealized abstraction of the acoustic signal (symbolically notated music) helps to create the whole picture, and thus to understand music and ourselves better.
• There are many fascinating connections between musical rhythm and mathematics. One of the most exciting discoveries I made back in 2004, just a couple of years after I began to investigate musical rhythm from the mathematical point of view, was that the 2300 year-old Euclidean algorithm that Euclid of Alexandria described in Proposition 2 of Book 7, for the purpose of computing the greatest common divisor of two numbers, actually generates almost all the most important musical rhythms used in traditional music throughout the world. The two numbers in question play the role of the number of 'audible' beats (onsets, strikes, attacks) and the number of silent pulses ('empty' beats) in a cyclic rhythm. For more details see:
• Godfried 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.
• Godfried T. Toussaint, "Generating "good" musical rhythms algorithmically," Proceedings of the 8th International Conference on Arts and Humanities, Honolulu, Hawaii, January 3-16, 2010, pp. 774-791.
• Godfried T. Toussaint, "Computational geometric aspects of rhythm, melody, and voice-leading," Computational Geometry: Theory and Applications, Vol. 43, Issue 1, January 2010, pp. 2-22.
• Godfried T. Toussaint, "Interlocking rhythms, duration interval content, cyclotomic sets, and the haxachordal theorem," Fourth International Workshop on Computational Music Theory, Universidad Politecnica de Madrid, Escuela Universitaria de Informatica, July 24-28, 2006 (Abstract only).
• Godfried Toussaint, "The geometry of musical rhythm," Proceedings of the Japan Conference on Discrete and Computational Geometry, J. Akiyama et al. (Eds.), LNCS 3742, Springer-Verlag, Berlin, Heidelberg, 2005, pp. 198-212.
• Godfried Toussaint, "Mathematical features for recognizing preference in Sub-Saharan African traditional rhythm timelines," Proceedings of the 3rd International Conference on Advances in Pattern Recognition, University of Bath, Bath, United Kingdom, August 22-25, 2005, pp. 18-27.
• Godfried T. Toussaint, "Computational geometric aspects of musical rhythm," Abstracts of the 14th Annual Fall Workshop on Computational Geometry, Massachussetts Institute of Technology, November 19-20, 2004, pp. 47-48.
• Godfried T. Toussaint, "A comparison of rhythmic similarity measures," Proceedings of ISMIR 2004: 5th International Conference on Music Information Retrieval, Universitat Pompeu Fabra, Barcelona, Spain, October 10-14, 2004, pp. 242-245. A longer version also appeared in: School of Computer Science, McGill University, Technical Report SOCS-TR-2004.6, August 2004.
• Godfried T. Toussaint, "Classification and phylogenetic analysis of African ternary rhythm timelines," Extended version of paper that appeared in: Proceedings of BRIDGES: Mathematical Connections in Art, Music, and Science, University of Granada, Granada, Spain July 23-27, 2003, pp. 25-36.
• Godfried T. Toussaint, "Algorithmic, geometric, and combinatorial problems in computational music theory," Extended version of paper that appeared in: Proceedings of X Encuentros de Geometria Computacional, University of Sevilla, Sevilla, Spain June 16-17, 2003, pp. 101-107.
• Godfried T. Toussaint, "A mathematical analysis of African, Brazilian, and Cuban clave rhythms," Proceedings of BRIDGES: Mathematical Connections in Art, Music and Science, Townson University, Towson, MD, July 27-29, 2002, pp. 157-168. Also the long version is Technical Report SOCS-02.2, May 2002.
• In July of 2003 I co-organized the First International Workshop on Computational Music Theory. A few days into the workshop I proposed that we should analyse the Flamenco meters (compas) from the mathematical point of view. During the workshop we discussed the topic and agreed to search the literature. After the workshop I came up with what I thought would be an appropriate measure of meter similarity that I called the directed swap distance. This distance considers the rhythm as a binary string, and a swap is a position interchange of an adjacent '1' and '0' (note and silence). Later I learned that a continuous linear-assignment with cost equal to the distance between assigned elements, used in Computational Biology, is equivalent to the swap distance. Together with my student Justin Colannino, we published an efficient algorithm for calculating it (see reference below). The phylogenetic analysis of the Flamenco meters with this measure yielded very interesting results, and we decided to publish them. The preliminary results were presented at the BRIDGES conference in 2004.  An extended version in Spanish was subsequently published in the La Gaceta.

• The publication of our article in La Gaceta has generated a lot of media interest in Spain and Canada.  Spanish musicologists and flamenco historians pretty well agree that the Fandango is the fountain (and oldest) of all Spanish dances, and that the cradle or birthplace of the Fandango is the city of Huelva in Andalucia (in southern Spain). The phylogenetic analysis we performed confirmed these tenets.

2. matematicas y flamenco.
3. Museo de Arte Famenco, "El Flamenco y las Matematicas," Monday, September 12, 2005.
4. Alicia R. Mediavilla, "Flamenco y Matematicas," Al Fondo, 2005.
5. English version translated by  Yasha Maccanico, "Flamenco and Maths".
6. Also appears in: Nataraja.
7. Francisco Dancausa Ruiz, "El Flamenco Visto por las Matematicas," August 8, 2005.
8. CanalSocial Noticias, Un estudio revela la relacion matematica entre los principales estilos del flamenco, August 11, 2005.
9. Spanish newspaper: El Pais - September 7, 2005.
10. "Las Matematicas Con el Flamenco," Genciencia, Tuesday, January 24, 2006.
11. "Matematicas y Flamenco," Solo Ciencia.
12. La Voz de Galicia, "FLAMENCO Y MATEMATICAS", April 28, 2006.
• "El compas flamenco: A phylogenetic analysis,Proceedings of BRIDGES: Mathematical Connections in Art, Music, and Science, Southwestern College, Winfield, Kansas, July 30 to August 1, 2004, pp. 61-70. (with M. Diaz-Bañez, G. Farigu, F. Gomez, D. Rappaport)
•   "Similaridad y evolucion en la ritmica del flamenco: una uncursion de la matematica computational,"  La Gaceta de la Real Sociedad de Matematica Española, La Columna de Matematica Computacional de Tomas Recio, Vol. 8.2, 2005, pp. 489-509 (in Spanish). (with J.-M. Diaz-Bañez, G. Farigu, F. Gomez, D. Rappaport)
Measuring String Similarity:

• "Efficient many-to-many point matching in one dimension," Graphs and Combinatorics", Vol. 23, June 2007, supplement, Computational Geometry and Graph Theory, The Akiyama-Chvatal Festschrift, pp. 169-178. (with J. Colannino, M. Damian, F. Hurtado, S. Langerman, H. Meijer, S. Ramaswami, D. Souvaine) The original publication is available at www.springerlink.com.
• "An algorithm for computing the restriction  scaffold assignment problem in computational biology," Information Processing Letters, Volume 95, Issue 4, August, 2005, pp. 466-471. (with J. Colannino)
• "An O(n log n)-time algorithm for the restriction scaffold assignment problem," Journal of Computational Biology", Vol. 13, No. 4, 2006. (with J. Colannino, M. Damian, F. Hurtado, J. Iacono, H. Meijer, S. Ramaswami)