Prelude and Fugue in D major, BWV 874

The Prelude and Fugue in D major, BWV 874, is a keyboard composition by Johann Sebastian Bach. It is the fifth prelude and fugue in the second book of The Well-Tempered Clavier, a series of 48 preludes and fugues by the composer. It was composed between 1739 and 1742.

Prelude
The prelude's autograph is missing, probably due to conditions. The prelude consists of 56 bars and uses a double time signature of cut time and time, which gives rise to two performance issues: if the dotted quaver and semiquaver pairs should be played at the same time as the triplet quavers (such as in bar 10); where most commentators think they should be, and if the quavers in bar 2 should be played as triplets; where most commentators think they should not be.

The prelude's structure follows that of sonata form, having a 16-bar exposition, a 24-bar development, and a 16-bar recapitulation. Below are the first 2 bars of the prelude:

Fugue
The fugue is in cut time and consists of 50 bars. Its subject consists of a motif of three quavers and two crotchets repeated twice. It seems similar to a stile antico, though the structure is modern, with expositions and episodes alternating throughout the fugue. Moreover, the structure uses many modulations, including the modulation to A major in bar 20 and F-sharp minor in bar 27. After the latter modulation, the fugue returns to the tonic key of D major. Unlike the typical sonata form, instead of a recapitulation, Bach uses a series of close strettos, the last of which contains subject statements from all four voices in bar 44.

The episodes of the fugue are in a canonic texture, and in these episodes, the motif grows from six notes in bar 7 to eight notes in bar 16, to a two-octave descending scale in bars 38–40. While the fugue is in cut time, the notes used are mainly crotchets and quavers, rather than minims and crotchets, to suggest that the piece should be lively in performance. Below are the first two statements of the fugue's subjects: