How a little mathematics can help create some beautiful music

July 21, 2016 by Andrew J. Milne, Steffen A. Herff, The Conversation
Credit: CC0 Public Domain

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 . But what can 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.

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.

XronoMorph: An Introduction

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. Credit: Andrew Milne, Author provided

Clave (red) + Conga (blue) rhythm as polygons. Credit: 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.

Well-formed polygons

Well-formedness elegantly generalises three properties commonly found in real-world multilevel rhythms:

  • each rhythmic level comprises only a small number of distinct beat lengths, often only one or two;
  • each level's beats are fairly evenly spaced in time – there aren't sudden clusters of events followed by long gaps; and
  • the rhythmic levels are hierarchical – there is a slow and metrically dominant level; above this is a faster and weaker level that splits the previous level's beats; above this is an even faster and weaker level that splits the previous level's beats; and so on.

Every level of a well-formed rhythm has two beat lengths: a long beat and a short beat. The length of a given beat is the time between its onset and the onset of the following beat.

A multilevel well-formed rhythm can then be fully defined by three numerical parameters: the numbers of long and short beats in the lowest level rhythm, and the ratio of the sizes of its long and short beats.

From these three numbers, an entire rhythmic hierarchy can be calculated, such that each level has no more than two beat lengths, each level arranges these beat lengths to make them as evenly spaced as possible and each successive level in the hierarchy is created by splitting the long beats of the level below.

Using XronoMorph, the above three parameters can be freely manipulated. The rhythmic hierarchy emerging from them often has great aesthetic appeal. Every level is related to every other level and is also intrinsically well-formed. Together, they create a somewhat self-similar and interwoven structure reminiscent of fractals.

A demonstration of how a well-formed hierarchy is built, and the effect of the lowest level’s beat-size ratio.
Perfectly balanced polygons

Perfect balance is a mathematical principle that can generalise polyrhythms, a type of rhythm commonly used in sub-Saharan African music.

Unlike well-formed rhythms and most Western rhythms, polyrhythms are not hierarchical. They are more like an alliance of different rhythmic levels, each of equal status.

In a polyrhythm, two or more levels, each comprising evenly spaced beats, are superimposed.

Geometrically, they are combinations of regular polygons like equilateral triangles, squares, regular pentagons, and so forth. In real-world polyrhythms, beats from all levels typically coincide at a single location in the period.

A standard 2:3:6 polyrhythm. For clarity, the hexagonal level is not shown.
A standard 3:4:12 polyrhythm. For clarity, the 12-gon level is not shown.
A standard 3:5:15 polyrhythm. For clarity, the 15-gon level is not shown.
A notable feature of these polyrhythms is that the average position, or centre of gravity, of the circularly arranged beats is precisely at the centre of the circle. This property is defined as perfect balance.

All regular polygons are perfectly balanced, so any combination of regular polygons is also perfectly balanced, and this is true regardless of the individual rotations of the polygons.

This allows an immediate generalisation of standard polyrhythms. The regular polygons can be independently rotated (time-shifted) so they never coincide. This is a musical feature that is, as far as we know, rarely exploited but which produces exciting rhythmic grooves.

Perfectly balanced music constructed with independently rotated regular polygons: 2 digons, 3 squares, 1 heptagon. The polygons have been independently rotated so – unlike a standard polyrhythm – there is no single location at which they all coincide.

But perfect balance opens up yet another fascinating generalisation of standard polyrhythms. There are certain perfectly balanced shapes – irregular elemental polygons – that are not produced by a simple combination of regular polygons.

An irregular elemental polygon: 1 triangle + 1 pentagon - 1 digon. Only the labelled vertices are sounded. Credit: Andrew Milne, Author provided
An irregular elemental polygon: 2 digons + 3 pentagons - 3 digons - 2 triangles. Only the labelled vertices are sounded. Credit: Andrew Milne, Author provided
Intriguingly, such polygons are constructed by summing differently rotated positively-weighted and negatively-weighted regular polygons. When a positively-weighted vertex and a negatively-weighted vertex coincide they cancel out.

Legal patterns are produced when no negative weights are left behind. So, although we never hear these negative beats directly, they have a ghostly impact by cancelling out some of the positive beats.

In XronoMorph, a wide choice of regular and irregular elemental polygons can be combined and independently rotated, creating a fascinating subspace of generalised polyrhythms.

Perfectly balanced music constructed with regular and irregular elemental polygons.
XronoMorph

We developed the rhythmic loop generator XronoMorph to demonstrate these principles, hoping it might inspire musicians and music enthusiasts to create novel and interesting rhythms that would be hard to play manually or to otherwise compose.

Simple and attractive software interfaces can also transform a need for expert knowledge into a willingness to intuitively interrogate the interface. In this way, we also hope it will encourage musical engagement, with potential application in music education by allowing visual exploration of complex rhythmic patterns.

XronoMorph screenshot. Credit: Andrew Milne, Author provided

Early reaction from musicians and composers has been highly enthusiastic with comments such as "This is an inspired design – truly musical", "the most interesting and inventive new app around" and "this really helps me better understand and create beats".

This lends support to the long-held notion that there is a profound connection between mathematics and music, and that a little mathematics can help create some beautiful music.

Explore further: Rhythm on the brain, and why we can't stop dancing

Related Stories

Rhythm on the brain, and why we can't stop dancing

May 6, 2016

Music and dance are far from idle pastimes. They are universal forms of expression and deeply rewarding activities that fulfil diverse social functions. Both feature in all the world's cultures and throughout history.

In funk music, rhythmic complexity influences dancing desire

April 16, 2014

Rhythmic drum patterns with a balance of rhythmic predictability and complexity may influence our desire to dance and enjoy the music, according to a study published April 16, 2014 in the open-access journal PLOS ONE by Maria ...

Recommended for you

Sensual fresco discovered in ancient Pompeii bedroom

November 19, 2018

Archaeologists have found a fresco in an ancient Pompeii bedroom that depicts a sensual scene of the Roman god Jupiter, disguised as a swan, and a legendary queen of Sparta from Greek mythology.

Excavators find tombs buried in Bolivia 500 years ago

November 17, 2018

Archaeologists say they found tombs at a Bolivian quarry containing remains from more than 500 years ago that give an insight into the interaction of various peoples with the expanding Inca empire.

Preventing chemical weapons as sciences converge

November 15, 2018

Alarming examples of the dangers from chemical weapons have been seen recently in the use of industrial chemicals and the nerve agent sarin against civilians in Syria, and in the targeted assassination operations using VX ...

2 comments

Adjust slider to filter visible comments by rank

Display comments: newest first

Macksb
not rated yet Aug 11, 2016
This article also explains orbital resonance in astrophysics. Orbital resonance involves, for example, 2:3 orbital periods of two orbiting bodies. 3:4 ratios are also common.

In the above article, see particularly the heading "Perfectly Balanced Polygons." Quote: "A notable feature of these polyrhythms is that the average position, or centre of gravity, of the circularly arranged beats is precisely at the center of the circle." This quote appears right after the three videos.
Macksb
not rated yet Aug 11, 2016
See three recent physorg articles, and my comments, involving 4:3 orbital resonance.

"Newly discovered solar system objects resonate with Neptune" July 21, 2016.

"Alien solar system boasts tightly spaced planets, unusual orbits" July 21, 2016 (same date as above article)

"Exoplanets complex orbital structure points to planetary migration in solar systems" May 11, 2016

For more, see Wikipedia, "orbital resonance"

Please sign in to add a comment. Registration is free, and takes less than a minute. Read more

Click here to reset your password.
Sign in to get notified via email when new comments are made.