TL;DR

From the past… generative music with no brains!

About 15 years ago I had the pleasure and honor to know larsen.

He used Markov chains to generate music automatically, starting from an example MIDI file. Alas, after some time his Automatic Music with Perl became a bit stale and the pointer to the code was lost…

Internet Archive to the rescue! Here’s a copy of the code, for future generations:

Local copy.

Thanks larsen 😄