gpt-producer.mp4
GPT-Producer is an experimental project that allows your MIDI device to communicate with GPT, generate music given a prompt, and even generates a creative review written by a simulated "Rolling Stones Magazine" reviewer.
Disclaimer: This is not a production ready code. It's a fun illustration of what can be achieved over a weekend! Moreover, the majority of the code and this README have been generated with ChatGPT.
-
Install dependencies with:
pip install -r requirements.txt
-
Make sure you have
ffmpeg
andabc2midi
already installed. You can use the following commands to do so:sudo apt update sudo apt install ffmpeg sudo apt install abcmidi
-
IMPORTANT: Remember to bring your OpenAI API Key, update
gpt_describe.py
with your key.//TODO using .env
-
Connect your MIDI device to your computer.
-
Run the program with:
python main.py
- Record MIDI events from your MIDI device as you play.
- Convert the information to ABC format, which is then passed to GPT.
- GPT creates a prompt for the MusicGen model. This is an important step because it means that GPT can reason about the music you just played.
- MusicGen to generate the music given the prompt and what you played, which is used for guidance.
- Meanwhile, GPT generates a creative review as if it was written by "The Rolling Stones Magazine." Think of it as a very creative loading spinner.
GPT-Producer is released under the MIT License. See LICENSE for details.
PRs are welcome! Feel free to contribute and experiment with the GPT-Producer, an intriguing blend of AI-generated code and user input.
Most of the code in GPT-Producer and this README have been generated with the help of ChatGPT. Get inspired by this fascinating synergy of AI and human interaction in the realm of software development!