Generating music in real time for mobile game

Maybe this is a little off topic, but audio and music are a very important part of any experience, so maybe more people are interested in this.

I would like to adapt the music of the game in real time. Are there any SDKs and or tools that help me doing that? Like generative music generation?

And is it possible to use real time sound generators on mobile devices? Or should you avoid that because of performance issues?