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

Notes missing in piano roll #207

Open
page200 opened this issue Dec 25, 2021 · 2 comments
Open

Notes missing in piano roll #207

page200 opened this issue Dec 25, 2021 · 2 comments

Comments

@page200
Copy link

page200 commented Dec 25, 2021

get_piano_roll doesn't show some of the notes. You can easily find such cases by choosing a low fs value.

Here instead of int(note.start*fs):int(note.end*fs), a different rounding mechanism might solve the problem, preventing the duration from being 0 for example as follows: int(note.start*fs):max(int(note.end*fs),int(note.start*fs)+1)

Thank you and happy holidays!

@craffel
Copy link
Owner

craffel commented Dec 27, 2021

I think this is a matter of convention, i.e. if a note falls entirely within a sampling interval should it be included or not? I would welcome a PR to make this behavior configurable (I think int(floor(...)):int(ceil(...)) would make most sense).

@TimFelixBeyer
Copy link
Contributor

FYI, I tried to fix this in PR #195

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