Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MusicXML] invisible notations #27422

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

rettinghaus
Copy link
Contributor

This adds proper import and export for invisible notations from MusicXML.

NB: I think the original intention of exportInvisibleElements was to allow exporting invisible elements that can not be marked as invisible in MusicXML. However the current solution showed weird inconsitencies when making all elements in a measure invisible. With this approach invisble notations are correctly exported and imported.

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 28, 2025
@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Mar 28, 2025

Seems canWrite() can get eliminated from exportmusicxml.cpp entirely.

@rettinghaus
Copy link
Contributor Author

No, still needed, because it is generally impossible to mark directions as invisible.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Mar 28, 2025

Hmm, where on export is the actual hiding done? Removing the calls to canWrite() took that away as far as I can tell, and I seen nothing that does this now instead

@rettinghaus
Copy link
Contributor Author

It is done here and was there all the time:

void Notations::tag(XmlWriter& xml, const EngravingItem* e)
{
if (m_notationsPrinted && m_prevElementVisible != e->visible()) {
etag(xml);
}
if (!m_notationsPrinted) {
if (e->visible()) {
xml.startElement("notations");
} else {
xml.startElement("notations", { { "print-object", "no" } });
}
}
m_notationsPrinted = true;
m_prevElementVisible = e->visible();
}

@Jojo-Schmitz
Copy link
Contributor

Ah, I see. Missing in 3.x...

Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 28, 2025
@miiizen miiizen self-assigned this Apr 1, 2025
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants