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
Impossible to select any notes on C-1 #201
Comments
It looks like Signal's code uses a half-open interval to describe the range of selected notes:
In order for the selection to include the minimum pitch 0 (C-1), the to note number needs to be -1. However, various parts of the code are clamping values to a minimum of zero. In particular, in the file
Here is the potential fix I came up with:
- Math.max(0, Math.max(fromNoteNumber, toNoteNumber)),
+ Math.max(fromNoteNumber, toNoteNumber) ,
- Math.max(0, Math.min(fromNoteNumber, toNoteNumber)),
+ Math.min(fromNoteNumber, toNoteNumber) ,
- const selection
+ let selection - pianoRollStore.selection = clampSelection(selection)
+ ++selection.to.noteNumber;
+ selection = clampSelection(selection);
+ --selection.to.noteNumber;
+ pianoRollStore.selection = selection; I will submit a pull request. |
Fix #201 - Allow selection rectangle to reach minimum note c-1
Describe the bug
It is impossible to select any notes on C-1 for some reason
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The notes should select normally and would be able to copy, paste, etc.
Screenshots
(mouse not visible, but it is under the selected area I promise)
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
it is also impossible to put selected notes into C-1 without using arrow keys -
(same here, still not visible but it is under the selected area)
The text was updated successfully, but these errors were encountered: