This is brilliant- nicely written and a great introduction into a neat approach for generating music. The resulting piece is a very convincing piece of classical music too! The simplicity in developed Python framework for this kind of music generation is inspiring- I like the functional approach with defined core elements.
Reverse engineering music is hard, music has patterns but it also has patterns of breaking patterns. I think the heuristics here for compostable repetitive elements that repeat, reduce, and elaborate is a neat approach-very fractal-like in a way.
I'm looking forward to reading the other articles submitted by you!