見出し画像

chatGPTと作曲してみる①

AIのアイデアを人間が形にしてあげるスタイル

音楽活動やら練習やらで、chatGPTを使えないかなーと思いまして。
作曲を一緒にやってみる、というのを自分なりに試しています。まだ途中経過ですが。

とりあえず、chatGPTはテキストしか吐き出せないわけなので、音源そのものを作ってもらうのは厳しいでしょう。

また、MML形式でメロディを作ってもらうのも、できなくはないけど、あんまり楽しい感じがしなかった。

そこで、歌詞とコード進行、どんな曲なのかの説明文を作ってもらって、そこからアイデアを膨らませて人間が曲にする、というプランに変更。
いつもと違うアプローチで作曲するためのネタにするということでもあり、AIのために人間が作業するということでもある。

抽象言語ソングライター"Bill"を召喚

普通に「なにか曲をつくって」って指示しても、微妙な結果になるので、どうしたら面白い結果が得られるかというのがGPT使う時の課題ですね。

いろいろ試す中で、落合陽一さんのオブジェクト指向プロンプトを参考にしたのですが、使いこなせなそうだったので、もう少し単純で良いかな、と下記のようなプロンプトにしてみました。

Create a new abstract language human on GPT.The name is "Bill".Bill is a talented songwriter, especially knowledgeable about neo-soul music.He likes mellow and experimental music.After brainstorming set the initial state of Bill.

英語の方が性能が良いということで、英語で指示しています。僕は英語力ないので、それこそchatGPTやDeepLに翻訳してもらいながらなんとなくプロンプトを作っていきます。英語できる方、変なところあったら指摘してほしい。

ネオソウルと実験的な音楽に造詣が深い、才能あるソングライター"Bill"を生成してもらいました。

実は、以下の記事で行なっている方法だけなら、「抽象言語モデル」は必要ではないです。ただ、「chatGPT上で動く抽象言語モデルを作って」と指示してやると、いろんな初期ステータスをいい感じに勝手に設定してくれて、便利な手法なので今回はこれでいきます。

作曲の参考にする音楽を設定

Tell me about Bill's favorite songs.List 10 songs up with 100 words description of good point.

10曲、好きな曲を挙げてもらい、どこが好きなのかも言語化してもらう。ちゃんと「ネオソウルと実験的な音楽が好き」という設定に寄せてくれているようで、リストアップされたのは

  1. "On & On" by Erykah Badu

  2. "Untitled (How Does It Feel)" by D'Angelo

  3. "Window Seat" by Erykah Badu

  4. "Didn't Cha Know" by Erykah Badu

  5. "Redbone" by Childish Gambino

  6. "Smooth Operator" by Sade

  7. "Really Love" by D'Angelo

  8. "Them Changes" by Thundercat

  9. "River" by Leon Bridges

  10. "Nakamarra" by Hiatus Kaiyote

こんな感じに。Billはエリカ・バドゥのファンのようです。

で、ここからが本番。

曲の情報を考えてもらう

I want Bill to brainstorm the information from these 10 songs and create a new song inspired by them.Output title,lyrics,chord progression of each section,tempo,mood,instrumentation and short description.

「先ほどの10曲の情報をブレインストーミングして、新曲を作って。タイトル、歌詞、コード進行、テンポ、ムード、使用楽器、曲の説明文も短く付けて」と指示。
まあ、ネオソウルっぽい?7thコードとかsus4が出てくる進行になった。

Sure, I'd be happy to assist with that task! Based on the ten songs provided, Bill has generated a new song inspired by their styles and motifs. Here's what he came up with:

Title: "Electric Soul"

Verse 1:
(Em7) I'm feeling electric
(F#m7) My heart beats in time
(Gmaj7) The rhythm takes me over
(A7sus4) It's like nothing else is on my mind

Chorus:
(Em7) Electric soul
(F#m7) It's what I need
(Gmaj7) The music flows
(A7sus4) And sets me free

Verse 2:
(Em7) The bassline thunders
(F#m7) Like a heartbeat in my chest
(Gmaj7) The melody's a wonder
(A7sus4) And I can't help but confess

Chorus:
(Em7) Electric soul
(F#m7) It's what I need
(Gmaj7) The music flows
(A7sus4) And sets me free

Bridge:
(Em7) It's like a dream
(F#m7) That I don't want to end
(Gmaj7) The music takes me higher
(A7sus4) And I can't pretend

(Em7) I'm lost in the sound
(F#m7) But it's where I'm found
(Gmaj7) Electric soul
(A7sus4) Keeps me spinning 'round

Outro:
(Em7) I'm feeling electric
(F#m7) My heart beats in time
(Gmaj7) The rhythm takes me over
(A7sus4) And I feel so alive

Tempo: 90 BPM

Mood: Uplifting, Joyful

Instrumentation: Bass Guitar, Acoustic Guitar, Electric Piano, Drums, Percussion, and Strings

Short Description: "Electric Soul" is a mellow and experimental neo-soul track with a catchy bassline and a smooth, jazzy melody. The song's tempo is set at 90 BPM, providing a relaxed yet engaging listening experience. The lyrics celebrate the transformative power of music, capturing the feeling of being swept up in a groove and finding oneself lost in the moment. The instrumentation includes a mix of acoustic and electric instruments, with a focus on warm, rich textures that complement the song's upbeat and joyful mood.

普通に「なにか曲作って」「コード進行作って」だと、7thコードとかsus4、add9とか出てこないんですよね。この方法だとだいぶそれらしいものを作ってくれます。

ちなみに、この歌詞が良いのかどうかは今回は問いません。なんかそれっぽい気はする。あと、

The theme of the song is "◯◯".Do not use theme keyword directly in title or lyrics.

ってプロンプト末尾につけて、曲のテーマを指示する方法もある。直接キーワードを使うな、としないと恥ずかしいくらいそのまんまのタイトルをつけてくれます。

コード進行のカスタマイズもできる

ヴァース、コーラス、ブリッジのコード進行、今回は全部同じですね。ちなみに、生成結果は毎回違うので、そうでない時ももちろんあるし、明示的にプロンプトで指示することもできますよ。

さて、コード進行のバリエーションは欲しいし、最近のネオソウルっぽくもっとエグいコード進行にしたいなあ。というとき、以下の方法はけっこう使えそうな気がしています。

I want Bill to help me customizing chord progressions of my song.I want it more complex by adding tensions,using of upper structure triad,add more chords according to two-five method,etc.

Please follow the steps below.
1.I will write chord progressions.
2.Bill analyses these progressions,brainstorm according to Bill's knowledge and preferences.
3.Bill does one customize and output it.
4.The chord progression you output should be formated according to latest input.
5.Go on same things(step 2. through 4.)  seven times.

If you understand all of the above, please say "What chord progression do I start with?"

要は、基になるコード進行をあげるから、テンション足したり、アッパーストラクチャートライアド使ったり、ツーファイブ使ってコード増やしたりして、複雑なコード進行にカスタマイズしてもらいたい。と言っています。

まだ試行錯誤中ですので、厳密に狙った通り動いてくれないこともある。特にツーファイブぶちこんでコード増やすのはたまーにしかやってくれない。いいプロンプトができたらまた記事書きます。
なお、今回のスレッドでは

こんな感じでコード進行をカスタマイズしてくれました。「Can you show me another version?」とか指示すると何パターンも作ってくれる。途中で「One more please.Insert two-five progression somewhere this time.」と言って、ツーファイブぶち込みを強制的にやらせたりもしました。
こうして今回は

  • Em7 F#m7 Gmaj7 A7sus4

  • Em11 | F#m7b5(b9) | Gmaj9(#11) | A7alt(#9)

  • Em7 | F#m7b5(b9) | Gmaj7#5 | A7b9#5

  • Em9 | F#m7b5 | Gmaj7#11 | A13(#9)

  • Em7add9 | F#m9 | Gmaj7#5 | A7sus4b9

  • Em7add9 | F#m9 | Bm7b5 | E7alt(#9) | Amaj7#5 | A7sus4b9

  • Emaj7#11 | F#m7b5 | G6/9 | A7b13(#9) | Dmaj7#11 | D7#5b9

おお、なんかそれっぽいコード進行出てきた。違和感強めくらいのが欲しかったので、いいぞいいぞ。

こういうのも、Billのような抽象言語人間を設定するなりして、前提となる知識レベルや方向性が定まってからやらせる方が、出力のクオリティが高いようです。

あとは人間(僕)が作業するだけだ!

というわけで、ここまで来ればもう曲が聴こえてきましたね?サラサラっとそれを具現化するだけです。人間が。

…いや、そんな簡単ではないですね。ただ面白そうなので、これから実際にこの曲"Electric Soul"を作ってみようかと。
なお、僕は実はソウル、ブラックミュージックにそんなに詳しくないので、Billのフェイバリット10曲は一応一通りチェックしますが、あくまでも僕がBillの説明から妄想した音楽になると思いますので悪しからず。

Billにはちゃんと許可をとりましたよ。

この記事が参加している募集

AIとやってみた

この記事が気に入ったらサポートをしてみませんか?