[MusicXML] improve export of tablature#33903
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe MusicXML export logic in 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 2208-2209: The current condition in the timesig visibility check
at line 2208-2209 applies staff 0's visibility to all staffs when merging
signatures into a single unnumbered export, which causes incorrect visibility
for mixed standard+tab parts with different visibility settings. Modify the
logic to detect when staff print visibility or genTimesig() settings differ
across staffs and force per-staff numbered exports in those cases instead of
merging them. This should also apply to the C-major fallback key signature
export path to ensure consistency across all signature export paths when staff
0's tab visibility does not represent all staves.
- Line 2448: The condition checking ks->staff()->isTabStaff() on line 2448 uses
a hardcoded tick value of Fraction(0, 1) instead of the key signature's actual
tick position, causing key signatures after staff-type changes to inherit
incorrect visibility. Replace the hardcoded Fraction(0, 1) argument with
ks->tick() to use the key signature's own tick when determining tab staff
visibility, consistent with how time signature, rest, and clef checks handle
staff-type visibility.
🪄 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: 7d496064-5a3d-4547-876f-9e8d02cacb36
📒 Files selected for processing (14)
src/importexport/musicxml/internal/export/exportmusicxml.cppsrc/importexport/musicxml/tests/data/testGuitarBends_ref.xmlsrc/importexport/musicxml/tests/data/testHarmony7_ref.xmlsrc/importexport/musicxml/tests/data/testNegativeOctave_ref.xmlsrc/importexport/musicxml/tests/data/testStringData.xmlsrc/importexport/musicxml/tests/data/testTablature1.xmlsrc/importexport/musicxml/tests/data/testTablature2.xmlsrc/importexport/musicxml/tests/data/testTablature3.xmlsrc/importexport/musicxml/tests/data/testTablature4.xmlsrc/importexport/musicxml/tests/data/testTablature5.xmlsrc/importexport/musicxml/tests/data/testTablature5_ref.xmlsrc/importexport/musicxml/tests/data/testTabs.mscxsrc/importexport/musicxml/tests/data/testTabs_ref.xmlsrc/importexport/musicxml/tests/musicxml_tests.cpp
This PR makes sure that for tablature invisble notations, like all key signatures always, in some cases times signatures, rests, etc., are correctly marked with
print-object="no".