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: add support for numerals #24174

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

Conversation

rettinghaus
Copy link
Contributor

@rettinghaus rettinghaus commented Aug 23, 2024

This PR adds support for Nashville number system in MusicXML import and export and adds basic support for Roman numerals.

Relates to #19508.

@rettinghaus rettinghaus changed the title MusicXML: add support for numerals + MusicXML: add support for numerals Aug 23, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 24, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 24, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 24, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 24, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 24, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 24, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 24, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 26, 2024
Copy link
Contributor

@miiizen miiizen left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I've left a couple of requests to do with roman numerals.

String numeralRoot = m_e.readText();
String numeralRootText = m_e.attribute("text");
// TODO analyze text and import as roman numerals
ha->setHarmonyType(HarmonyType::NASHVILLE);
Copy link
Contributor

Choose a reason for hiding this comment

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

We appear to have just switched the problem around - previously nashville numbers were imported as roman numerals, now roman numerals are imported as nashville numbers. It would be great if we could recognise numerals here, as we've lost export/import consistency for numerals with this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is not entirely true, because the numeral element has been ignored until here, the old behavior for function hasn't changed. But I will add a basic check for Roman numerals in the text attribute.

m_xml.tag("numeral-root", { { "text", textName } }, "1");
m_xml.endElement();
// only check for major or minor
m_xml.tag("kind", textName.at(0).isUpper() ? "major" : "minor");
Copy link
Contributor

Choose a reason for hiding this comment

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

You could modify the code you've written below to read inversions to write them here.

Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants