Many of the surviving letters of J.S. Bach are concerned with money. This is not surprising considering given the number of children that the Bachs needed to support; of twenty-two children, seven survived. When not concerned with monetary issues, Bach focused on pedagogical aims: creating learning tools for his keyboard students and children. Collections such as his last great work The Art of the Fugue, his Two Part Inventions and the well-known Well Tempered Clavier are the fruit of such labors.
In the Baroque era, tuning keyboard instruments. The traditional method was to tune by ear in much the same way people tuned monochords in the medieval period. First a particular pitch was tuned to match a tuning fork. From that octaves up and down the keyboard were tuned by ear. After the octaves were tuned, the fifths were tuned above and below the original note and octaves tuned off of that. Eventually all the notes would be tuned.
As composers began to explore the modulatory possibilities of tonality (the act of moving from one are of pitch priority to another) they often found that a piece that sounded in tune when it began in the home key sounded more and more out of tune as the work moved to more and more remote key areas. To compensate for this, theorists began to develop alternate tuning systems. Among these was a system known as equal tempered tuning, in which all keys were equally usable, in that all pitch intervals and keys were equally out-of-tune. Considered from the procedure outlined above, one would detune certain intervals, sacrificing the purity of the individual sounds for the greater good of the whole. As keyboard instruments developed throughout the eighteenth and nineteenth centuries, equal-tempered tuning became standard for the modern piano.
In the early 1720s, Bach conceived of and assembled a volume of 24 Preludes and Fugues: a prelude and fugue for every key, major and minor (C-Major, C-Minor, C#-Major, C#-minor, D-Major and so forth). Included among these were numerous keys that rarely crossed a composers desk or a keyboard players fingers. At the time, Bach was preparing to apply for the position of kapellmeister at St. Thomas' church in Leipzig. As a requirement of the poisiton, Bach would be responsible for traditional church duties as well as to instruct students in keyboard playing and scholarship. Based on a close study of the title page:
The Well-Tempered Clavier, or preludes and fugues through all the tones and semitones, both as regards the tertia major or Ut Re Mi and as concerns the tertia minor or Re Mi Fa. For the use and profit of the musical youth desirous of learning as well as for the pastime of those already skilled in this study.
it seems likely that Bach wanted to impress the Liepzig authorities. With this collection, Bach could demonstrate mastery of the scholarly arts.
From a more abstract perspective, by choosing the "well-tempered" tuning system of Andreas Werckmeister, Bach could demonstrate the capabilities of a system whereby all keys were equally usable without losing their poetic appeal and idiosyncratic qualities and ally himself with Werckmeister views. More on that later.
Finally, in such a large collection Bach could demonstrate mastery of a great variety of compositional styles and forms: from the largely improvisatory world of fantasias, to the more measured models, such as the quasi-lute arpeggiation of chords (one-note-at-a-time), as in the C-Major prelude; to dance-type and imitation-filled settings. Similarly, the fugues (complicated polyphonic pieces governed by strict rules of imitation) ran the gamut from simple works for two voices to extremely complex five-voice polyphony in a variety of meters.
Whether these works were intended as demonstration pieces or for private study and performance. they most likely were not intended for public performance, though it is known that Bach himself performed through the entire collection for his student Nicholas Gerber more than once. Among those who took to studying the collection were many of the great composers of the nineteenth and twentieth centuries, including Mozart, Beethoven and Brahms. Schumann was said to have remarked "Make the Well Tempered Clavier your daily bread." Historians of the sort who are prone to canonizing certain composers often refer to the WTC as the "Old Testament" of music. (Beethoven's piano sonatas are the "New Testament.")
The title page of the Well Tempered
Clavier, in Bach's hand.