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

Two Repeat sections with alternate endings causes the second one to skip its main part #1046

Closed
1 task done
jonaro00 opened this issue Nov 20, 2022 · 2 comments · Fixed by #1054
Closed
1 task done
Assignees
Labels
area-player Related to the audio playback engine. platform-all Affects all platforms state-accepted This is a valid topic to work on. type-bug 🕷️

Comments

@jonaro00
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

image

In the piece above, the first bars play in the correct order: 1, 2, 1, 3.
But after that, the player jumps to bar 5 (skipping the first play of bar 4), to then continues to correctly play 4, 6, 4, 6, 4, 6, 7...

Happens in both 1.2.3 and on develop branch.
Unsure if this issue is AlphaTex specific or global...

Expected Behavior

Bar 4 should not be skipped in the first repeat lap.

Steps To Reproduce

\tempo 175
.
\ro :1 r | \ae 1 r | \ae 2 \rc 2 r | \ro r | \ae 1 r | \ae (2 3 4) \rc 4 r | 

Link to jsFiddle, CodePen, Project

No response

Found in Version

1.2

Platform

Web

Environment

- **OS**: Windows 10
- **Browser**: Latest Brave (Chromium)

Anything else?

This surprised me a lot. I wrote a piece in AlphaTex using many alternate endings while AE had been implemented but not yet released. At that time it worked as expected. When I played the piece again today I noticed this bug.

@jonaro00 jonaro00 added the state-needs-triage Bug not triaged yet. label Nov 20, 2022
@jonaro00
Copy link
Contributor Author

Also noticed: Shouldn't there be another repeat ending symbol in bar 2 and 5? Like in this example https://www.alphatab.net/docs/showcase/general#alternate-endings

@Danielku15 Danielku15 added type-bug 🕷️ state-accepted This is a valid topic to work on. area-player Related to the audio playback engine. platform-all Affects all platforms and removed state-needs-triage Bug not triaged yet. labels Nov 26, 2022
@Danielku15
Copy link
Member

In the 1.2.3 release I merged some bigger change related to repeats. I redeveloped completely the component handling the repeats. The old ones had some bigger flaws so I started over.

Regarding the symbols it depends on how you write the notation, in this case it does not make a big difference because there are no additional bars after bar 6. But theoretically you could have a combination like this:
image

There with not having a repeat ending in bar 5, you can still have bars afterwards. With having a repeat end symbol at bar 5 you would directly jump back to bar 4 without this possibility. In cases like this it might be a readability thing and one might put also a repeat end on bar 5. Otherwise you need to "scan" with your eye where the next ending is to know what you need to play.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-player Related to the audio playback engine. platform-all Affects all platforms state-accepted This is a valid topic to work on. type-bug 🕷️
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants