I agree - quite a task!!
I'm not at all familiar with the computer-generated music scene, but I do remember reading (many years ago) that the results were not good. Just like with text, computers have a great deal of difficulty understanding and expressing themselves.
This makes me think of the chimpanzees who have been taught to paint - an interesting idea, but the "art" created is far from profound. I can only suggest that artistic expression is something that comes from a long period of learning, and computer-generated music is not too far from a one-year-old child playing with a toy xylophone.
Chatbots at the moment rely on NLP (Natural Language Processing), based upon "rules" of conversation, and it's taken decades to get as far as we have. My guess is that very little of NLP would be applicable to music creation, so it would be a project that needs starting from scratch. I have no idea how many musical rules would need to be programmed into the AI's core - maybe it could learn the rules through observation rather than stringent scripting.
However I do like the "modified echo" idea, and it would be interesting to see if such an AI could generate something appealing after jamming with the user a while. Jazz might be a genre that could be fairly easy to emulate.... I wonder if it's been attempted before? I suspect not - art and science aren't often used in conjunction with each other, so the idea may have hardly been considered before, yet alone implemented....