Skip to content

Feature/issue 2630v2#2643

Closed
AndreiGorelov wants to merge 3 commits intoCoderLine:developfrom
AndreiGorelov:feature/issue-2630v2
Closed

Feature/issue 2630v2#2643
AndreiGorelov wants to merge 3 commits intoCoderLine:developfrom
AndreiGorelov:feature/issue-2630v2

Conversation

@AndreiGorelov
Copy link
Copy Markdown

Issues

Fixes #2630

Proposed changes

This PR fixes incorrect rendering of tuplet labels when importing MusicXML files.
Root cause: MusicXmlImporter parsed for note duration correctly, but completely ignored the element inside. As a result, the show-number and bracket attributes were never read, and LineBarRenderer had no way to distinguish between tuplets that should display a label and those that should not.

  • Added TupletShowNumber enum (Actual/Both/None ) representing the three states of the MusicXML show-number attribute
  • Added showTupletNumber: TupletShowNumber and showTupletBracket: boolean fields to Beat, both defaulting to safe backward-compatible values
  • Updated MusicXmlImporter._parseNotations() and added MusicXmlImporter._parseTupletVisibility to read and store show-number and bracket on the corresponding beat
  • Replaced the hardcoded num:den lookup table in LineBarRenderer._paintTupletHelper with an algorithmic natural-denominator rule.

Example fixed cases:

  • 6:9 (nested duplet in compound time) now correctly shows 6 instead of 6:9
  • Compound nested ratios like 12:27 with show-number="none" bracket="no" are now fully suppressed instead of rendering a phantom 12:27 label

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • New tests were added

Some reference images for current tests need to be updated.

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

@Danielku15
Copy link
Copy Markdown
Member

Fixed as part of #2650

@Danielku15 Danielku15 closed this Apr 9, 2026
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.

Android: some MusicXML files fail to fully render and cursor becomes unusable (works on Web)

2 participants