# How A Little Mathematics Can Help Create Some Beautiful Music

A standard 2:3:6 polyrhythm. For clarity, the hexagonal level is not shown.

Since the time of Pythagoras around 500 BCE, music and mathematics have had an intimate and mutually supportive relationship.

Mathematics has been used to tune musical scales, to design musical instruments, to understand musical form and to generate novel music. But what can mathematics say about one of the most common features of contemporary music – rhythmic loops?

Repeated rhythmic loops are an essential component of most electronic dance music and hip-hop, and also play an important role in rock, jazz, Latin and non-Western music.

Now, two mathematical models of rhythmic loops – made in a free software application called XronoMorph – can be used to generate exciting new musical structures that would otherwise be hard to compose or perform.

XronoMorph: An Introduction

Rhythmic Loops: Circles And Polygons

A natural geometrical characterisation of a periodic structure, such as a rhythmic loop, is as a circular arrangement of points. You can travel clockwise around a circle but inevitably you come back to where you started.

A common feature of rhythmic loops is that they are multilevel. For example, in Latin percussion, different instruments play different interlocking patterns that may or may not coincide. Such rhythms can be depicted by multiple polygons on the same circle.

A simple geometrical representation is to draw lines that make each of these independent levels into an independent polygon. In this way, a multilevel rhythm becomes a collection of inscribed polygons.

Clave (top) + Conga (bottom) rhythm in score notation. Andrew Milne, Author provided Clave (red) + Conga (blue) rhythm as polygons. Andrew Milne, Author provided

But Which Polygons?

There are more than 17 trillion different rhythms, and that is only counting rhythms with three levels where every beat occurs at one of 16 distinct time locations (16 being a very common temporal subdivision in music).

But, realistically, only a small proportion of these are of musical interest. The trick is to find them.

Two mathematical principles – well-formedness and perfect balance – allow us to easily navigate two distinct rhythmic sub-spaces that are of musical interest, but hard to explore with traditional computational tools or notation.