[import xml] articulations don't play back

• Sep 26, 2017 - 21:53
Reported version
S4 - Minor

There is an issue of importing xml files into musescore. The articulations don't play back correctly. Dynamics play back correctly, but not articulations, staccato,etc. It even happens when importing from a saved musescore file that is xml. There is a work around. One has to copy and paste the piece into a new document. Then the articulations and all play correctly.
Attached are a couple of files.


The behavior occurs also, when you import XML files, that MuseScore previously exported itself.
It doesn't matter if the XML comes from other software.

Those affected: Duration-base articulations: (Staccato, Tenuto, Portato, Accent (sforzato), Marcato, Staccassiomo... )

a test file is attached.

another behaviors is after export / import xml:

  • line prall: changed to down prall.
  • all (changed) staff text positions are shifted. (positions not exported)
  • text colors are gone. (not exported)
  • multi line text: only first line of text is bold (or italic, underlined). others are regular.

(If they are not affected by the same bug,) perhaps, each item in the list can be a separate issue; I don't know.

Attachment Size
Articulations_and_Ornaments.mscz 10.94 KB

Without further investigation, I would assume that when creating an instrument on MusicXML import, we don't attach "articulations" to the instrument.

Indeed, amateur and professional range as well as all articulations definitions are missing after the xml import.
Workaround: There is no need to copy/paste into a new score to fix this, just "change" instrument (to the same one, here Bb Clarinet)

There are some more differences though, some extra text styles and clefs and some more, run a diff on the attached files

Attachment Size
copy+paste.mscx 21.61 KB
import-xml.mscx 25.47 KB
Sep 27, 2017 - 12:02

The work around to change instrument with staff properties works. Thanks.
Best to all,
Hadley :)

Indeed, the issue can be solved by creating instruments from the templates in instruments.xml if the instrument-sound element in the MusicXML file matches the MusicXMLid. This works because in that case the instrument-specific articulations are set based on the instruments.xml information.

Note that (at least in my sample set), most MusicXML files do NOT contain instrument-sound elements, so in most cases this is not a solution.

Suggested (full) solution: if present, try to use instrument-sound to create the instrument based on instruments.xml. If instrument-sound is not present or cannot be found, use the global articulations as defaults.

Yes, sounds like an excellent plan to me. Most instruments don't have their own set of articulations settings anyway and as such use the global settings. And those are much better than ignoring articulations altogether.
Furthermore, if the program doing the export does not include that instrument-sound information, it is that program's fault.

Status (old) active patch (code needs review)
Status active  

Fixed in pull request #3345. Would appreciate code review and testing, as this turned out to be a little bit more complicated than expected and I may have missed corner cases. The normal MusicXML iotest still passes, of course.

Status (old) patch (code needs review) fixed
Status fixed

Fixed in branch master, commit a9f02622dd

255066 musicxml articulations dont play back (#3345)

fix #255066 - MusicMXL import articulations don't play back

Status (old) fixed active
Status fixed active

I merged it in master. It's not straightforward to merge in 2.2 but it's possible to solve the conflict.
Tests are welcome before I do that !
I did test with a piano score. It works well.

Status (old) active fixed
Status active fixed

Fixed in branch 2.2, commit a02dbcb6e2

255066 musicxml articulations dont play back (#3345)

fix #255066 - MusicMXL import articulations don't play back

In reply to by lasconic

I want to test, but No windows 2.2 nightlies here.

Edit: OK, I used the current nightly version for testing. (2.2 nightly = 4caf6e7.)

Articulations are working.

Title (vertical) frame size is changed: 10sp to 8.17sp.
Tempo text's size is changed: 12pt to 10pt

Ugly: (No change) :D
Line-prall is changed to Down prall.
Text positions are shifted, text colors disappear.

I used the following attachment for the test.

Attachment Size
Articulations_and_Ornaments1.mscz 10.22 KB