Gödel, Escher, Bach:
For some delightful anecdotes about Bach’s extemporization, see The Bach Reader, by H. T. David and A. Mendel.
The book can be borrowed from the Internet Archive.