Thursday, 7 July 2016

Messiaen, Maths and Me.

My relationship with Messiaen began one Saturday when I was seventeen years old. Saturdays for me as kid always meant music. A minibus would pick up me and my trumpet and after an hour of winding through the lanes of Oxfordshire we’d arrive in Oxford to join the rest of the ranks of the county youth orchestra. Except this particular Saturday was rather special. The conductor of the London Sinfonietta had come to visit and he’d brought with him the score of the Turangalila Symphony.

I remember that day because I think I was at the peak of my trumpet playing. I didn’t split a note. I got my fingers round the incredibly complex melodic lines that Messiaen had cooked up. It was totally exhilarating. My trumpet playing has been down hill since but that Saturday was the start of my love affair with the music of Messiaen.

My initial reaction was a totally emotional, visceral response to the extraordinary sound scape of Turangalila. But as my listening has continued I have begun to understand what a sophisticated mathematical mind Messiaen had. Talking to composers who studied under Messiaen it seems that he did not lay claim to any particularly superior mathematical knowledge. For me this makes it all the more interesting since he is clearly being drawn intuitively to mathematical structures of interest for their aesthetic appeal.

This is perhaps the curious point for mathematical outsiders to appreciate. Mathematics does not consist of true statements about numbers just as music is not simply a sequence of notes. There is an aesthetic choice made by a mathematician of which true statements about numbers get elevated to the status of mathematics.

Here is the French mathematician Henri Poincaré talking about this idea of choice: "To create consists precisely in not making useless combinations. Invention is discernment, choice. . . .The sterile combinations do not even present themselves to the mind of the inventor."

For me Messiaen’s choices are driven by a similar aesthetic to the one that guides my choices of interesting mathematics. Perhaps this mathematical sensibility is driven by Messiaen’s belief in the importance of rhythm as the basis of all his music. “Let us not forget that the first, essential element in music is Rhythm, and that Rhythm is first and foremost the change of number and duration.”

His skill at using mathematical ideas to create interesting musical landscapes is perfectly illustrated in one of his most famous pieces: The Quartet for the End of Time. This piece was written while Messiaen was a prisoner of war in Stelag-VIII A. While he was there he met a clarinetist, cellist and violinist among his fellow inmates. He decided to compose a quartet for the three musicians with himself on piano. The result was one of the great works of twentieth century music. It was first performed to inmates and prisoner officers inside Stelag VIII-A with Messiaen playing a rickety upright piano they found in the camp.

To create a sense of unease and impossibility Messiaen makes use of some of the most enigmatic numbers in mathematics. 2,3,5,7,11,13… The primes. The indivisible numbers. In the first movement, called Liturgie de Crystal, Messiaen wanted to create a sense of never-ending time. The primes 17 and 29 turned out to be the key.

While the violin and clarinet exchange bird themes, the cello and piano are responsible for the rhythmic structure. If one looks at the piano part one finds a 17 note rhythmic sequence repeated over and over but the chord sequence that is played on top of this rhythm consists of 29 chords. So as the 17 note rhythm starts for the second time, the chords are just coming up to about two thirds of the way through its sequence. The effect of the choices of prime numbers 17 and 29 are that the rhythmic and chords sequences won’t repeat them selves until 17 x 29 notes through the piece.

This continual shifting and changing music creates for Messiaen the sense of timelessness that he was keen to establish. The different primes 17 and 29 keep the two out of sync so that the piece finishes before you ever hear the music repeat itself.

It’s not just in Messiaen’s rhythmic choices that he demonstrates mathematical sensibilities. Messiaen was highly influenced by Schoenberg’s twelve tone system where scales were thrown away and substituted with permutations of the twelve notes of the chromatic scale. One of the set of permutations Messiaen explores in his piece Ile de Feu 2 for piano gives rise to an incredibly sophisticated mathematical setting which was only discovered towards the end of the nineteenth century.

If you think of the twelve notes of the chromatic scale like a pack of 12 cards then the permutations of the 12 notes which Messiaen uses in Ile de Feu 2 are got by performing a rather special shuffle of the cards called the Mongean shuffle. Effectively you take the pack of cards in one hand then reorder them by alternatively placing each card under or over the stack you build in the other hand.

Viewed from my mathematical perspective these permutations are the generators used to create a special symmetrical object called the Mathieu group M12. This symmetrical object is one of the building blocks of symmetry and has 95040 different symmetries. We cannot see this symmetrical object because it lives in 11 dimensional space. The permutations are in effect telling you where the corners of this shape are moving under each symmetry.

The discovery of this sophisticated symmetrical object was the first inkling for mathematicians of how complex the world of symmetry would turn out to be. But these shuffles of the 12 notes are also at the heart of Ile de Feu 2. Quite independently Messiaen realised in sound one of the most intriguing mathematical objects discovered in the nineteenth century. So although we can’t see this object Messiaen has given us a way to listen to it.

His motivation for his choice of musical ideas was often that they should have “the charm of impossibilities” about them. “This charm, at once voluptuous and contemplative, resides particularly in certain mathematical impossibilities of the modal and rhythmic domains.” But what is curious to me is that often it was his implementation of mathematics in music, intuitively or consciously, that made possible the breakthroughs Messiaen made in his music.

Messiaen's Quartet for the End of Time

Olivier Messiaen’s Quartet for the End of Time premiered on 15 January 1941 in the prisoner-of-war camp where the composer was interned during World War Two. To celebrate the 75th anniversary Sinfini Music commissioned myself and Simon Russell to create this animation exploring Messiaen’s complex relationship to mathematics, music and religious belief. 

You can view the animation here

The following are some notes on the mathematics hidden inside the animation.

Fibonacci Spiral

The Quartet for the End of Time begins with the clarinet and violin exchanging bird themes. Messiaen was greatly inspired by the sounds of the natural world as well as mathematical themes. But what he might not have realized is that there is actually a lot of mathematics hiding in Nature. Probably the most important numbers in Nature are the Fibonacci numbers: 1,1,2,3,5,8,13… Named after the thirteenth century Italian mathematician Fibonacci you get the next number in the sequence by adding together the two previous numbers. Fibonacci discovered that these numbers often appear in Nature which is why you can find them hiding all over Messiaen’s floating island. For example the seed head depicted here grows in time to the music using the Fibonacci numbers. As the seed head turns you can see natural spirals emerging. This growth process explains the bizarre discovery that many flowers have a Fibonacci number of petals. See how many other places you can spot the Fibonacci numbers. Towards the end of the animation you can discover how the Fibonacci numbers are also important to music.

Golden Ratio

Hiding inside the pentagram sculpture to the left of Fibonacci’s flower is an important mathematical concept called the Golden Ratio which is strongly related to the Fibonacci numbers. Two lines of length A and smaller length B are in the Golden Ratio if the ratio of A to B is the same as the ratio of A+B to A. In other words A/B=(A+B)/A. Many of the lines in this sculpture are in the golden ratio. A rectangle with these proportions is considered by many to be the most aesthetically appealing rectangle. Composers like Debussy, Bartok and even Mozart have used this ratio to mark a significant moment in a composition. If you divide a Fibonacci number by its predecessor then the answer gets closer and closer to the Golden Ratio. For example 8/5=1.6 is a good approximation to this ratio.


At the heart of the island is the mathematical machine that drives Messiaen’s composition of the Liturgie de Crystal. The two interlocking dials control how the piano part of this movement evolves. The lower dial has 17 teeth and controls a 17 note rhythm sequence that the piano plays over and over again. However the harmonic content is controlled by the upper dial. This has 29 teeth. Each tooth corresponds to a chord played by the piano. These 29 chords are repeated each time the cog comes full circle.

Because Messiaen has chosen cogs with a prime number of teeth, 17 and 29, we find that the cogs have to go through 17x29=493 clicks before both cogs realign to their starting position and the music repeats itself. The piece has finished before this happens.

This trick of using primes to keep things out of synch is actually used in Nature by a special species of cicada that lives in North America. By only appearing ever 17 years the cicadas are able to avoid getting in synch with a predator that also appears periodically in the forest. The cicadas are like Messiaen’s rhythm, the predator like the chords. You can see the cicadas and predator appearing periodically from the cog system as it clicks round.


The prison watch towers that are revealed guarding Messiaen’s island also hide another mathematically sophisticated idea of cyclical repetition that Messiaen used in another composition called Ile de Feu II. This piece for solo piano is based on Schoenberg’s technique of 12 tone rows where a theme is chosen by picking a particular order in which to play the 12 notes of the chromatic scale. You can think of the 12 notes written on cards and then a 12 tone row corresponds to shuffling the pack into a new order. In Ile de Feu II Messiaen chooses a special ordering of the 12 notes that corresponds to something called the Mongean shuffle. Take the top and bottom card of the pack and place them down on the table. Keep doing this until all 12 cards are stacked on top of each other on the table. The variations on this theme are then affected by repeating the same shuffle again and again on the newly arranged pack of notes. As you ascend the watch towers at each step the lattice interweaves according to each new rearrangement of the 12 notes. 

Fibonacci revisted

Messiaen was fascinated in Indian rhythms called the deci-talas consisting of rhythms made up of notes of varying length. Remarkably it was the Indian musicians analysis of the different rhythms you can create out of long and short beats that actually gave rise to the discovery of the Fibonacci numbers several centuries before Fibonacci realized they were important numbers in Nature. Consider the number of rhythms you can make of length 4. You could have 4 short beats. Or 2 long beats. Or you could mix them up: short short long or short long short or long short short. A total of 5 different rhythms. A Fibonacci number. The Indian musicians discovered that as you increase the length of the rhythm that it is the Fibonacci numbers that will tell you how many new rhythms you’ll expect to get. The wall that encloses Messiaen’s floating island depicts all the rhythms you can make of length 8. There are a total of 34 different rhythms.