Prelude and Fugue in B-flat major, BWV 866

The Prelude and Fugue in B-flat major, BWV 866, is a keyboard composition by Johann Sebastian Bach. It is the 21st prelude and fugue in the first book of The Well-Tempered Clavier, a series of 48 preludes and fugues by the composer. It was composed no later than 1722.

Prelude
The prelude is in common time (4/4 time) and is composed of 20 bars, which are split into 2 periods of 10 bars each. The first period has a toccata-style melody which uses demisemiquaver (32nd note) broken chords and scale passages. In the first two bars, it uses a four-note sequence which drops by a third every half-bar. This period ends with a perfect cadence in dominant key of F major.

The second period uses a fantasia style and alternates between chords and scale progressions. The coda in bar 20 uses an extended arpeggio in the tonic that confirms the key of B-flat major. One copy of the prelude by a Bach pupil has the word adagio to the big chords in bar 11, which suggests that the second period should have a more improvisatory rhythm. Below are the opening bars of the prelude:

The Czerny edition has an extra bar added accommodating a cadence after the 20th and final bar of the prelude, described by Tovey as "the most Philistine single printed chord in the whole history of music".

Fugue
The structure of the fugue is similar to that of sonata form: it has an exposition (bars 1–13), a development (bars 13–41) and a recapitulation (bars 41–48). In the exposition, the subject is stated in the tonic, B-flat major. The second voice enters in the dominant, F major, in bar 5, then the third voice enters in the tonic once again in bar 9.

In the development, the subject is restated, then the first episode (bars 19–22) modulates the fugue to G minor, then the subject is restated twice in G minor, then C minor. The second episode (bars 30–35) then modulates the fugue to G minor, then C minor. The subject is then restated in E-flat major.

In the recapitulation, the subject is restated once again, still in E-flat major, then a coda (bars 45–48) leads to a perfect authentic cadence in the tonic. Below are the first two statements of the fugue: