-
Notifications
You must be signed in to change notification settings - Fork 442
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 locate Melody Piece index? (melody_stream = midi_data[5]) #17
Comments
Facing the same issue. Did you find the solution @srianbury ? |
@hasagar97 Yes I found a solution, kind of. The 5, and many of the other parts are hard-coded specifically for this song. If you run this program with a debugger you can see that the information at the 5th index of midi_data is different than the rest, I think, and it's an object of type instrument or something, if I remember correctly. I was using mp3s and found a converter to MIDI and the melody was always placed at midi_data[0] so I was able hard code that and know it would work for anything because of the converter. I don't know if there's a method to write to detect melody, but making sure you put it in the same place every time helped me |
You can import the midi file into a scorewriter like MuseScore. Then read the score or even playback to confirm that Pat's part, which is named "Cavaquinho, Guitar", is the 6th part. (Hence index=5) |
I've been trying to use my own midi files, and figured out pretty quickly that since they only consist of one part, that the index here needed to be 0. However, once I do that, a number of other errors pop that also have to do with the fact that i'm not using the piece that this program was hard-coded for. Has anyone here figured out a way around this? |
I've been trying to run this program but I've run into an error. On line 24 of preprocess.py (
deepjazz/preprocess.py
Line 24 in b0aa6ca
The text was updated successfully, but these errors were encountered: