Not exactly programmatic, but I saw another streamer hook up their chat to super collider so folks could do a collaborative jam session. It was chaos, but a lot of fun.
(and for anyone not familiar with supercollider: https://supercollider.github.io/ - it's open source software that's "A platform for audio synthesis and algorithmic composition, used by musicians, artists and researchers working with sound.")