Skip to content

[MusicXML] Do not export accidentals on tablature#34257

Open
rettinghaus wants to merge 2 commits into
musescore:mainfrom
rettinghaus:xml/tab
Open

[MusicXML] Do not export accidentals on tablature#34257
rettinghaus wants to merge 2 commits into
musescore:mainfrom
rettinghaus:xml/tab

Conversation

@rettinghaus

@rettinghaus rettinghaus commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

As tablatures do not show accidentals, they should not be exported, as seen e.g. on https://www.w3.org/2021/06/musicxml40/tutorial/tablature/.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

MusicXML chord export now checks whether a note has an associated staff and suppresses <accidental> output for tablature staves. The tapping MusicXML test data was updated by removing four explicit sharp and flat accidental elements from TAB notes whose pitch alterations remain represented by <alter>.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is too sparse and misses the required issue reference, motivation detail, and checklist template sections. Add a Resolves line, a short motivation summary, and complete the required checklist items from the template.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: suppressing MusicXML accidental export on tablature staves.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/muse_framework.git.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/importexport/musicxml/internal/export/exportmusicxml.cpp`:
- Around line 4442-4444: Update the isTabStaff() call in the accidental-writing
condition around note->staff() to use the note’s actual tick instead of
Fraction(0, 1), matching nearby time-dependent staff-type checks and preventing
accidentals on notes after a tablature change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 92ef4a6d-d40c-4d40-a48f-bc6c96a7db15

📥 Commits

Reviewing files that changed from the base of the PR and between d307a2b and 89b6e4e.

📒 Files selected for processing (2)
  • src/importexport/musicxml/internal/export/exportmusicxml.cpp
  • src/importexport/musicxml/tests/data/testTapping.xml
💤 Files with no reviewable changes (1)
  • src/importexport/musicxml/tests/data/testTapping.xml

Comment thread src/importexport/musicxml/internal/export/exportmusicxml.cpp
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 19, 2026
Backport of musescore#34257

Co-Authored-By: Klaus Rettinghaus <rettinghaus@users.noreply.github.com>
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.

2 participants