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

Smarter fill #7565

Closed
wants to merge 1 commit into from
Closed

Smarter fill #7565

wants to merge 1 commit into from

Conversation

allejok96
Copy link
Contributor

Hey guys 🐱

I wanted to keep this PR simple, because I don't want this to end like the last time...
But the PR turned out quite big somehow, so sorry if it's a lot to review.
If you can, just give it a test ride.


Don't fill notes that overlap slightly

Fill removes gaps between notes by extending their endpoints to the next note. But currently if it overlaps the next note, it will be extended until yet another note starts. In this example the last bar should not be filled:

bild

Here's the logic I implemented.

bild

If you don't agree on the percentage, keep in mind that the current code fills if it overlaps more than 0%.

Fill selected notes independently

Imagine you wanted to extend the chords below. Before you couldn't, because they would interfere with the melody. Now you can by pressing Fill twice.

Skarminspelning.2024-10-26.22-09-35.mp4

The popup is only shown if filling a second time would have effect.

Cut overlaps of selected notes

Since I had to redo the Cut overlaps code for this PR, I decided to implement the same feature there. The first cut will be with respect to the selected notes only, the second cut the notes more so they don't overlap any other note (this is the default behavior right now).

- Fill and cut overlaps can be applied twice for further effect
- Fill does no longer extend notes that overlap a little
@allejok96
Copy link
Contributor Author

I'm breaking this PR into smaller chunks for easier review, starting with #7569

@allejok96 allejok96 closed this Nov 2, 2024
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.

1 participant