Look into the secret world of numerology and puzzles in Bach

The church of Pontaumur in the Auvergne, France, houses the only replica in Europe of the Arnstadt organ on which Bach composed in his early days. Photo by Philippe Dezmazes/AfP/Getty

by Milton Mermikides

Look beneath the surface of Bach’s music and you will find a fascinating hidden world of numerology and cunning craft

Some 14 billion miles from here floats a 12-inch gold-plated record. This artefact was placed onboard the Voyager 1 space probe in 1977 (and another on the Voyager 2 sister vessel) and now, having long completed its scheduled planetary flybys, it hurtles at nearly 500 times the speed of sound into deep space. Created to communicate the story of human civilisation to any extraterrestrial who happens to encounter it, the Golden Record includes images, mathematical equations, astronomical coordinates and sounds. Its aim is to convey – in the absence of a common language – not just the facts of human existence, but also evidence of our intelligence.

One elegant method of how this might be possible is through the medium of music, which – aside from lyrical content – has the advantages of neither needing visual representation nor a lexicon of phonic objects. It speaks for itself through the common fabric of frequencies – amplitude over time – which can be etched directly and unfiltered into the surface of the disc. The importance of music to the project is clear: hand-etched on the record’s surface is the inscription ‘To the makers of music – all worlds, all times.’

The Golden Record. Courtesy NASA/Wikipedia


When deciding which music could represent the pinnacle of human spirit and intelligence, Johann Sebastian Bach was inevitably suggested but – according to an unverified but irresistible anecdote – there was some dissent, because presenting music of such beauty and intelligence to any extraterrestrial listener would be ‘just showing off’.

Ultimately, among the commendably diverse 27 pieces of music included on the record, a full three are by Bach, suggesting perhaps that he alone represents more than 11 per cent of the value of our entire musical history. This vision of Bach’s music floating above the Earth as a symbol of musical perfection resonates with a prevailing perception of Bach’s art: somehow transcendent, timeless, and not of this world. His music represents the pinnacle of the Baroque era’s concerns with counterpoint but also can be readily adopted for a wide range of instrumentations, eras and styles, from ‘classical’ to jazz, pop and electronic. Bach’s music, it seems, is untroubled by the boundaries of instrument, style or era.

Musicians and music lovers rapidly run out of superlatives to describe his purported genius. To Beethoven, he was ‘the immortal god of harmony’; to Wagner ‘the most stupendous miracle in all music’; to Max Reger ‘the beginning and end of all music’. And Brahms declared, in a letter to Clara Schumann in reference to Bach’s Chaconne:

On one stave, for a small instrument, the man writes a whole world of the deepest thoughts and most powerful feelings. If I imagined that I could have created, even conceived the piece, I am quite certain that the excess of excitement and earth-shattering experience would have driven me out of my mind.

Connections to the divine are never far off, as in Mauricio Kagel’s quip that no one believes in God anymore but everyone believes in Bach, or even – in the words of a contemporary atheist philosopher – that Bach is the best argument for the existence of God.

With his music’s reputation of some kind of ‘eternal truth’ and implications of their divine transcription, it can be easy to forget that such heavenly work was the result of earthly toils. By blind luck of technological history, we are left with the beautiful manuscripts, but minimal record of the real-world stress, training, limited time and inky mess of putting quill to page. If indeed Bach’s talent was God-given, then it was a gift that demanded a reimbursement of decades of constant study, poring over Vivaldi scores by candlelight with failing eyes, walking 280 miles just to watch one organist perform, the re-use of compositional material, adaptation to changing tastes, all amid a dizzying array of professional demands, awkward taskmasters, petulant critics, vain royalty and personal tragedies.

To appreciate the music of Bach (which I, like many others, find staggeringly beautiful), it can be instructive to understand both the mechanics and the mechanic: the musical systems, and the man himself – setting aside any received wisdom about his purported brilliance.

One can immediately learn something of Bach from his portraits, or in fact their scarcity – given his lack of time and reluctance to engage in self-aggrandisement. Artists complained that he never stayed still long enough to capture a likeness, and the few portraits we have of him say more about his music than about his appearance and character: he is a prop to hold up a fragment of a work, or to wear a hidden musical code on his clothing; it’s the music in the foreground, rather than the musician.

Above all, Bach was crafty both in his music and life, and he adored puzzles, games and general inventive mischief. His monogram on his wax seal and his goblet was his own design, and at first glance it looks like an ornate decorative symmetrical crest of interlocking swirls. It is in fact built up from his initials JSB overlaid and mirrored, which is apt, as his music uses mirror-like reversals, and is, like the monogram, something immediately beautiful but with hidden meaning.

A recreation of Bach’s monogram, constructed from his initials overlaid in normal and mirror form. Image supplied by the author


Another example of Bach encoding information into decoration might be found in the title page of his 24 preludes and fugues for The Well-tempered Clavier (the first prelude of which is included on the Golden Record). Often this series of works (one for each major and minor key) – is mistakenly taken to have been written for the now-ubiquitous even-tempered system. In an even-tempered system, the pitch difference between each chromatic note (for example, each adjacent note on a piano) is identical. With a well-tempered system, however, the gaps differ slightly, and are set up to provide sonorities in some keys closer to those that emerge from the ‘natural’ harmonic series. Choirs, string ensembles and other instruments unfettered by a fixed pitch system tend to converge upon these ‘purer’ intervals in performance – string ensembles and choirs make subtle but precise adjustments so that chords resonate, and these deviate from the fixed 12-note grid-lines of an even-tempered instrument such as the modern piano.

Bach’s name in the German notation system happens to spell out a haunting chromatic melody

There are countless well-tempered systems possible, and several at Bach’s time, however it was a question for centuries which system Bach used for The Well-tempered Clavier, and how each of those keys would have sounded. It was not until 2005, a quarter of a millennium after its composition, that the musicologist Bradley Lehman made an argument that the decorative symbol at the top of the page, which for generations had been dismissed as an ornamental ‘meaningless’ series of loops, contained coded instructions for how to construct the temperament, hidden in plain sight. Lehman suggests that the three types of loop (plain, knotted, and double-knotted) represent the variously tuned gaps between the notes, and one has been identified with a ‘C’:

The decorative swirl on the title page of The Well-tempered Clavier; its various loops perhaps suggesting the tuning temperament to be employed. Image courtesy Wikipedia


But Bach not only hid messages in decorative shapes but sometimes within his music itself. His name in the German notation system – which, unlike the rest of the Western world, runs from A to H – happens to spell out a haunting chromatic melody. Bach enjoyed embedding this motif in his music, and generations of composers from Liszt to Brahms to Schoenberg to Arvo Pärt have written homages to Bach using this melody:

The BACH Motif. Public domain

Audio of the BACH Motif, performed by Bridget Mermikides


These four notes can even be represented as one, at the intersection of four clefs, in a crucifix symbolisation – reading clockwise from the top, the clefs are tenor, alto, treble in the key of C major (or A minor), treble in F major (or D minor):

The BACH cross – a single note spelling the BACH motif on four overlapping staves. Public domain


Bach, who was obsessed with numerology, took the codification of his name further, and by adding up the alphabetic placement of these letters came up with the ‘Bach number’ of 14 (2 + 1 + 3 + 8), a number that would recur encoded in many of his compositions. It also appears in the so-called Volbach portrait of 1750, in which Bach wears 14 (unnaturally close) buttons on his waistcoat. The biblical number of buttons on his coat (seven, for the Sabbath day, and the seven original divisions of the Bible) are also unlikely to be accidental. Indeed, Bach’s engagement with numerology has invited furtive (and often overzealous) hunting of numerical meaning throughout his music.

In an earlier portrait from 1748, by Elias Gottlob Haussmann, Bach holds a short piece, Canon Triplex in Six Voices, his entry piece to the Society of Musical Sciences – a collective of elite composers that included Handel and Telemann, who believed that music was deeply linked with the sciences and the cosmos, a sentiment shared by Pythagoras’ concept of the ‘Harmony of the Spheres’. Bach was of course accepted, but allowed Handel to take his place before him, so that Bach could be the 14th member. The piece itself is from The Goldberg Variations, the first of Bach’s four major late collections of compositions (or ‘summation works’) and an important contribution to keyboard repertoire. Published in 1741, it features an aria with a set of variations. After their completion, Bach – the constant tinkerer – could not resist adding a set of canons on the last page based on the aria’s bassline. How many of these canons did he write? Fourteen, of course.

Portraits of Bach from 1748 and 1750, displaying the Canon Triplex and the 14-button waistcoat respectively. Courtesy Wikimedia


The three short lines in the 1748 portrait are not a fragment or cartoon of the work – they are in fact the entire piece. To understand better why a piece can fit in a handful of bars and why Bach would pose proudly and submit it to his esteemed peers requires a little understanding of canonic principles. That he could embody his complex musical thoughts in such an economical way reveals his technical and musical mastery.

The simplest form of canon is known as a round – or ‘perpetual’ canon – think ‘Frère Jacques’). It involves a melody played identically in multiple voices (instrumental layers), starting at different time intervals. This ‘phasing’ of one melodic line builds a more complex texture and interaction from this simple component. Its underlying mechanics are shown in an example below. The first voice sings a looped melody made up of three phrases (A-C), the second and third voices sing the three-phrase melody but displaced by one and two phrases respectively:

A visual representation of simple canonic structure. Image supplied by the author


This results in all the phrases being heard together, distributed between the voices, in a theoretically infinite loop. To compose such a simple canon might involve starting with Phrase A and then composing material for additional layers above it. However, some more sophisticated reverse-engineering could be employed: if we start with the complete stack of complementary phrases that work well together in terms of rhythmic interest and harmonic agreement, then we can slice up the constituent phrases and rejoin them in a preferred linear order. The voices then rebuild this stack through the canonic process.

But the craft of canonic writing – particularly in the case of Bach – runs much deeper than this simple example. Some canons involve phrases that, when delayed, are transposed to different intervals or stretched rhythmically. They can be turned upside down (‘inverted’), run backwards (‘retrograde’, as in Bach’s ‘crab canons’) or even both, as in ‘table canons’ that can be read simultaneously from one stave by musicians from their own perspectives at either side of a table. Multiple canons can even be superimposed upon one another and played simultaneously – even on a single (usually keyboard) instrument. These offer greater compositional complexity and constraint than the simple round presented above, and Bach revelled in such challenges. Take Bach’s Canon Triplex in Six Voices from the 1748 portrait.

An annotation of Bach’s hand-written manuscript of the Canon Triplex. Some notational clues to the solution of the puzzle are shown in yellow, and phrase fragments are labelled in white. Image courtesy IMSLP and annotated by the author

Audio of the Canon Triplex, performed by Bridget Mermikides

Here, although only three voices are notated, Bach sneaks in some ‘decorative clues’ as to how they are to be manipulated into a canon. Some of these ‘hacked notations’ are outlined below, and show additional key signatures, phrase re-entry points, upside-down suggestions and a hint that each voice is doubled. Why is Bach so obtuse in his instructions? This is an example of a ‘puzzle canon’ or ‘riddle canon’ where the ‘solution’ to the canon has to be deduced from clues in the score, or solely from the reader’s invention. The musician is not simply given the music: it has to be earned.

We should also acknowledge that the piece involved some careful tinkering

The music depicted in the Canon Triplex portrait is not just one canon, where one melody is overlaid against itself, but three simultaneous canons. In addition, each of these canons isn’t a simple delay of material, but involves turning the melody upside down against a delayed version of itself.

The canonic structure of Bach’s Canon Triplex in Six VoicesImage supplied by the author


Unlike in a simple round, here each canon obliges an internal consistency (eg, A1 and A2 make a pleasing phrase, and A1 and A2 work together if either is inverted). Furthermore, this collective stack must work with two other similarly constrained stacks. We should, of course, marvel at Bach’s skill in achieving such canonic delights and communicating these musical ideas with such elegance. However, we should also acknowledge that the piece involved some careful tinkering, even though it stays entirely in one key and is structurally static (or infinite). Musical output is somehow limited by the constraints imposed.

However, Bach thought enough of the Canon Triplex – a postcard rather than grand work – to be immortalised with it in his portrait. This reveals some profound aspects of Bach’s musical craft and conception that are not commonly understood musical devices, even in our contemporary music culture. These might be termed:

  1. encoding: in the Canon Triplex, layers of musical meaning, the source of musical objects and even its very instructions are hidden below the surface of the music. A puzzle to be solved or an eternal secret;
  2. pluripotency: in this piece (and its sibling canons and variations), the Goldberg aria bassline is furtively reworked into apparently endless musical forms. Rather than fixed singular objects, compositions are to Bach more like dense constellations of compositional opportunity; and
  3. multiplicity: music is often thought of as existing in clear and hierarchical layers – for example, a melody layer ‘on’ chords ‘on’ a bass line. However, the motifs in the Canon Triplex hold deeply multiple functions, they are melodies and (through transformation) accompaniments – to themselves.

This latter device – multiplicity – is the DNA of the musical discipline of counterpoint – the interaction of multiple musical lines that are both independent melodies and collectively harmonically coherent. Bach is rightfully held up as a master of counterpoint. This is evident – perhaps a defining feature – across all his works. Most directly in his canons, which act – and are sometimes unfairly dismissed – as musical toys: like a Newton’s cradle, they are set in motion and quickly form a mesmerising but short repetitive pattern until manually stopped. However, where such canonic and contrapuntal mechanics meet more conventional (and complete) compositional structure is in his craft of the fugue.

A fugue (from the Latin fugere, meaning ‘to flee’ or ‘to chase’) is a musical form that – though variable in tempo, metre, duration and harmony – always follows a set script. At its centre is a single melodic phrase (the ‘subject’) that forms the basis of the fugue’s thematic material, across multiple independent musical voices (or ‘parts’). The first voice starts alone stating the subject, and then continues with ‘counter-subject’ material complementing a second voice that reintroduces the subject (usually at a different interval). This pattern continues until all (commonly, three or four voices) are introduced and the piece develops, exploring more distant harmony and variations – extending, shortening and reworking the thematic material while maintaining a familial connection.

Finally, the voices return to the original key and restate the subject to conclude. This conversation between multiple and equal voices, independently coherent, are linked by thematic material and mutual harmonic agreement in service of an overarching structure. Again, we see here the pluripotency of the fugue’s subject in its multiple variations and contexts. We also witness the multiplicity of each of the voices that act both as independent and equally important melodies (a horizontal coherence) and as accompaniments and harmonisations of each other (a vertical coherence).

Bach was a master of such a subtle juggling act, and he selected or designed subjects that had melodic identity and interest, as well as being malleable enough for multiple functions. In so doing, he produced with a staggering industry many sophisticated fugues – each one a highly expressive musical work in its own right, as well as a logical solution to a self-imposed puzzle. In The Well-tempered Clavier alone, he completed fugues (some with as many as five voices) for every one of the 24 major and minor keys, and then some 20 years afterwards repeated the entire exercise again in a second book. Bach gained such experience, skill and fluency in fugal writing that he was allegedly able to improvise them even on demand.

It was reports of Bach’s prowess that led King Frederick II of Prussia to invite him repeatedly to his palace. Frederick the Great was a keen flautist who employed Bach’s son Carl Philipp Emanuel as the harpsichordist in his private orchestra, and had a genuine passion for music, composing many works for himself and for his ensemble, reportedly practising for four hours a day and taking his flute and a collapsible harpsichord with him on military campaigns. As is often the case with those privileged with wealth and power, he liked to surround and associate himself with the finest musicians, artists and poets. Despite several requests for Bach’s company, they met only once and for a matter of hours, when Bach made the onerous journey from Leipzig to Frederick’s magnificent town palace Stadtschloss in Berlin. Bach – always keen for patronage – also used the opportunity to see his new grandson for the first time.

Bach’s ‘failure’ to fulfil the king’s requests is a significant and profound moment in music history

The meeting – for which we have an eyewitness report and supporting documents – gives a rare insight into Bach’s compositional process and to both the extent – and limits – of his craft. After Bach had sampled Frederick’s collection of keyboards, the king arrived at what was clearly a planned attack. As much as Frederick had a genuine admiration and earned appreciation for musical skill, he also enjoyed demonstrating his power and putting his subjects in their place. Voltaire claimed that, for Frederick, a friend was as a ‘slave’, and an invitation to dinner was an opportunity to ‘make a jest of you all evening long’. Enquiring after Bach’s reported skills, he asked the master if he wouldn’t mind improvising a fugue on a subject of the king’s own creation, and immediately presented him with the following theme:

The Royal Theme in Bach’s manuscript. Image courtesy IMSLP

Audio of The Royal Theme

This is a cunningly crafted challenge. It fulfils the overt features of a fugal subject, with a clear tonal centre, and logical phrasing – it is melodically coherent. However, in all other ways, it is fiendishly difficult: the use of chromatic notes and their rhythmic placement across its long duration make them a beast to negotiate in a contrapuntal setting, requiring significant sophisticated harmonic skill. Frederick might well have conspired with musical experts (perhaps even Bach’s son) to set this trap for the virtuoso, and so the request to extemporise a three-part fugue was probably born as much from mischief as from innocent curiosity about the limits of Bach’s compositional genius. However, despite being weary and unrested from the long journey, and under the gaze of the king and a company of distinguished musicians, Bach somehow managed to corral this knotty melody into a beautifully crafted three-part fugue, introducing the three voices with the devilish subject and then letting them fly independently while collectively exploring yet more distant and labyrinthian harmonies. Bach even – under all these constraints – employed melodic and rhythmic features of a more ‘pop’ late-Baroque style that he knew Frederick enjoyed.

The first page of Bach’s Ricercar à 3 (three-part fugue) on the Royal Theme with complete statements of the subject annotated at the tonic (red) and dominant (blue). Image courtesy IMSLP and annotated by the author

Audio of Bach’s Ricercar à 3 (three-part fugue) on the Royal Theme

Perhaps as much irritated as impressed, Frederick was not satisfied with this remarkable performance. He immediately demanded that Bach now concoct a six-part fugue on the same subject. This was no small ask – in both books of The Well-tempered Clavier, Bach had only occasionally used as many as five voices – and these were with far more accommodating self-selected fugal subjects, and with the luxury of composing at leisure rather than extemporising in front of an audience. Instead of accepting this challenge, Bach improvised a six-part fugue on a theme of his own choosing.

Bach’s ‘failure’ to fulfil the king’s requests is a significant and profound moment in music history. He might have found a stunningly elegant ‘solution’ to the six-part puzzle on the Royal Theme soon after his return to Leipzig but, in that moment with the king, it was beyond his inspiration and real-time skills. So Bach’s inability to meet the task on 7 May 1747 in fact brings all his musical achievements into sharper definition: the convenient myth of the divinely inspired composer dissipates to reveal the perhaps more miraculous real-world and hard-won craft. Bach was a quite remarkable human craftsman with limits, not someone with a hotline to God.

Bach quickly collated a transcription (or adaptation) of his three-part improvisation and the six-part fugue, alongside a staggering collection of ingenious canons, pieces crafted for Frederick’s playing ability, taste and ensemble, all revealing the pluripotency of the awkward Royal Theme. This Musical Offering demonstrated mirror structures, endlessly rising or lengthening canons (to reflect the king’s growing glory and fortunes), intricate puzzles, deep fugal craft, biblical and numerological references, and encoded acronymic messages within the titles of the works. Layers of external and musical meaning co-existing and entangled in an elaborate fugue of fugues.

Within weeks of their meeting, Bach dispatched The Musical Offering to the king, but – as is often the case with those of privilege of power – we have no record of Frederick thanking Bach, acknowledging receipt, or performing or in any way engaging with this extraordinary work. Still, we get to enjoy and admire it to this day, and the gift of Frederick’s trap is not just in provoking one of the last of Bach’s major works, but also in giving us a uniquely valuable insight into Bach’s craft – a frozen moment of his process and not just its inscribed remnants.

The Musical Offering also formed the impetus to Bach’s last (uncompleted) work, The Art of the Fugue – a similar thesis of motivic pluripotency in canonic and fugal forms, but this time on a theme of Bach’s own choosing. By this time, Bach’s eyesight and writing arm were in poor shape from years of constant work, and a series of surgical eye operations (one shudders to imagine what those involved) left him with intermittent blindness until his death from a stroke on 28 July 1750.

The Art of the Fugue was left unfinished. In the last (incomplete) fugue that he wrote (here termed Contrapunctus), the independent voices come to an end abruptly, not together but in succession. An inscription below the fugue translates as: ‘At the point where the composer introduces the name BACH [for which the English notation would be B♭–A–C–B♮] in the countersubject to this fugue, the composer died.’ A profound silence is experienced when the fugue is heard in this incomplete (yet, in a sense, complete) form. But this poignant and apt resolution of Bach’s life and music might be, to some extent, a fiction.

The last (unfinished) page of Bach’s Contrapunctus XIV from The Art of the FugueCourtesy Wikipedia


This conceit of Bach returning to the Lord as he entraps his own name into his ‘divinely inspired’ music is too beguiling to resist retelling. However, it’s a version of events that does not withstand scrutiny well. The manuscript appears to be in Bach’s own hand, which would suggest it predates his final deterioration of health, and was not – as we are led to believe – dictated to Carl Philipp Emanuel in his blindness. This is likely a ‘staged’ profundity, particularly when we notice the number of the fugue in the collection – 14, of course. It is, yet again, rather than divine intervention, an example of Bach’s craft – and craftiness – operating on multiple levels, for musical and extra-musical expressive effect.