Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Multi System Slurs #2261

@Danielku15

Description

@Danielku15

Ties and Slurs currently have limitations when it comes to system-breaks.

Background

alphaTab creates one slur/tie at the start note, and one at the end note. if there is a system break (aka line break) the start slur/tie is drawn until the end of the bar and the end slur/tie is drawn from the start of the bar.

This is because it assumes the bar is exactly at the line break and comes historically from the fact that we only had "ties" (e.g. on tied notes, hammer-on, slides etc). But it is a problem for slurs as they can span larger ranges.

Desired behavior

alphaTab should be able to handle multi-line slurs. Here an example how MuseScore handles it:

Image
  • It adds one slur per system.
  • The start and end y-coordinate is the one from the start note for all slurs until the system of the end note.
  • The start y-coordinate on the system of the end note is also the one from the start note.
  • The end y-coordinate on the system of the end note is the one from the end-note.

implementation details (idea)

alphaTab currently has no mechanism to remember across systems that some additional glyphs have to be engraved. We first need to add a container on a global level (layout/score renderer?) where we can store such information.

Then, when we create a slur we register it there. When we reach the end-note of a slur, this registration is cleared.

If a system is started, and there are incomplete slurs from the previous system, we add it to this new system.

It is important that these slurs are added in a way that the right overflow on top/bottom is registered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-renderingEverything related to the renderingplatform-allAffects all platformsstate-acceptedThis is a valid topic to work on.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions