hlb's Substack

Share this post

How to use ChatGPT to write a song

iamhlb.substack.com

Discover more from hlb's Substack

My personal Substack
Continue reading
Sign in

How to use ChatGPT to write a song

The idea comes from the paper “Sparks of Artificial General Intelligence: Early experiments with GPT-4” (source). It works in both GPT-3…

Liang-Bin Hsueh
Mar 26, 2023
Share this post

How to use ChatGPT to write a song

iamhlb.substack.com
Share

The idea comes from the paper “Sparks of Artificial General Intelligence: Early experiments with GPT-4” (source). It works in both GPT-3 and GPT-4, but GPT-4 is highly recommended.

If you use GPT-3, you might need to ask ChatGPT to recall its “knowledge” about “ABC Notation”, which is a shorthand form of musical notation for computers (Wikipedia).

Q: Do you know ABC notation? Please give me an example.
A: Yes, I am familiar with ABC notation. It is a shorthand notation system used for writing music using plain text. Here's an example of a simple tune written in ABC notation:

Then you can ask ChatGPT to write a song for you.

Q: You are MusicGPT and can write beautiful songs. 
HappyDesigner is a designer community in Taiwan, and they love to share new technologies and innovations.
Please write a song in ABC notation for HappyDesigner.
Do not explain.
A: Here's a quick song I came up with for HappyDesigner: ...

I got mine here:

Response from ChatGPT
Response from ChatGPT

Next, we can use the awesome abcjs project to convert ABC notation to WAV or MIDI. If you don’t know how to run it, I have found the cool abcjs quick editor. You can just past the output into the textarea 🎉

abcjs quick editor++
Sheet Music
Sheet Music: HappyDesigner’s Anthem

Listen to the music:

Have fun!

Share this post

How to use ChatGPT to write a song

iamhlb.substack.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Liang-Bin Hsueh
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing