Reminds me of Francois Pachet’s Continuator (all the way back in 2003, using hierarchical markov models)

https://www.francoispachet.fr/continuator/