[MusicXML] Swing marking playback info lost upon export/reimport

• Jan 14, 2018 - 20:12
S5 - Suggestion
GitHub issue
  1. Create a score with a swing marking (or use swing_export_musicxml_test.mscx )
  2. Export to musicxml (or use swing_export_musicxml_test.xml )
  3. Reimport into musescore (or use swing_export_musicxml_test_reimported.mscx )

Actual result: Swing marking has lost its playback effect.

I think the export itself is at fault here, making it a simple direction marking with text; not including the metronome-note/relative information.


I wasn't aware there was any such marking, so I'm sure you're right we don't export - or import - it. Feel free to point to specific documentation on how you would expect to see that work.

In reply to by Marc Sabatella

I think a metronome direction should be added when exporting and interpreted while importing: https://usermanuals.musicxml.com/MusicXML/Content/EL-MusicXML-metronome…

This might already be enough for the roundtrip MuseScore - MusicXML - MuseScore to work, but from what I can see, note durations should probably also be adjusted for swing (e.g. duration 2 for the first eight note of a pair, 1 for the second):

It's not clear from that how we would actually do this. The referenced section on tempo seems to be about the appearance of tempo markings, and only covers simple non-real-world cases like approximating swing using triplets, which isn't accurate at all and not what our swing direction actually does. Whereas the referenced section on duration seems to assume we would want to export information on a note-by-note basis, which would be awkward to generate since that aspect of swing is handled as a playback function only, and it would not be anything we could work with on import. That is, how would we know to interpret any given duration adjustment as due to swing versus something else, how to handle adjustments that don't occur in simple pairs, etc?

I guess I'd like to see real work examples of how other programs deal with this - an actual MusicXML file generated by Finale or Sibelius that either of those programs can also import back in with the desired results. Then it would be more clear what exactly we would be trying to do.

Just want to point out that I've noticed something similar as well.
I was trying to export a score from Musescore to use in Reaper.
I noticed the MXL didn't get imported with swing, while the midi did.

Severity S5 - Suggestion S4 - Minor
Status open issues active
Reported version 2.1  
Regression No
Reproducibility Always
Workaround No

Also discovered this issue when using musescore to export to MusicXML for use with Synthesia. When switching to midi the swing then worked. Manually looking at the exported XML, and there is no mention of swing in the file when setting swing globally under "format -> style". When applying swing from a particular note, the XML file includes a text label, but that is all.

Looks like MusicXML now supports the swing element https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/swing/

OS: Windows 10 Version 2009, Arch.: x86_64, MuseScore version (64-bit): 4.0.0-223472200, revision: 5485621