And here is a performance (it is of both prelude and fugue):
A typical Bach prelude: brilliant, tightly-written (meaning it is based on one motif) and harmonically delightful. One thing about this prelude in particular is that it is in the time signature of 24/16 (on top and "common" time on the bottom). Sure, that is just 4/4 with sextuplets. But I cannot think of a single other example of a composer who just had to use the 24/16 time signature! Now let's look at an example from Shostakovich that is vaguely similar. Here is the A major prelude:
And a performance, again, with the fugue as well:
Very charming prelude, also tightly-written and with delightful harmony. Shostakovich also has a compound time signature, but the much simpler one of 12/8.
Let's look at the last fugues in each opus. Bach organizes his pieces by simply moving up the chromatic scale: beginning with C major and minor he progresses to C# major and minor and so on until the final prelude and fugue are in B minor. Here is the beginning of the fugue in B minor:
Here is a performance of the prelude and fugue. The fugue begins around the 7:48 mark:
I picked the Richter performance because I like this one slow. I have Friedrich Gulda and he takes sixteen minutes!
Shostakovich organizes his pieces through the circle of fifths. C major is followed by A minor and then by G major and E minor. This means that his last prelude and fugue are in D minor. Here is the beginning of the fugue:
Far simpler theme, almost bare with all those fourths. Here is a performance, by Shostakovich himself, of both prelude and fugue. The fugue starts around the 4:16 mark:
After a long section just using that simple subject, there is an accelerando into a Più mosso with a new subject in running eight-notes. Then the two subjects are combined, making this a double fugue. On the last page there is a stretto using the first subject, accompanied by the second subject.
Some things to notice: the pieces by Bach are actually more complex in some ways than those by Shostakovich. There is a wistful, archaic quality to the Shostakovich. In the D minor fugue he resorts to some rather dramatic devices. Bach, on the other hand, just works out an incredible variety of contrapuntal possibilities with that tricky subject--it is really a tour de force.
If Shostakovich does not quite manage to out-do Bach at preludes and fugues in all the keys, he certainly writes some wonderful music. Beethoven answered Bach's Goldberg Variations with his Diabelli Variations to great success, but bear in mind that Shostakovich is the only one, in three hundred years, to fully take up the challenge of the Well-Tempered Clavier!