Anomalous(?) behaviour opening musicxml file

• Jan 20, 2025 - 12:21

I have an xmlfile that I have generated programmatically. From the note point of view it consists of 5-note chords e.g. :
G408half1C508half1E508half1E408half5C408half6G408half1C508half1E508half1E408half5C408half6

Because of information in the input file, which is an xmlfile exported from MuseScore4, there are 3 voices 1, 5 and 6. When I try to open it with MuseSCore4 I get a message that the file is corrupted with details like : Incomplete bar: Full score, bar 1, stave 1. Found: 4/2. Expected: 1/1.

If I edit the file so that all voices are 1, then MuseScore can open the file and it is displayed as I would like, but obviously all notes are Voice 1 which is not quite what I want.

If edit the file so that all the non-voice-1 voices are changed to 2, then I get the same errors opening with MuseSCore4. If I open the file with e.g. online soundslice all versions of the file open successfully.

In response to the error message I tried adding some explicit attributes like time, but it makes no difference.

Is this behaviour a bug or a known limitation of MuseSCore4?

In the appended files, the first is the file with multiple voices and the second where all the voices have be changed to 1


Comments

The text after the opening "e.g.", was xml mark-up text that has been "re-interpreted". To see what was there look at measure 1 of the first file

I opened transformed_musicxmlfile56to1afterrerunV27.xml in MU3.6 despite error messages.
Via Tools/explode you can separate the notes of the chords. Then you can select any of these lines and change their voice (MU has only 4 voices EDIT: per staff).I did this for the second line. After implode you have the notes on separate voices (see attached)
Prelude_C_Major.mscz

In reply to by elsewhere

Thanks for taking the trouble to look at this. I might not have been clear, but the file you opened is the one in which there are only voice 1 elements. In MU4 this opens without errors. The other file contains voice 5 and 6 which, as I say was exported from MuseSCore and whose origin, for me, was the MuseScore web site. Given that, I find it surprising that MU cannot open my original "transformed" xml when there are voice 5 or 6 elements. However, in your response you've introduced me to explode and implode which I was able to use to achieve what I wanted without too much trouble. So, for the moment I'm satisfied with that as a solution, so thanks for your insight and time.

V

Seems MuseScore 4.4.4 (which apparently created transformed_musicxmlfile.xml) creates corrupt scores on import. Not good, best report on GitHub. Along with the mscz that xml stems from...

Do you still have an unanswered question? Please log in first to post your question.