2 voices in musicxml show as 1 in Musescore

• Aug 15, 2019 - 22:19

Topic. The musicxml file is saved in musescore too and for some reason there are voices 1 and 5 in the xml, but only voice 1 in Musescore GUI. I've attached the file below as well as a screenshot

Attachment Size
test.musicxml 16.73 KB
Voice1Voice5.jpg 766.36 KB

Comments

The results are not surprising. MuseScore only has 4 voices so any voice above 4 (voice 5 in your example) is put into voice 1 rather than causing an error or crash.

File was generated from midi. Is there a good way to force everything midi into a single voice in xml? I've selected 1 voice in the options, but Musescore converter still generated this strange voice 5 to go with voice 1.
Here is the midi file (Beethoven 8th, so no copyright I assume)

Attachment Size
beethoven8.mid 52.76 KB

In reply to by mike320

I tested it:

for musicXML:
If you are on the top stave of a Grand Staff, the voice count is 1, 2, 3, 4.
In the bottom stave, this continues as 5 (for 1), 6 (for 2), 7 (for 3), 8 (for 4).

In Musescore, this is seen as 1, 2, 3, 4. voices on the bottom stave.

So what you see as voice 5 is the 1st voice of the bottom stave. (on Grand-staff)

Attachment Size
Test_again.mscz 3.95 KB

Many thanks for your kind replies! It's still somewhat confusing why voice5 in the lower stave is displayed as voice1 in Musescore and as voice5 in musicxml, but at least the underlying logic is clear - the bottom stave has its own "voice1" (voice5).
"I'm curious why you want to save it as xml."- I am fumbling about trying to parse musicxml (in python) into text chord sequences for a psychology experiment. E.g. the opening measures of the Beethoven 8th (in my screenshot above) would be [["A3E3C3A2E2C2A1", "A3E3C3A2E2C2A1", "A3E3C3", "B3G3ZE3B2", "C4A3E3A2"], ["C4A3F3ZE3M", "B3G3ZE3"]] and so on (M=flat, Z=sharp). Voices and backups complicate things :)

In reply to by mike320

File was exported by MuseScore. MuseScore GUI shows voice 1 to 4 per staff, while the internal data numbers the voices 1 to 8 for a two staff part. MuseScore is behaving as designed (and correctly).

In MusicXML the voices are "numbered" per part. The exporter could have used numbers 1 and 2 in this case, as there are only two voices in the part, but the implementation does not bother and simply uses the internal numbers.

Please be aware that voices are not really numbered in MusicXML, the voice element actually contains an identifier. Typical implementations indeed use numbers, but this is not guaranteed.

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