RiccardoCataldi/Ai-Duet — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small Python app that turns my MIDI keyboard into an AI duet partner. When I run it, it should let me choose my MIDI input device, listen to what I play in real time, and every few seconds generate a matching musical response so I hear my part and the AI part together. I want my keyboard sound and the generated sound to use different instruments, with simple controls while it is running so I can press i to change my instrument, g to change the AI instrument, and q to quit.

Please make it save the generated music to a MIDI file when I stop, and support normal General MIDI instrument numbers from 0 to 127. Assume I already have a trained model available in the project and use that for the music generation. Keep the setup straightforward so I can install requirements, run main.py, pick a device, and start playing. If anything is unclear, look up current MIDI and TensorFlow docs online and wire it up end to end.

Want more depth? Deep Reverse