The Prelude and Fugue in G minor, BWV 535 (Weimar 1708?), is one such multiple-version-surviving piece. BWV 535a, the early, very different, and incomplete version of the work, is thought to have been composed sometime before Bach took the job of organist in Weimar (before 1708); the final version, BWV 535, is almost certainly a product of those Weimar days and, thus, might well be separated from its predecessor by as many as ten or 12 years.
As it stands in its final version, the Prelude of BWV 535 is a florid, flexible 43-measure mock-improvisatory essay, a series of seamless and propulsive arpeggio figurations separated from one another by brilliant scales and rounded off at the end by a paragraph of thick imitative polyphony.
The Fugue of BWV 535a, the early version, never made it past its 65th bar. When composing BWV 535 proper, Bach took up these 65 original bars of music and subjected them to a number of superficial alterations: the contrapuntal framework remains unchanged, as does the subject itself, but a number of rhythms and notes are changed here and there, and a few measures were almost entirely rewritten. He added 12 more bars to finish off the last subject statement (in the pedals, which had broken off in mid-stride in BWV 535a) and provide the usual showy, cadenza-like coda.
- in "Attachments" you can download the free musical score