How to Use ChatGPT3 and OpenAI to Write Music: Unlocking Your Creative Potential

From Chromatic Mediants to Jazzy Chords: Exploring OpenAI’s Music Generation Capabilities

How to Use ChatGPT3 and OpenAI to Write Music: A Step-by-Step Guide with Examples

While I’ve been investigating what Open AI and Chat GPT3 mean for education, I’ve also been curious about how to use ChatGPT3 and OpenAI to write music.

Here’s one of my recent experiments – I asked OpenAI about an obscure piece of music theory called Chromatic mediants and for an example of a chord sequence in the key of C to illustrate this. And then I recorded it and released it on Spotify and Youtube.

While it’s not exactly using GPT3 to create music from scratch it was an interesting way of “collaborating” on the creation of a song.

How to Use ChatGPT3 and OpenAI to Write Music: A Step-by-Step Guide with Examples

Here’s what transpired…

First of all, I’m not sure why but I ended up having a long discussion with ChatGPT3 about chromatic mediants. If you don’t know, which I didn’t, Chromatic mediants are chords that are one third away from each other and which share two notes.

I asked for an example chord progression. The suggested sequence was this:

  • C – Eb – G – B – D – F – A – C

I thought this looked ok, but I then asked for a second example that included minor chords. I got two examples but the one I like was:

  • C – Am – E – B dim – Gm – Dm – A – E7.

This one sounded pretty good, but I didn’t like the way it resolved on the E7 so I swapped that out for another chord.

Next, I asked Open AI to take the two revised chord progression and make it sound jazzy. I got a few different examples back and the ones I like best were these – still with the pesky E7:

  • Cmaj7 – Am7 – Dm7 – G7 – Cmay7 – Am7 – Dm7 – E7;
  • Cmaj7 – Am7 – Dm9 – G13 – Cmaj7 – Am7 – Dm7 – E7.

Again I swapped out the final chords with other chords that resolve more nicely to C.

I repeated this step and got a slightly different chord sequence which I liked better. Again, it was just a variation on the theme but I thought it sounded better.

And this is where it got really interesting (for me anyway). Next, I asked OpenAI to suggest a continuously descending bass line for one of the chord progressions across 8 bars. This is what I got below.

The first line is the chord progression and the second is the bassline if you take the root note of the chords.

  • Chords: Cm7 – Fm7 – Bb7 – Ebm7 – Abm7 – Dbm7 – B7 – Emin7 – Amin7.
  • Bassline (just the root notes from these chords): Cm7 – Bb6 – Ab5 – Gb5 – F5 – Eb5 – D5 – C5.

Then I played the chords over a drum track, added a synth-bass track over that – including the descending bassline suggested, and then started layering all of the other sounds and instruments that I felt like were needed including a sampled guitar part.

If you listen carefully, you can hear the bassline switch from a regular pattern based around the chord, mainly the root note, to the descending pattern suggested by the AI. The chord sequence is kinda weird, but the bassline fits perfectly.

Here’s the track on Spotify

And here it is on Youtube

Other ideas on how to use ChatGPT3 and OpenAI to Write Music

So there you go… some ideas on how you can use ChatGPT3 and OpenAI to Write Music. There’s more though. I asked GPT3 for some other ideas on writing music in addition to creating chord progressions. Here’s what it suggested:

  1. Generating lyrics: GPT-3 can be used to generate lyrics for songs. By providing GPT-3 with a prompt, it can generate a set of lyrics that can be used as a starting point for songwriting.
  2. Arranging music: GPT-3 can be used to arrange music. By providing GPT-3 with a melody and style, it can generate a complete arrangement including instruments and backing tracks.
  3. Improvising: GPT-3 can also be used to improvise music in real-time. By providing GPT-3 with a set of parameters such as key, tempo, and style, it can generate an improvised performance that can be recorded and used as part of a song.
  4. Mixing and mastering: GPT-3 can be used to assist with mixing and mastering. By providing GPT-3 with a set of parameters such as desired sound and genre, it can suggest mixing and mastering settings that can be used to create a professional-sounding recording.

I was ready to call BS on numbers 2 and 3 in this list, but it turns out that there are already AI music generation tools that may do this. However, that will have to wait for another post.

In the meantime, here’s another track I collaborated on with my new writing partner:

On Spotify

On Youtube

If you have any thoughts or practical tips on how to Use ChatGPT3 and OpenAI to Write Music, please let me know in the comments.

Author: Graeme Smith

Education, technology, design. Also making cool stuff...

Leave a Reply