-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use my own midi data as input? #1
Comments
Hi dianxin556, You may consult this README (from my colleague's repo) for the conversion of MIDI files into REMI event format: The Please note that you don't need to run the last two scripts in Step 5. |
Hi,
Thanks a lot for your patient reply, I will try it~ |
Could you provide the sample script for generating the pkl? |
Hi, I'm also trying to use my own audio file as input. I converted the audio into REMI and tried to feed it into generate.py, but it turns out that the vocabulary of the converted REMI data was not consistent with the one that the pretrained model uses. When I ran generate.py, the following exception occurred (likely due to mismatched vocabulary size):
|
Thanks to @slSeanWU's help, I finally found a solution. (In the case that the original data is in mp3) In the folder compound-word-transformer/dataset/
In the folder MuseMorphose/
from utils import *
import glob
for orig_file in glob.glob("./ailab17k_from-scratch_remi/events/*.pkl"):
out_file = orig_file.replace('/events/','/')
events = pickle_load(orig_file)
for event in events:
if event["name"] == "Note_Velocity":
event["value"] = min(max(40,event["value"]),80)
bar_idx = []
for idx, event in enumerate(events):
if event["name"] == "Bar":
bar_idx.append(idx)
result = (bar_idx,events)
pickle_dump(result,out_file)
data_dir = 'ailab17k_from-scratch_remi'
polyph_out_dir = 'ailab17k_from-scratch_remi/attr_cls/polyph'
rhythm_out_dir = 'ailab17k_from-scratch_remi/attr_cls/rhythm'
data_dir: ./ailab17k_from-scratch_remi
|
Hello, do you know how to train the model with your own data? Remi in folder pickles_ vocab.pkl、train_ pieces.pkl、test_ pieces.pkl、val_ How to get pieces.pkl |
Hello, do you know how to train the model with your own data? How to get remi_ vocab.pkl、train_ pieces.pkl、test_ pieces.pkl、val_pieces.pkl in folder pickles? Thanks! |
Hi!What is Remi_ vocab.pkl、train_ pieces.pkl、test_ pieces.pkl、val_ pieces.pkl in folder pickles? How to get them? Thanks |
Sinece the data format is pkl,and how to generate the pkl from midi?Thanks~
The text was updated successfully, but these errors were encountered: