Skip to content
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

make midi file from wav fomat #4

Closed
v-tuenv opened this issue Nov 18, 2021 · 3 comments
Closed

make midi file from wav fomat #4

v-tuenv opened this issue Nov 18, 2021 · 3 comments

Comments

@v-tuenv
Copy link

v-tuenv commented Nov 18, 2021

Pls I can't find the way make midi fomat file from wav.
I have researched from CP repo but your format is 'bar-position-pitch' different from CP-format.

@wazenmai
Copy link
Owner

Hi, @NgvTue
We only use midi format file as our data, so we didn't support converting 'wav' to 'midi'.
If you want to convert your wav file to original CP representation, maybe you could find the information in https://github.com/YatingMusic/compound-word-transformer/blob/main/dataset/Dataset.md.

If you want to convert 'midi' to our cp-representation format, you could also find the information in https://github.com/wazenmai/MIDI-BERT/tree/main/prepare_data/CP.

Hope these information helps!

@sophia1488
Copy link
Collaborator

sophia1488 commented Nov 19, 2021

Hi, I've tested the conversion from 'wav' to 'midi' at Onsets and Frames Transcription, and it works (though not 100% precise).

Like wazenmai said, after you have your midi file, you shall be able to do the conversion and get our simplified CP format data.
https://github.com/wazenmai/MIDI-BERT/blob/main/prepare_data/CP/main.py#L17
I just modified the code, you may run the command as below,
python main.py --input_dir={your input directory}
And you shall find your data at ../../data/CP/{your input directory name}.npy

Sorry for the inconvenience.
If I have time, I will make the code neater and more user-friendly for custom dataset.

Cheers!

@v-tuenv
Copy link
Author

v-tuenv commented Nov 20, 2021

Thank for quickly repiled, I will test Onsets and Frames Transcription as soon as.
Once again tks @sophia1488 and @wazenmai.

@v-tuenv v-tuenv closed this as completed Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants