Introductory note:

Musikalisches Opfer is German for "Musical Offering". Bach etched the German words on the original copy of the work that he presented to the King. I have decided to refer to the piece by its English translation because it is easier to read it that way and also because this is the common practice in the English literature about the piece.

The origin of Bach's Musical Offering:

In 1747, Johann Sebastian Bach visited Frederick the Great in Potsdam at the behest of the King. Bach was well received by his host and was asked to improvise a fugue based on a musical "theme" that Frederick created on his flute. This musical theme was fairly complex and had an irregular rhythm. Further complicating the chore, the theme was highly chromatic (many tones in the theme did not match its key).

Bach used this "Royal Theme" in two supposedly improvised fugues. Bach reputedly composed one fugue with three "voices" and another with six voices -- on the spot! Improvising either fugue would be an arduous task for any composer -- but a six-part improvised fugue is beyond the capabilities of any known composer. Most authorities believe that the three-part fugue in Musical Offering was identical to the one originally improvised for the King. It's possible that the six-part fugue was created at a later date, because the varying accounts of the incident indicate that some parts of the story may have stretched the truth.

After Bach returned to his home in Leipzig, he continued his work playing with the "Royal Theme". He transcribed his three-part fugue, a six-part fugue, ten separate canons, and a trio sonata -- all of based on the "Royal Theme"!

Bach originally titled his work "Regis Iussu Cantio Et Reliqua Canonica Arte Resoluta" ("At the King's Command the Song and the Remainder Resolved with Canonical Art")-- which amusingly enough is an acrostic for "ricercar" (Italian for "to seek"). A ricercar was also another name for a fugue -- or at least a certain kind of fugue -- a complicated intellectual one. The two fugues in Musical Offering were both named ricercar.

The Musical Offering contains three distinct forms of musical composition: the fugue, the canon, and the sonata. There's no clear way to determine which order the individual pieces should be played. Taken a group there is not a lot of noticeable unity -- rather it sounds more like a motley bunch of interesting works thrown together. The main unifying elements: the Royal Theme, all are written in the key of C minor, and they all involve multiple independent voices (polyphonic) layered on top of each other. The individual canons -- while extremely interesting on their own -- seem to be offered by Bach more as puzzles (or possibly etudes?). Further making the Musical Offering difficult for conductors is that Bach didn't specify which instruments should be used for most of the pieces. This has led to a wide variety of interpretations of the work.

The two ricercar fugues:

These two ricecari are considered to be the best demonstrations of Bach's contrapuntal writing available. The three-voice ricecar ("Ricercar a 3") and the six-voice ricecar ("Ricercar a 6") -- while both encompassing Frederick's Royal Theme -- must still be described as extremely different. They usually are not played directly after each other. They are usually the bookends over a set of the canons.

  • Ricercar a 3

    The three-part fugue is typically played on a single harpsichord (or fortepiano or clavichord) because Bach himself improvised the piece on a single keyboard instrument. It begins simply with a single "voice" singing the Royal Theme. The second voice enters over the top and sings the theme. Then the third voice, the bass line, enters the mix with its version of the theme. The three voices then tumble over each other taking their turns repeating the theme while also introducing a new playful melody interspersed with sensitive suspensions that float between the voices. The fugue ends with a quick sigh. I've only heard this version played at fairly high speed, but even at a fast pace the fugue lasts around 4 minutes.

  • Ricercar a 6

    This six-part fugue is most often played on a harpsichord, but you'll also find it played using multiple instruments: violin, flute, viola, and bassoon are quite common. Like all fugues the first voice comes in solo and sings the major theme. It is followed by the other voices that each in turn come in and rattle off the theme. The song slowly builds as each of the six voices makes its introduction, but once all the voices enter the piece it becomes very dense and somewhat somber. I prefer the sounds of the multiple instruments to the plain harpsichord or piano, because the voices are more easily recognizable, but it's a very rich and complex fugue that sounds interesting in a variety of ways. This piece usually lasts between 6 and 9 minutes.

The ten canons:

These were added to the Musical Offering as puzzles for King Frederick. The each bring out the royal theme in very interesting ways.

Bach didn't specify all the instruments to be used in the canons. They can all be played using a single or multiple harpsichords (with the exception of Canon 2. which implies two violins for the canonical bits). I have also have tried to mention a few other possibilities for the instrumentation where I thought it was warranted.

  • Canon 1. a 2 cancrizans

    A Crab Canon (or Retrograde Canon) -- this piece is interesting because the leading and following voice enter the piece simultaneously, except for one not so obvious difference -- the follower is an exact replica of the leader in reverse! Bach made this puzzle easy to solve by placing upside down clefs at the end of the piece on his original manuscript. The leader is the royal theme (8.5 measures) and 9.5 measures of counterpoint (18 measures in total. Mathematically this would be expressed as:

          f(t)   +    f(18-t)   
       (leader)     (follower)
    
    This piece is sometimes played with a single instrument (usually harpsichord), but when it's played with two instruments each person plays their part first forwards and then backwards. The effect of this is that the piece is heard twice (36 measures), but the first and second halves are not identical.

  • Canon 2. a 2 Violini in unisono

    Violins in Unison is meant for two violins. The score of this simple and strict canon is only eight measures long, but we hear the second voice come in after just a single measure. The third voice -- which harmoniously plays in the bass line -- is the "Royal Theme". Being a fairly strict canon (like Row, Row, Row Your Boat) -- the math behind it is also simple:

          f(t)   +    f(t-1)    +      R   
       (leader)     (follower)     (Royal Theme)
    
    Violins play the two canonical voices while a keyboard instrument (e.g. harpsichord) plays the third voice.

  • Canon 3. a 2 per Motum contrarium

    Contrary Motion is expressed by this canon. The canon's leader is followed 1/2 a measure later by the follower voice. A third voice plays the Royal Theme in harmony on the top staff. The follower is an upside-down (but still forward) transcription of the leader. Expressed mathematically we have:

       f(t)   -   (f(t-.5)+C)   +      R
    (leader)       (follower)     (Royal Theme)
    
    The "C" constant in the follower is to get the leader and follower to play in harmony at the same tonal level.

  • Canon 4. a 2 per Augmentationem contrario Motu

    "Augmentation in contrary motion" -- Bach added an interesting note to his score, "Notulis crescentibus crescat Fortuna Regis" ("As the notes increase may the fortunes of the King do likewise"). We hear the first voice (leader) and then the second voice (follower) comes in 1/2 a measure later. The second voice is played at exactly half the speed as the first and it's played upside-down (like in Canon 3.). The 1st voice is played in the bass clef and the 2nd in the treble. A third voice (also in the treble between the other two voices) plays a modified Royal Theme. Expressed mathematically we have:

       f(t)   -   (f((t-.5)/2)+C)   +      R
     (leader)       (follower)       (Royal Theme)
    
    The "C" constant in the follower is to get the leader and follower to play in harmony. Since the second voice plays at half speed it takes 16 measures to hear the whole piece. This piece is often played with two instruments -- commonly a harpsichord and a viola.

  • Canon 5. a 2 per Tonus

    This very interesting canon is an example of a spiral canon or "endlessly rising canon". The second voice appears one measure after the leader (as in Canon 2), but it is shifted up in pitch by a perfect fifth. A third voice plays the "Royal Theme" above the two lower canonical voices. Bach included a note on this canon: "As the keys ascend so may the glory of the king also ascend". What makes this canon odd is that it begins in the key of C minor and after played through a single time it is in D minor. Bach also made it so that this spiral can be continued -- the ending flows into the beginning -- so that if we continue another time we'll end up in the key of E. What we end up with is an endless piece that just keeps rising in pitch. Expressed mathematically we have:

       f(t)   +  (f(t-1)+F)   +      R
    (leader)     (follower)     (Royal Theme)
    
    The "F" constant in the follower represents an amount exactly a fifth above the leader.

    Douglas Hofstadter uses this canon as an example of "Strange Loops" and isomorphisms in the excellent book Gödel, Escher, Bach: An Eternal Golden Braid. The piece is typically played on a harpsichord.

  • Canon 6. Fuga canonica in Epidiapente

    This is "Canonic fugue with follower at the fifth". This canon is difficult to recognize as such because the follower is a full ten measures behind the leader. The follower is modulated up in pitch by a perfect fifth. Expressed mathematically we have:

       f(t)   +  (f(t-10)+F)   +      R
    (leader)     (follower)     (Royal Theme)
    
    The "F" constant in the follower represents an amount exactly a fifth above the leader.

    The canonical leader and follower have a third voice (the Royal Theme) which plays below both of them. Usually played on a harpsichord.

  • Canon 7. Canon perpetuus super Thema Regium

    This is an example of a perpetual canon. The end of the canon smoothly flows into its own beginning with no satisfactory ending eminently forthcoming. The canon follower is 2 measures behind the leader. Expressed mathematically we have:

       f(t)   +     f(t-2)    +      R 
     (leader)     (follower)    (Royal Theme)
    
    I've heard this played with three instruments: violin, viola, and flute. Certainly it can be played with others including one or two harpsichords.

  • Canon 8. Canon perpetuus

    Another perpetual canon, but this one is really two separate canons, which seamlessly integrate, in the 18th measure. The canon is a demonstration of a rare form called Mirror Canon. In the first half of the piece we hear a contrary motion canon (like in Canon 3), but as the 18th measure approaches a bridge is heard as we begin the second half of the piece, which is a complete inversion of the first. This time the canonical voices are versions of the theme and the third voice is a free counterpoint. There is no easy place to terminate the piece as the ending freely flows into the beginning. This one is very difficult to explain mathematically, but here's my attempt:

       First half:
           f(t)   +   f(t-2)   +      Cp  
        (leader)     (follower)    (counterpoint)
    
       Second half:
           Same as the first half but played in reverse.  Maybe best written as
           f(18-t)   +  f(18 - (t-2))   +    iCp 
          (leader)     (follower)    (inverted counterpoint)
    
    This piece is sometimes played using the flute, violin, and continuo (bassoon?).

  • Canon 9. Canon a 2 Quaerendo invenietis

    Quaerendo invenietis -- "seek and you shall find" -- is the clue Bach gives us to figure out this piece. This piece is a mirror canon, but the score provided by Bach doesn't provide us with the interval. There are two voices: the leader is in the alto clef and the follower is shown using an upside down bass clef -- an example of Bach's cryptic notation. Both canonical voices are modified versions of the Royal Theme. My simple analysis indicates a follower appearing after the fourth measure (in a different interval). Apparently there are other "solutions" to the problem. Because it's so complicated I cannot attempt a mathematical analysis of this piece -- it's far beyond my meager capabilities.

  • Canon 10. Canon a 4

    Bach again neglects to indicate the interval to be used in the piece -- leaving us to discover it for ourselves. He again uses cryptic notation with an upside down bass clef that appears to be augmented additionally in pitch. We also have four voices "singing" further complicating the problem. An analysis of this piece is again way beyond my skills, but it appears to have one voice following after the second measure (at a separate interval) and another after the ninth measure (at yet another interval). I will not attempt a mathematical representation.

The "Trio Sonata" Sonata Sopr'il Soggetto Reale:

This is the only piece in the Musical Offering that Bach specified the intended instruments. It was conceived as a trio sonata for flute, violin, and continuo (played by a keyboard instrument and cello).

Being a somewhat traditional sonata this piece offers a bit of a rest from the more highly technical and somewhat tedious canons. The piece is a sweet melody that Hoftstadter even describes as "danceable". (I'd like to watch him try it.)

Amazingly, Bach manages to bring in the formal Royal Theme into the piece and make it sound quite pleasing. The four movements:

I. Largo
II. Allegro
III. Andante
IV. Allegro

Traditionally most composers tend to play the Trio Sonata at or near the end of a Musical Offering performance. It provides a needed relief to all the tension.


Concluding thoughts:

My interest in this piece was piqued by Douglas A. Hofstadter's book Gödel, Escher, Bach: An Eternal Golden Braid. His analysis tended to center around the self-referential(or recursive) aspects of the canons (what DAH calls "strange loops").

I am not a classically trained musician by any stretch of the imagination -- I can barely pound out Mary had a Little Lamb on the keyboard. However, I do enjoy listening to classical music and I enjoy mathematics and number theory so I was very pleased to find the Musical Offering -- as it appeals to me on multiple levels.

Lame ass disclaimer: the "mathematical formulae" that I listed above are probably not accurate enough to satisfy either mathematicians or musicians, however this is how I visualize the music in my head. If anyone can come up with a better way to "mathematically" display a song, I would love to hear about it.

Please /msg me if you find any glaring errors.