Would adding musical notations to LLMs training data allow it to create music since notations are a lot like normal languages? Or does it do so already?

  • howrar@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    ChatGPT appears to be able to generate music in lilypond notation. It gets the notation, but not the music. You could probably fine tune a model on some lilypond files to get better results.

    • micheal65536@lemmy.micheal65536.duckdns.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I tried getting it to write out a simple melody using MIDI note numbers once. I didn’t think of asking it for LilyPond format, I couldn’t think of a text-based format for music notation at the time.

      It was able to produce a mostly accurate output for a few popular children’s songs. It was also able to “improvise” a short blues riff (mostly keeping to the correct scale, and showing some awareness of/reference to common blues themes), and write an “answer” phrase (which was suitable and made musical sense) to a prompt phrase that I provided.

  • mo_ztt ✅@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Just my unqualified opinion, but it probably wouldn’t work the way you want it to. Just like if you ask it spatial-orientation questions or to draw a graph with ASCII, it can imitate the form of the answer, but since it doesn’t really understand the domain (can’t hear the music) what it outputs would be of pretty limited quality.

    There are AI models that are designed to produce music though, and they seem like they do a pretty passable job. Also, for what it’s worth, there’s this:

    Write a score for a space opera in Lilypond notation.

    Creating an entire space opera score in LilyPond notation would be a massive undertaking that would require a lot of space and time. I can, however, provide a short excerpt or motif that might be representative of such a work. Here’s a simple motif for a space opera, assuming a majestic and futuristic tone for a lead instrument (like a trumpet or synthesizer) and some chords for a backing instrument (like strings or a keyboard):

    \version "2.20.0"
    
    global = {
      \key c \major
      \time 4/4
    }
    
    leadMelody = \relative c' {
      \global
      c2. d4 | e2. d4 | c2. r4 | g'2. a4 | g2. a4 | f2. r4 |
      e2. d4 | c2. r4 | c2.
    }
    
    backingChords = \chords {
      c2:maj7 d:min7 | e:min7 d:min7 | c:maj7 r4 | a:min7 g:maj7 | a:min7 g:maj7 | f:maj7 r4 |
      e:min7 d:min7 | c:maj7 r4 | c2:maj7
    }
    
    \score {
      <<
        \new Staff \leadMelody
        \new ChordNames \backingChords
      >>
      \layout { }
      \midi { \tempo 4=80 }
    }
    

    This is just a very basic example, and a real space opera would have more instruments, voices, motifs, and variations. You could expand upon this, develop more motifs, and incorporate more instruments to fit the mood and narrative of your opera. Remember, LilyPond is powerful and can accommodate complex musical ideas, so the sky’s the limit!