Counterpoint and voice-leading applied to live coding: How to?

Hi, everyone!

Is it possible to perform on-the-fly polyphonic contrapuntal music on a live coding setting?

Context:
All the live-coding or algorave examples I’ve found are of either monophonic or homophonic texture (namely: a single melodic line, or a melodic line accompanied by chords, respectively). Of course, I know they’re both the main musical textures found in most classical, folk and popular music. But I want to explore the old renaissance and baroque polyphonic way to make harmonic music, by combining and layering single, in(ter)dependent melodic lines into a complex, almost chaotic, yet breath-taking musical texture, as masters like Palestrina and J. S. Bach did in their own compositions. I’d love to compose and perform things like rounds, canons and fugues via live coding, as well as apply it to the strict counterpoint exercises found in the infamous Fux’s Gradus ad Parnassum.

If it’s possible to do that, how to?

Thanks in advance for your responses.

Best regards,
Francisco.

Francisco
I think you might like this lovely example in the Extempore documentation:

The coding is in Scheme and the scheme-like ‘xtlang’.
Other pages in the docs explain how to download and install extempore. There are many tutorials and examples. Love to hear what you think about it all.
Regards
George