J.S. Bach and the Art of Improvisation

One could probably liken the task of improvising a six-part fugue to the playing of sixty simultaneous blindfold games of chess and winning them all.
— Douglas Hofstadter, author of "Gödel, Escher, Bach"

Johann Sebastian Bach was one of the greatest musical improvisers of all time.  Here is Charles Rosen's account of the day Bach improvised a six part fugue for the King of Prussia!

It was on May 7, 1747, that Bach visited Frederick the Great at Potsdam. The Prussian king preferred the pianoforte -- then called ''forte and piano'' -- to the less nuanced harpsichord or the organ; so much so that he had 15 of the instruments built for him. During this visit the king led Bach from room to room to try them out. (Bach had encountered pianos before the royal visit; he had complained that their action was too heavy, their treble too weak.) Frederick played for Bach a theme of his own and then asked Bach to improvise a fugue on it. After Bach obliged with a three-voice fugue, the king demanded a more spectacular six-voice fugue. Bach improvised a six-voice fugue on a theme of his own, but on his return to Leipzig wrote out a six-voice fugue on the royal theme. He had it printed with a number of other works all based on the same theme, and sent it to Frederick as ''a musical offering.''

- From Best Piano Composition: Six Parts Genius (New York Times.  April 18, 1999) by Charles Rosen, author of The Classical Style.