Adventures in Generating Music through ChatGPT Textual Content Prompts
Adventures in Generating Music through ChatGPT Textual Content Prompts

Colourful Light Creates BokehYesterday OpenAI launched ChatGPT, a chatbot that uses a sophisticated language mannequin and is aware of loads concerning the world. It can provide excessive-high quality solutions on enterprise strategy, discuss in funny dialects, write coherent poetry/jokes/limericks and customarily present affordable answers to any question you throw at it. I used to be curious: Let’s see whether or not this thing can generate music! Provided that ChatGPT communicates via plain textual content, it will need to encode music in a text-based mostly format. Fortunately, a number of such codecs exist. The de facto fashionable customary is MusicXML, so I began with that. How would you encode the melody to "Mary Had Just a little Lamb" as MusicXML? MusicXML is a broadly-used digital language for representing musical notation. It gives a standardized format for storing and sharing musical scores in a approach that's readable by both humans and computers. To encode the melody of "Mary Had A bit Lamb" as MusicXML, you'd first have to transcribe the melody into musical notation using a music notation software program or a rating-writing program that helps MusicXML.

Once the melody has been transcribed, the software program will routinely generate the corresponding MusicXML code, which you'll then save and share with others. Wow, this truly resembles real MusicXML! There’s just one concern - it’s invalid XML, because the , and elements aren’t closed. Could you please repeat that MusicXML, but be certain it's a valid XML document? Among the XML components don't have a corresponding closed element. No dice. It effectively repeated the same thing, with invalid XML. But, no worries - I’m glad my human brain may be put to make use of. I added the lacking XML elements myself, then uploaded that MusicXML into Soundslice to see how it would sound. Not bad! It’s more or less the first two bars of the tune. Only one quibble: ChatGPT wrote the melody in the key of G main but used a C main key signature. But all things thought of, that is spectacular.

I might have appreciated extra of the music, however maybe it ran right into a limit on how long embedded code examples might be (more on this later). Please write the melody of "Happy Birthday" in ABC format. In ABC notation, each line begins with a letter adopted by one or more characters. In this example, the X:1 line indicates that that is the first tune within the file, the T:Happy Birthday line signifies the title of the tune, the M:4/4 line signifies the time signature (four beats per measure, with a quarter word because the beat), the L:1/4 line indicates the note length (a quarter be aware), and the K:C line indicates the important thing (C major). The melody is then written as a sequence of chords, with each chord consisting of one or more notes played simultaneously. The duration of every word is indicated by a quantity after the observe letter, with a / image indicating a dotted note.

For example, in the primary measure of the melody, the chord C C G G signifies that the C main chord (C, E, and G) is performed, with each note lasting for a quarter note. I’m impressed that it got here with a longhand rationalization. But was the music really appropriate? Soundslice doesn’t import ABC information yet, so I pasted that ABC code into this free ABC viewer and obtained a PDF in response. Hmm. This sounds suspiciously like the “ABC song” (aka “Mary Had Slightly Lamb” or “Twinkle Twinkle Little Star”). Could or not it's that ChatGPT misinterpreted my request for the ABC music notation format to imply the ABC track? Please write the melody of "Happy Birthday" using the ABC format. Guantee that the melody is "Happy Birthday" and the melody will not be the "ABC tune". Alas the response was precisely the identical. I’m pondering both ChatGPT doesn’t know sufficient in regards to the ABC format, or I don’t know the right incantation to make it keep away from encoding the ABC track.


Leave a Reply

Your email address will not be published. Required fields are marked *