Given a harmonic progression and the first accompaniment motif, how to automatically generate an entire accompaniment progression? In this blog, I will tackle this problem with R language and R package “gm”. Please note that, for illustrative purposes, the solution presented here is only a simplified version. I will talk more about this in the last section. Let’s first clarify the problem, before diving into it. Clarify the Problem Take the beginning of Chopin’s nocturne …