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

Rework grace beat positioning #335

Closed
Danielku15 opened this issue Feb 15, 2020 · 1 comment
Closed

Rework grace beat positioning #335

Danielku15 opened this issue Feb 15, 2020 · 1 comment
Assignees
Labels
area-rendering Everything related to the rendering state-accepted This is a valid topic to work on. type-improvement 🚀

Comments

@Danielku15
Copy link
Member

Description

This issue is a follow up of #227

Today alphaTab attempts to position grace beats according to the time they are played. Due to various timing constraints not the actual beat duration is considered for this positioning, but 1/4 of the previous beat duration is used. If we use the actual beat time, it can happen that the gracebeat is positioned on top of the previous one:

Problem with grace beat stealing full duration of previous beat 👎

Only stealing 1/4 of the previous beat per grace note 👍

This 1/4 rule bypasses the issue of the screenshot above but it is not really correct in respect of the actual timing. This can be seen well when we have multiple grace notes and combinations. The positioning does not really make sense.

So the overall grace note positioning system is not really doing well and should be reworked.

Possible Solutions

GuitarPro solves this issue simply by not positioning the beats in respect to their playback time. They simply stick right before the next note being played.

Default

Manually scaled

@Danielku15 Danielku15 added type-improvement 🚀 area-rendering Everything related to the rendering state-accepted This is a valid topic to work on. priority-medium labels Feb 15, 2020
@Danielku15 Danielku15 added this to the 1.x milestone Feb 15, 2020
@Danielku15 Danielku15 self-assigned this Feb 15, 2020
@Danielku15 Danielku15 removed this from the 1.x milestone May 7, 2020
@Danielku15 Danielku15 added this to the 1.2 milestone Jul 21, 2020
@Danielku15
Copy link
Member Author

Grace beats are not sticking to their next non-grace beat if possible. For incomplete graces we just put them after the last proper beat. This rework also improved some timing related positioning when it comes to grace notes. Some combinations are now more compact, others need a bit more space.
Comparison:
image
image

This was referenced Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-rendering Everything related to the rendering state-accepted This is a valid topic to work on. type-improvement 🚀
Projects
None yet
Development

No branches or pull requests

1 participant