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

Fix Move one Beat left button #601

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ffio1
Copy link
Contributor

@ffio1 ffio1 commented Dec 15, 2024

Addresses #585 .

Original issue: When moving to the left, the theMove parameter is negative, and would go down the path of removing beats. With this, we would end up removing the beats that had the notes and would not re-add them.

Fix: Adds a hash-map of <time after move, list of notes pre-move> so we can keep track of what notes need to be moved, and add them to the new (post-move) beats.

Addresses helge17#585 .

Original issue: When moving to the left, the `theMove` parameter is negative, and would go down the path of removing beats. With this, we would end up removing the beats that had the notes and would not re-add them.

Fix: Adds a hash-map of <time after move, list of notes pre-move> so we can keep track of what notes need to be moved, and add them to the new (post-move) beats.
@guiv42 guiv42 self-requested a review December 15, 2024 08:35
@guiv42
Copy link
Collaborator

guiv42 commented Dec 15, 2024

I just performed a few tests, it does not solve the issue in all cases, see video

moveLeft.mp4

Copy link
Collaborator

@guiv42 guiv42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my comment in the PR discussion, this does not solve completely the issue

@ffio1
Copy link
Contributor Author

ffio1 commented Dec 15, 2024

I just performed a few tests, it does not solve the issue in all cases, see video

Thanks for catching that! I was blindly copying the notes from the deleted beat's voices to the new beat voices. This didn't take the new voice's duration into consideration. Since the duration wasn't taken into account, any note that has a longer duration than was already on the beat would get discarded. It also had the side effect of other beat metadata being removed (chord, text event, etc.). I will try to address this.

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

Successfully merging this pull request may close these issues.

2 participants