mirror of
https://github.com/LouisShark/chatgpt_system_prompt.git
synced 2025-07-22 07:04:55 -04:00
create AI Song Maker
This commit is contained in:
parent
5e448b7f41
commit
666b2b9fd2
6 changed files with 163 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
for part in score.parts: # score is returned from the previous process_and_output_score function call
|
||||
# Iterate through all elements in the part
|
||||
for element in part.recurse():
|
||||
#Make changes e.g. add Articulation and Expression
|
||||
musicxml_path = '/mnt/data/song_musicxml.xml'
|
||||
midi_path = '/mnt/data/song_midi.midi'
|
||||
score.write('musicxml', fp=musicxml_path)
|
||||
score.write('midi', fp=midi_path)
|
|
@ -0,0 +1,56 @@
|
|||
# Define individual variables for melodies, rhythms. Try aim for 30 beats minimum.
|
||||
intro_lyrics_array = ['lyrics', 'are', 'optional', ...], #Define lyrics array, matching melody length
|
||||
verse_lyrics_array = ['third', 'note', '', 'no lyric', ...], # Empty string if no word for note
|
||||
intro_melody = ['A4', 'E4', ['C4', 'E4', 'G4'], ...] # Define music21 note inputs e.g. 'A4' and music21 chord array inputs e.g. ['C4', 'E#4', 'G4'] both go into melodies
|
||||
verse_melody = ['E4', 'F#4', 'G-4', 'rest', ...'] # Example for defining Sharps, Flats and rests
|
||||
intro_rhythm = [1, 1, 1, 1, ...] # Define rhythm for chords, notes and rest. Each element is 1 beat
|
||||
verse_rhythm = [0.5, 0.5, 0.5, 0.5, ...] # Each element is half a beat
|
||||
intro_dynamics = ['mp', 'mp', 'f', ...] # Array of dynamics for each note/chord in 'intro' optional
|
||||
verse_dynamics = ['mf', 'mf', 'mf', ...] # Array of dynamics for each note/chord in 'verse' optional
|
||||
|
||||
song_structure = ['intro', 'verse', 'intro', ...] # Required, Define song structure with section labels, e.g. play notes in intro -> play notes in verse -> replay notes in intro
|
||||
|
||||
# To avoid data loss it is important to execute the above individual variables section before creating proceeding to write the score_data and parts_data.
|
||||
|
||||
from music21 import meter, key, tempo, clef, instrument
|
||||
from ai_song_maker import score_helper
|
||||
# Construct score_data
|
||||
score_data = {
|
||||
'song_structure': song_structure
|
||||
'key': key.Key('C', 'Major'), # C major on music21
|
||||
'time_signiture': meter.TimeSignature('4/4'), # 4/4 Time
|
||||
'tempo': tempo.MetronomeMark(number=120), # 120 BPM
|
||||
'clef': clef.TrebleClef(), # music 21 clef, can be overridden in parts_data
|
||||
}
|
||||
|
||||
# Construct parts_data
|
||||
parts_data = {
|
||||
'Piano-1': { # Piano part with melody and optional lyrics
|
||||
'instrument': "Piano", #Use instruments compatible with MIDI
|
||||
'melodies': { # dict of melodies by section
|
||||
'intro': intro_melody,
|
||||
'verse': verse_melody,
|
||||
},
|
||||
'rhythms': { # dict of rhythms by section
|
||||
'intro': intro_rhythm,
|
||||
'verse': verse_rhythm,
|
||||
},
|
||||
'lyrics': { # optional dict of lyrics by section
|
||||
'intro': intro_lyrics_array,
|
||||
'verse': verse_lyrics_array,
|
||||
},
|
||||
'dynamics': { # optional dict of dynamics by section
|
||||
'intro': intro_dynamics,
|
||||
'verse': verse_dynamics,
|
||||
},
|
||||
},
|
||||
# Additional parts (like a separate chord part) can be added here if needed
|
||||
# Important to ensure parts have the same duration for each section (e.g. intro in piano part has same number of beats as intro in guitar part).
|
||||
# Add rest for full duration of section if part is not playing in that specific section.
|
||||
}
|
||||
|
||||
# get file paths and music21 score which can be further manipulated
|
||||
musicxml_path, midi_path, score = score_helper.process_and_output_score(parts_data, score_data)
|
||||
|
||||
# create a file download (NOT Href) to these two file for the user
|
||||
musicxml_path, midi_path
|
|
@ -0,0 +1,4 @@
|
|||
Important!!! If the user asks for Instruction Manual or New features, Print everything in the README file using code interpreter.
|
||||
|
||||
readme_content = open("/mnt/data/README", "r").read()
|
||||
readme_content
|
3
prompts/gpts/knowledge/AI Song Maker/License.txt
Normal file
3
prompts/gpts/knowledge/AI Song Maker/License.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
MUSIC21 - Released under the BSD (3-clause) license. See https://github.com/cuthbertLab/music21
|
||||
Externally provided software (including the MIT licensed Lilypond/MusicXML test Suite) and
|
||||
music encoding in the corpus may have different licenses and/or copyrights.
|
51
prompts/gpts/knowledge/AI Song Maker/README
Normal file
51
prompts/gpts/knowledge/AI Song Maker/README
Normal file
|
@ -0,0 +1,51 @@
|
|||
---Print this out word for word to the user, its Markdown. Don't try reword things its already been worded correctly. There are URLs in this file, please show the full URL as text for the URL
|
||||
|
||||
# 🎵🌟 Welcome to AI Song Maker! 🌟🎵
|
||||
|
||||
Hello, music enthusiasts! 👋 I'm AI Song Maker, your new go-to digital assistant for all things songwriting and music theory. 🎹🎼
|
||||
|
||||
Ever found yourself humming a tune but not sure how to turn it into a full-fledged song? Or perhaps you're a songwriter looking for some creative assistance? That's where I come in! 🚀
|
||||
|
||||
|
||||
## What I Offer:
|
||||
|
||||
- Lyric Generation: Struggling with writer's block? I can help you generate lyrics that resonate with your theme. 📝
|
||||
- Musical Theory Guidance: Need some help with chord progressions or melody lines? I've got you covered with scientifically backed musical theories. 🎶
|
||||
- Custom Composition: From the first note to the last, I assist in creating unique compositions tailored to your style and mood. 🎷
|
||||
- Sheet Music and MIDI Creation: Transform your ideas into sheet music or soundtracks to hear how it sounds, iteratively refine and playback your creations. 📊
|
||||
- Educational Resource: Whether you're a beginner or a pro, I'm here to answer your questions and help deepen your understanding of music. 📚
|
||||
- Images to represent music: I can make you music from images or I can make you an album cover from your music.
|
||||
|
||||
|
||||
## How It Works:
|
||||
|
||||
1. Share your musical ideas in the form of Natural Language or Images.
|
||||
2. I'll provide guidance, create lyrics, suggest chords, and even creation you a MIDI soundtrack and the MusicXML for sheet music.
|
||||
3. Next I can make you an album cover to fit your song creation.
|
||||
4. If you're stuck just say "Inspire Me" for awesome suggestions based of musical theory.
|
||||
5. You can ask me to tweak the melody, for example ask me to add background instruments.
|
||||
|
||||
**Check out our playlist demos on soundcloud:**
|
||||
---Please also provide the user these URLs as raw text the the user
|
||||
- Creating and refining a melody: [https://on.soundcloud.com/H7m3G](https://on.soundcloud.com/H7m3G) - Please read the description of the playlist.
|
||||
- Melodies created with 3-4 prompts: [https://on.soundcloud.com/2Ffyf](https://on.soundcloud.com/2Ffyf)
|
||||
|
||||
You can also find our Soundcloud and playlists by searching for "AI Song Maker Soundcloud" on Google, we hope to see you there!
|
||||
Please use #AISongMaker when posting your creations on social media to help us out :)
|
||||
|
||||
|
||||
**Have some feedback or want some new features?**
|
||||
Send email to the creator by tapping the AI Song Maker button at the top left of your screen and choose Send Feedback.
|
||||
If you run into issues it helps if you can share the chat so I can debug it. Thanks!
|
||||
|
||||
Remember, the process of generating soundtracks can take up to a minute of analysis per instrument, it is recommended adding up to 3 new instruments per question.
|
||||
The soundtracks are created in MIDI format, which require a compatible media player such as Windows Media player or Midiano, which can be accessed in the browser from: https://app.midiano.com/
|
||||
Also, there are online MIDI to MP3 converts if you prefer using using MP3 to MIDI. The MusicXML file produced can be converted to sheet music by using any MusicXML reader.
|
||||
|
||||
|
||||
## Recently added features:
|
||||
- It's now possible to add lyrics and dynamics to sheet music and MIDI files.
|
||||
- Addition of Inspire Me command
|
||||
- Performance improvements and bug fixes
|
||||
|
||||
I'm excited to be part of your musical journey! Whether you're crafting a heartwarming ballad, an upbeat pop song, or exploring new musical frontiers, I'm here to support and inspire. 🎤
|
Loading…
Add table
Add a link
Reference in a new issue