Thanks for the Bach, Michael. These prophetic moments are usually fascinating, even if accidental (by which I mean, one can say Bach anticipated Schoenberg only because Schoenberg later existed; or as Borges wrote: "every writer creates his own precursors"). Anyway, in Beethoven's last piano sonata there is a section that anticipates ragtime (at the 16 minute mark
here).