Skip to content

fix(musicxml gp-exporter): optimized handling of more than 4 voices - #2831

Merged
Danielku15 merged 5 commits into
developfrom
feature/musicxml-voices
Aug 9, 2026
Merged

fix(musicxml gp-exporter): optimized handling of more than 4 voices#2831
Danielku15 merged 5 commits into
developfrom
feature/musicxml-voices

Conversation

@Danielku15

Copy link
Copy Markdown
Member

Issues

Fixes #2828

Proposed changes

Having more than 4 distinctive voices causes crashes in Guitar Pro. This PR updates two parts to optimize things:

  • The exporter drops now voices if there are more than 4 filled ones. That should rarely be the case after the second fix but its a safety measure printing warnings.
  • The MusicXML importer has now an optimized mechanism to assign the MusicXML voices to available voice slots. This brings quite significnat improvement for files where voices are introduced at various cases (additional staves also has new voices with high indices, individual notes are placed on new voices at some individual bars).

Most apps have rarely more than 4 voices and I also don't think many write more than four voices in a single track/staff.

Checklist

  • I consent that this change becomes part of alphaTab under its current or any future open source license
  • This PR is linked to an accepted issue (see above)
  • Changes are implemented
  • New tests were added
  • I have read AGENTS.md if an AI helped draft any part of this PR

AI authorship disclosure

  • No AI agent authored any part of this PR (description, code, tests, or commit messages)
  • An AI agent contributed to this PR. The AI-authored disclosure block
    (alphatab-ai-authored-v1) is present at the top of this body, and I have
    personally reviewed every change and can explain each one

Further details

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

@Danielku15 Danielku15 self-assigned this Aug 9, 2026
@Danielku15
Danielku15 merged commit a61804a into develop Aug 9, 2026
5 checks passed
@Danielku15
Danielku15 deleted the feature/musicxml-voices branch August 9, 2026 15:47
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.

Guitar Pro exporter writes more than 4 voices causing crashes

1 participant