2 voices in musicxml show as 1 in Musescore
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.
deleted; maybe misunderstood...
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)
In reply to File was generated from midi… by erepere
Open the midi file directly in MuseScore like you do any .mscz file. You'll get a few options that are explained in https://musescore.org/en/handbook/3/midi-import, but it looks pretty good using the defaults. You can then save it or export it to any supported format you want. MuseScore will not save any notes into voice 5 since it doesn't recognize voice 5.
I'm curious why you want to save it as xml.
In reply to Open the midi file directly… 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)
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 Many thanks for your kind… by erepere
Whatever program you used to export the xml uses voice 5-8 for the lower staff, MuseScore knows it has a lower staff and reuses voices 1-4 to eliminate the need for voices 5-8, which would only exist on a grand staff.
In reply to Whatever program you used 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.
In reply to File was exported by… by Leon Vinken
Thank you!