There are a number of languages / environments to help with the creation of generative music under the umbrella term 'live coding' - the community also tries to keep the performance aspects of music intact.
Lots of great starting points at: https://github.com/toplap/awesome-livecoding