Fix get_piano_roll pedal implementation #195
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not entirely sure whether I precisely understand the desired output of get_piano_roll.
However, after comparing it with https://github.com/magenta/note-seq/tree/master and the piano-roll from there I think there are two small issues with it:
One is an off-by-one error and the other happens when a note offset happens just before/after the pedal is pressed down:
Due to rounding, the pedal might be pressed after the note offset has already occurred.
For example, both offset a and offset b round to t0, and would be held:
Again I'm not sure whether the spec of get_piano_roll is different from other piano rolls.
I think regardless of that, the pedal issue should be addressed.