Toccata and Fugue in D minor, BWV 538

The Toccata and Fugue in D minor, BWV 538, is an organ piece by Johann Sebastian Bach. Like the better-known BWV 565, BWV 538 also bears the title Toccata and Fugue in D minor, although it is often referred to by the nickname Dorian – a reference to the fact that the piece is written without a key signature – a notation that leads one to assume the Dorian mode.

The two pieces are quite different musically. Like the Fantasia and Fugue in C minor, BWV 562, it is nearly monothematic. It opens with a motoric sixteenth note (semiquaver) motif that continues almost uninterrupted to the end of the piece, and includes unusually elaborate concertato effects. Bach even notates manual changes for the organist, an unusual practice in the day as well as in Bach's organ output.

The fugue, also in D minor, is long and complex, involving a subject which prominently features syncopations and three upward leaps of a perfect fourth. The strict contrapuntal development is only broken in the final four bars, when a few massive chords bring the piece to a close. The fugue of BWV 538 is very similar to the fugue of BWV 540. They both imply an alla breve time signature; they both use subjects with semibreves and syncopated minims, with a rhythm of constant quavers, rather than constant semiquavers seen in most of Bach's fugues; they both use chromaticism, harmonic suspensions, and uninterrupted succession of subjects and answers.

Bach worked in Weimar between 1708 and 1717, during which he composed most of his organ works including BWV 538.