Mu4 musicxml issue

• Apr 16, 2024 - 17:52

Maybe already fixed, but opening Mu4 mxl file with Mu3.7 renders a messed up score file.(Lyrics mixed up with staves etc.)

Attachment Size
Test_Mu4.mxl 22.25 KB


By the way, looks like Hide empty staves is on by default. Before further analysis, make sure to turn that off after importing (unless desired otherwise):


In reply to by worldwideweary

Well, I guess it comes from this in importmxmlpass2.cpp:

      StringData* t = new StringData;
      QString visible = _e.attributes().value("print-object").toString();
      QString spacing = _e.attributes().value("print-spacing").toString();
      if (visible == "no" ) {
            // EITHER:
            //  1) this indicates an empty staff that is hidden
            //  2) this indicates a cutaway measure. if it is a cutaway measure then print-spacing will be yes
            if (spacing == "yes") {
                  measure->setStaffVisible(staffIdx, false);
            else if (measure && !measure->hasVoices(staffIdx) && measure->isOnlyRests(staffIdx * VOICES)) {
                  // measures with print-object="no" are generally exported by exporters such as dolet when empty staves are hidden.
                  // for this reason, if we see print-object="no" (and no print-spacing), we can assume that this indicates we should set
                  // the hide empty staves style.
                  _score->style().set(Sid::hideEmptyStaves, true);
                  _score->style().set(Sid::dontHideStavesInFirstSystem, false);

I just don't see how/why that mxl takes that code path, it doesn't have "print-object" set at all

Do you still have an unanswered question? Please log in first to post your question.