If you ask ChatGPT to produce a melody, it will give you a list of notes. I made a Python notebook (linked in the walkthrough) that takes those notes and generates a MIDI file and audio output. This post walks through 3 sample scenarios: a simple melody, a blues melody, and a drum loop.