Discover Music

Code breakers in Music

Code breaker Alan Turing at the age of 16 and 1748 portrait of code maker J.S. Bach  [Source:Wikipedia]
Code breaker Alan Turing at the age of 16 and 1748 portrait of code maker J.S. Bach [Source:Wikipedia]

Alan Turing played an important role in the breaking the the Nazi Enigma codes during World War 2. His life was made into the 2014 film, ‘The Imitation Game.’

It has now also been turned into an opera, ‘The Life and Death(s) of Alan Turing’ by Justine F Chen to a libretto by David Simpatico, which will premiere on 23rd March in Chicago's Harris Theater for Music and Dance.


Extract from ‘The Life and Death(s) of Alan Turing.’

It is not the first time composers have been attracted to the life of Turing—composers Simon Dobson and James McCarthy have both written pieces inspired by the composer. And Turing himself can claim one important musical landmark: the first recorded musical performance given by a computer when, in 1951, a machine he designed was used to play God Save the Queen.

Guardian Australia · First ever recording of computer music

It is perhaps no coincidence that a man who was known for his code breaking has been so closely associated with and celebrated in music. Composers too have often been fascinated by musical codes and puzzles.

J.S. Bach, the master coder


The music of J.S. Bach, for example, is full of coded information, the most well-known examples of which involve his own name. If, for example, each letter of his name is assigned a number according to its position in the alphabet, it gives the integers: 2 (B), 1 (A), 3 (C) and 8 (H). Added together these equal 14. Bach used this number, its retrograde form (41) and its half (7), frequently within his works, for example in the presence of 14 canons at the end of the 'Goldberg Variations'

It’s significance is even seen in elements of his life outside his music—a 1750 portrait of him, for example, depicts him in a tunic with rows of 7 and 14 buttons and, on being invited to enrol in Lorenz Christoph Mizler's Society of Musical Sciences (a grouping of elite composers) in 1747, rather than adopting the 13th position, he let Handel be enrolled first, becoming member number fourteen.

Volbach Portrait of J.S. Bach, 1750 [Source: Wikipedia]

More specifically, when using the German system of notation, Bach’s name spells out this sighing melody:
He uses this in a number of his pieces, including Brandenburg Concerto No.2, English Suite No.6, and within 'The Art of Fugue' .

It has also been used by many other composers, including Bach’s contemporary G.P. Telemann, by his son J.C. Bach and subsequent composers such as Robert Schumann (‘Sechs Fugen über den Namen: Bach’, Op. 60), Franz Liszt (‘Fantasy and Fugue on the Theme B-A-C-H’), Nicolai Rimsky-Korsakov (‘Six Variations sur le thème B–A–C–H’) and twentieth century composers such as Schoenberg, Webern, Penderecki and Schnittke.

Other composers

Others composers have followed Bach’s example by using their own names as codes within their music. Dmitri Shotakovish, for example, used a theme based on the letters DSCH (again derived from the German system of note names).
The theme is perhaps most memorably used in his String Quartet No.8, where its appearance in every movement gives the piece its morbidly insistent quality:

In a similar manner to Bach, Alban Berg was fixated on the number 23, using it within the structures of works such as his Violin Concerto, ‘Lulu’ and his ‘Lyric Suite.’ This is likely because he felt that this number was linked to his own fate—his first asthma attack occurred on 23rd of July, possibly when he was 23 and he felt on his deathbed that 23 December would be the day he died (it was!).

This idea of fate being linked to numerical values or patterns is also seen in works by other composers, such as the three hammer blows of fate in Mahler’s Sixth Symphony or the morse code-like short-short-short-long four note phrase in Beethoven’s Fifth Symphony.

And, talking of Morse code, Australian composer Barrington Phelong, who wrote the theme tune for the long-running British Crime drama ‘Morse’, would sometimes encode information into that theme so that, in his own words, it spelt ‘the name of the murderer, a cryptic version of the name, or, as a red herring, an innocent character.’

A Musical Enigma


One final example brings us back to Turing. His contribution to the war effort led to the decryption of the Nazi Enigma machine. The machine had, in fact, been named after a piece of music written in 1899: Edward Elgar's 'Enigma Variations'. The work presents its very own cryptographic puzzle.

Presented as a theme and 14 variations (Bach would have been proud!), each movement is subtitled with the initials, name or nickname of a friend of the composer. The most famous of these 'Nimrod', for example, refers to Elgar’s friend Augustus J. Jaegar. Jäger is the German for hunter, Nimrod in the Old Testament being described as ‘a mighty hunter before the Lord.’

Whilst the name puzzles in this piece have been conclusively unravelled, there will remains a mystery at its heart. Elgar said that the main Enigma theme could be played as a counterpoint to another well-known theme. Musicological codebreakers have proposed many candidates for this hidden theme, including Franz Liszt’s symphonic poem ‘Les Préludes’, ‘Auld Lang Syne', ‘God Save the Queen’, Martin Luther’s ‘Ein Feste Burg' , Pergolesi’s Stabat Mater and even 'Twinkle, Twinkle Little Star' !

None of these has been conclusively proved. Which does not, of course, do the piece any harm whatsoever. Instead it enhances the intrigue, helping to keep us fascinated.