-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Update instruments.xml to add families and improve sorting #8431
Update instruments.xml to add families and improve sorting #8431
Conversation
to_subelement(el, instrument, 'trackName') | ||
to_subelement(el, instrument, 'longName') | ||
to_subelement(el, instrument, 'shortName') | ||
to_subelement(el, instrument, 'init') | ||
# if instrument["ddName"] != '[hide]': | ||
# to_subelement(el, instrument, 'trackName') | ||
# to_subelement(el, instrument, 'longName') | ||
# to_subelement(el, instrument, 'shortName') | ||
# if instrument["ddName"]: | ||
# dd_el = ET.SubElement(el, 'dropdownName') | ||
# dd_el.text = instrument["ddName"] | ||
# to_attribute(dd_el, instrument, 'ddMeaning', 'meaning') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RomanPudashkin, once this is merged, you can uncomment these 8 lines and delete the 3 lines immediately above (that set trackName
, longName
and shortName
before the if
statement), then rerun the script to generate the new style of instruments.xml that you will need to fix the dropdown in the New Score Wizard. It will fetch some new data from the online spreadsheet as well as adding the <dropdownName>
element.
@RomanPudashkin Score Ordering uses the order of instruments in |
@njvdberg, the new ordering system has been devised by myself and @oktophonie. We know that changing the order of instruments in New scores vs. old scoresWe want new scores created in MuseScore 4 to use our new ordering, but we want old scores created in MuseScore 3 to display in MuseScore 4 just as they did in MuseScore 3. When you open an old file the ordering should be unchanged, but if you try to add or remove instruments then things could start to move around. Possible solutions are:
Algorithmic sortingIf all else fails then we may consider reverting to the previous ordering of We don't think our algorithm has changed the relative order of any popular combinations of instruments, except perhaps for the unpitched percussion instruments (which have no "correct" ordering anyway). If people have used some of the more exotic instruments then they may find they are ordered differently to before, but the ordering for the vast majority of scores should not have changed. |
I had a quick check on the differences between the old and new Also, in MU4 score ordering I made a small change compared to MU3. When opening the instruments form the existing order of the instruments is checked against the specified score order. If it doesn't match, the score order is change to |
5784948
to
11e1fbb
Compare
@njvdberg, please take a look at my changes to instrtemplate.cpp and instrument.cpp and let me know what you think. |
7e256d5
to
b83a98a
Compare
Run share/instruments/update_instruments_xml.py to fetch the latest version of the online spreadsheet. In this version, every instrument has been assigned a family. Also, instruments are now sorted based on their group, family and minimum professional pitch, among other things. This ensures they appear roughly in score order according to standard orchestral layout. Finally, descriptions have been improved and a few small fixed made to fix incorrect or missing data. In addition, some compatibility code was changed to improve instrument recognition in older MSCX score files that lack the appropriate MuseScore or MusicXML instrument IDs. The old code returned the *first* instrument that matched a given criteria (e.g. same trackName), whereas the new code returns the instrument that gives the *best* match according to multiple criteria. This means the return value is less dependent on the order in which instruments are defined within instruments.xml.
b83a98a
to
28fa244
Compare
Run share/instruments/update_instruments_xml.py to fetch the latest version of the online spreadsheet. In this version, every instrument has been assigned a family. Also, instruments are now sorted based on their group, family and minimum professional pitch, among other things. This ensures they appear roughly in score order according to standard orchestral layout. Finally, descriptions have been improved and a few small fixed made to fix incorrect or missing data.
In addition, some compatibility code was changed to improve instrument recognition in older MSCX score files that lack the appropriate MuseScore or MusicXML instrument IDs. The old code returned the first instrument that matched a given criteria (e.g. same trackName), whereas the new code returns the instrument that gives the best match according to multiple criteria. This means the return value is less dependent on the order in which instruments are defined within instruments.xml.