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

Combining midi files #4

Open
aihobbyist opened this issue Oct 4, 2018 · 2 comments
Open

Combining midi files #4

aihobbyist opened this issue Oct 4, 2018 · 2 comments

Comments

@aihobbyist
Copy link

Per Testfile.py I've been able to convert a midi file into multiple numpy arrays of shape (64, 84, 1) which I can then run a trained model on. This will return a midi file (cycle, transfer) for each individual numpy array, which will of course only be a few seconds in length each. Is there code for combining midi files? I assume this must have been done for the examples given where full songs are converted.

@sumuzhao
Copy link
Owner

sumuzhao commented Oct 5, 2018

Hey, it is easy. You can just concatenate the numpy arrays together and then call the function save_midis. Basically, the individual numpy array is a phrase which is composed of 4 bars. Take a look at save_midis in utils.py and functions in write_midi.py.

@esemeniuc
Copy link

@aihobbyist can you please post how you converted the file?

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