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

MIDI files end up their last note pushed up a position #27

Open
gstranger opened this issue Apr 27, 2021 · 6 comments
Open

MIDI files end up their last note pushed up a position #27

gstranger opened this issue Apr 27, 2021 · 6 comments

Comments

@gstranger
Copy link

Hello, thank you for publishing this repo. I noticed theres a bug that occurs at the end of a MIDI file when encoding to REMI.
The very last note, or multiple notes that occur after a certain position in the last bar will be "pushed up" a position making them off rhythmically. I'm not sure how to fix this. I assume there must be an issue in the item2event function but I'm not very experienced with numpy.

@gstranger
Copy link
Author

Archive 2.zip
ZIP example MIDI file, and then final result that has occurrence of bug.

@huangqing6
Copy link

Hello, I have a question for you.I use the program provided by the author, but the item2event does not work. I would like to ask you how to run the code ?I hope you can inform me, I would be grateful.

@huangqing6
Copy link

When I run the conversion code, the computer comes up with a question(FileNotFoundError: [Errno 2] No such file or directory: '.\pop data').I want to know how to solve.

@gstranger
Copy link
Author

the item2event method doesn't take a file, you should call read_items instead.

@huangqing6
Copy link

Sorry,I do not understand read_items .But midi2remi.ipynb is not run. I want to know how you run.

@gstranger
Copy link
Author

gstranger commented Apr 29, 2021

I found the issue, it looks like the quantize_items method is pushing the last notes up a couple position. I'll see if I can come up with a fix and submit a PR @remyhuang

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

2 participants