MusicXML: Hidden chord symbols not included in MusicXML export

• Jan 6, 2024 - 17:34

Via MusicXML I exported a MuseScore 4 document that contained hidden chords symbols. On re-importing to MuseScore 4 (or on importing to MuseScore 3) all hidden chords symbols are missing.

Is this to be expected?

Is there no option in MusicXML to designate chord symbols as hidden? If not:

a) how about posting an alert that reports items that MuseScore can't parse into MusicXML. (I think this is appropriate anytime can't export an object or property to MusicXML. Give the scorist a hit list of what will be missing.)

b) far better, MuseScore could offer a fallback option of exporting visible chord symbols.

scorster


Comments

Hmm, I just found this:

/**
 Whether a tag corresponding to the given element \p e
 should be included to the exported MusicXML file.
 */
 
bool ExportMusicXml::canWrite(const EngravingItem* e)
{
    return e->visible() || configuration()->musicxmlExportInvisibleElements();
}

so there seems to be a setting for exporting invisible elements, I don't find a corresponding setting in any dialog though, maybe it has been forgotten? Should ptobably be a tick box in the export MusicXML dialog

In reply to by Jojo-Schmitz

Very simple fix (probably over-simplified, but at least on par with Mu3):

$ git diff
diff --git a/src/importexport/musicxml/internal/musicxmlconfiguration.cpp b/src/importexport/musicxml/internal/musicxmlconfiguration.cpp
index 374a0bcced..ed8880f92b 100644
--- a/src/importexport/musicxml/internal/musicxmlconfiguration.cpp
+++ b/src/importexport/musicxml/internal/musicxmlconfiguration.cpp
@@ -42,7 +42,7 @@ void MusicXmlConfiguration::init()
     settings()->setDefaultValue(MUSICXML_IMPORT_LAYOUT_KEY, Val(true));
     settings()->setDefaultValue(MUSICXML_EXPORT_LAYOUT_KEY, Val(true));
     settings()->setDefaultValue(MUSICXML_EXPORT_BREAKS_TYPE_KEY, Val(MusicxmlExportBreaksType::All));
-    settings()->setDefaultValue(MUSICXML_EXPORT_INVISIBLE_ELEMENTS_KEY, Val(false));
+    settings()->setDefaultValue(MUSICXML_EXPORT_INVISIBLE_ELEMENTS_KEY, Val(true));
     settings()->setDefaultValue(MIGRATION_APPLY_EDWIN_FOR_XML, Val(false));
     settings()->setDefaultValue(MIGRATION_NOT_ASK_AGAIN_KEY, Val(false));
 }

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