Old 05-19-2019, 02:40 AM   #1
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default Notation bug - Xml export, voices and staves

Hi Everyone.
So i tried to export a simple piano sequence to be later imported in Sibelius. I'm sorry if this issue has been already addressed, but I can't find it with my searches.
What I discovered is that Sibelius doesn't recognize the right hand Staff, but visually it kind of looks like it does.
Look at the attachment, second bar. The "position" of the notes is correct, but if you look better you notice that the upper staff is empty (there is a full measure rest). That means that Sibelius interprets also the upper notes as belonging to the lower staff (and in different voices, otherwise it would mess with durations, which also is a weird thing). This applies to the whole score: in the upper staff there are only rests.
Of course this is a simple example, I discovered this behaviour with a much more complicated piece which was completely "wrong" exported.
I can't say if it's a Reaper export problem or a Sibelius import one, I'm just assuming that the specialized Notation program knows how to import Music Xml files.

What tried:
In reaper: force the "Staff->Top, Staff->Bottom" assignment. No Luck.
In reaper: Force the voice assignment (low voice, High voice). Even worse result because the notes belonging to the second voice just disappear in Sibelius.

SL
Attached Images
File Type: jpg Schermata 2019-05-19 alle 11.16.20.jpg (39.5 KB, 19 views)

Last edited by simonluca; 06-03-2019 at 04:00 PM. Reason: Better title
simonluca is offline   Reply With Quote
Old 05-27-2019, 03:19 AM   #2
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Could you attach the RPP project where this happens? Also you can create as many minimal scenarios as possible with combinations of different voices and staff-forcing.

And then import that into Sibelius, select all notes so that the voice assignment is visible, screenshot it and attach that as well.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-02-2019, 09:19 AM   #3
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

Hi there, sorry for answering so late.
In attachment you'll find an extremely simple reaper project with 3 notes. One (the lower one) should go to the lower staff, the other two should be assigned to the high staff.
Instead of doing this, reaper assigned the lower note to voice 2 (green) and the high to voice 1 (blue) which makes no sense, and it also assigned them to the same staff, the higher one. Reaper should assign them to voice 1 and to the two different staffs.

In the attached image you'll see that there is a rest on the lower staff, denoting the fact that there are no notes.

SL
Attached Images
File Type: png Schermata 2019-06-02 alle 18.12.15.png (29.9 KB, 12 views)
Attached Files
File Type: rpp xmlexport.RPP (3.5 KB, 10 views)
simonluca is offline   Reply With Quote
Old 06-03-2019, 10:52 AM   #4
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

simonluca: Please rename this thread (by renaming the first post) to something like "Notation bug - xml export, voices and staves".


There seems to be several problems with voice assigning in xml export.

I tried this in Reaper, where I assigned all combinations of voice 1/2 and staff 1/2 for C3 and A4:




And imported into Sibelius, it looks nothing like that. In the first measure there is event voice 3 assigned to those notes. blue - voice 1, green - voice 2, orange - voice 3




Musescore look a little better but still not as expected:




Test RPP: https://drive.google.com/file/d/1EzD...ew?usp=sharing

EXPECTED:
- notes goes to proper staves as seen in Reaper
- since most notation softwares use 4 voice, there is some problem how to assign voices from reaper on export.
I suggest:
default voice and voice 1 goes to voice 1
voice 2 goes to voice 2
other voices are note used.


EDIT: I've looked into this exported xml and there are some <stem>up</stem> lines while there are no stem directions set in the Reaper project, that could cause some troubles too maybe.
__________________
Donations | Mixing & Mastering Services

Last edited by bFooz; 06-03-2019 at 12:45 PM.
bFooz is online now   Reply With Quote
Old 06-03-2019, 04:20 PM   #5
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

I updated the title, it's much better now, thank you for your advice.

The problem is very clear and highly reproducible when you have two staves.

About your suggestions: from my point of view it makes no sense to have a "default" voice. If you have only one voice (one line, you name it), it's voice 1, if you have 2 of them, they are voice 1 and voice two. A default voice suggests the idea that there are 3 voices (default, 1 and 2), which is clearly not the case. So for me voice 1 should be the default one, then if you need another voice, you have to select it from the menu. If Reaper's devs are not willing to change that well yes, deafult voice should be voice 1, voice 1 -> voice 1, voice 2 -> voice 2 as you suggested.
Of course for much improved compatibility it would be better to have 4 voices as all notation editors I know do have, but maybe that's not a priority.

I noticed some odd interpretation of stems directions too, but now I can't reproduce the bug. I had to "reset stems direction" in sibelius to make them work.
simonluca is offline   Reply With Quote
Old 06-03-2019, 05:01 PM   #6
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

I don't think devs gonna remove the default voice ever, that would have quite a lot of consequences as I see it.

But voices 3 and 4 would be an easy addition. Inside Reaper, they would behave just like voices 1 and 2. The only difference would be on export where they would be properly exported into voice 3 and 4.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-03-2019, 05:10 PM   #7
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,090
Default

The musescore import looks right except for the rest positioning, right?
schwa is offline   Reply With Quote
Old 06-03-2019, 05:51 PM   #8
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,090
Default

We can make some improvements to the REAPER musicxml export, but I notice that sibelius imports this simple musicxml file in an unexpected way. This is a plain text file so you can open it and see that it contains only one measure, with two half notes on staff 1, and one whole note on staff 2, all in voice 1. Sibelius adds a whole note rest to measure 1 of staff 2, although it is not specified in the musicxml, which contains no rests at all. Musescore imports the file as expected.
Attached Files
File Type: xml xmlexport.xml (2.6 KB, 9 views)
schwa is offline   Reply With Quote
Old 06-04-2019, 02:06 AM   #9
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Quote:
Originally Posted by schwa View Post
The musescore import looks right except for the rest positioning, right?
Yes, positioning is right but voice assignment isn't and that seem to be the main problem. Voices default,1,2 from Reaper are mapped to voices 1,2,3 which is not as expected.

Expected is:
default,1 -> 1
2 -> 2
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-04-2019, 02:35 AM   #10
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Quote:
Originally Posted by schwa View Post
I notice that sibelius imports this simple musicxml file in an unexpected way.
Yes, when the staff 2 is specified in an xml, Sibelius assigns it to staff 2 but also to voice 2 (and so there is a rest for the voice 1).
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-04-2019, 02:41 AM   #11
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Btw, Dorico has unlimited number of voices and it differentiates them as up-stem voices and down-stem voices and locks stem direction of notes only when the other-direction voice is present in a measure.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-04-2019, 04:01 AM   #12
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

Quote:
Originally Posted by bFooz View Post
Yes, when the staff 2 is specified in an xml, Sibelius assigns it to staff 2 but also to voice 2 (and so there is a rest for the voice 1).
No, that's not the case. It >visually< looks like it assigns it to staff two, but in reality it is assigned to staff one; it's not only a problem of voice, but also staff assignment.
Expected is: staff two, voice one
what happens is: staff one, voice two.
In my experience nothing is assigned to staff 2
simonluca is offline   Reply With Quote
Old 06-04-2019, 04:12 AM   #13
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

On this picture from you

https://forum.cockos.com/attachment....7&d=1559492007

the whole-note C3 is in staff 2. There are no ledger lines leading from staff 1. The rest in staff 2 means there are no notes in voice 1. If you would select that rest, it would be blue indicating this.

There are all notes assigned to staff 1 on my picture here https://i.imgur.com/zJL3fy2.png .

Or do you maybe have another example better illustrating your point?
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-04-2019, 04:28 AM   #14
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,090
Default

Quote:
Originally Posted by bFooz View Post
Expected is:
default,1 -> 1
2 -> 2
That doesn't seem ideal. How about { 1=>1, 2=>2, default=>3 } if multiple voices are present, and { default=>1 } if only the default voice is present?

Quote:
Originally Posted by simonluca View Post
In my experience nothing is assigned to staff 2
As a practical matter, what should the musicxml file in post 8 look like to get the desired result in Sibelius? You can edit that file directly in a text editor to experiment.
schwa is offline   Reply With Quote
Old 06-04-2019, 04:46 AM   #15
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

Quote:
Originally Posted by bFooz View Post
On this picture from you

https://forum.cockos.com/attachment....7&d=1559492007

the whole-note C3 is in staff 2. There are no ledger lines leading from staff 1. The rest in staff 2 means there are no notes in voice 1. If you would select that rest, it would be blue indicating this.

There are all notes assigned to staff 1 on my picture here https://i.imgur.com/zJL3fy2.png .

Or do you maybe have another example better illustrating your point?
Yes, that's exactly my point! The whole note <looks like> it belongs to staff two, there aren't even ledger lines! It is extremely confusing, but in reality sibelius interprets it as belonging to staff one. You can see that thanks to the measure selection (the blueish area). I selected only measure one/staff one but sibelius highlighted all the notes, the higher notes belonging to staff 1 // voice 1 (blue), the lower one belonging to staff 1 // voice 2 (green). So practically this means that if I highlight measure 1 // staff 1 and hit "delete", sibelius deletes every note you see because for it they belong to the same staff.

Look at this: https://drive.google.com/file/d/14NP...ew?usp=sharing

you have the xml, the rpp and a screenshot there.

it's very strange. Measures 1, 3 and 4 are interpreted correctly, measures 2 and 5 not but at least it is visually evident.

Shwa I can't answer you now, I'm in a hurry. I will this evening (GMT+1);

Thank you
simonluca is offline   Reply With Quote
Old 06-04-2019, 08:26 AM   #16
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

Ok, I think I got it.
I exported an xml from Sibelius, writing exactly what's in post #8 and I noticed that the C in the staff 2 is marked as Voice 2.
It makes theorically sense: it seems that in MusicXML voices are instrument-related and not staff related as they are in notation editors; this is where the confusion comes from. If you have an instrument which requires 2 staffs (Piano, Harp Etc) and you write one line in each staff, well: they are two voices, one played by a hand, the second by the other hand.
This is what I tried to do (measure 4 in the attached files): I wrote 4 notes in the upper staff marking them respectively in Sibelius as "voice 1 / 2 / 3 / 4" and 4 notes in the lower staff marking them equally as voice 1 / 2 / 3 and 4. Guess what? In the XML they are marked as voice 1, 2, 3, 4 (Staff 1) and voice 5, 6, 7, 8 (Staff 2). I imported the Sibelius-Generated XML in Musescore and it looks right. If you notice in the Sibelius File/measure two the staff 1 notes are assigned to voice 1 and the note in staff 2 is assigned to voice 2 (green). In The musicXML the latter is marked as voice 3 (voice 2 is skipped because it is silent).

To answer to Schwa question: the Reaper Generated XML file from post #8 should be like this:
(LINE 85)
<note default-x="120" dynamics="106">
<pitch>
<step>C</step>
<octave>3</octave>
</pitch>
<duration>64</duration>
<voice>2</voice> <------- this was "<voice>1</voice>"
<type>whole</type>
<staff>2</staff>
</note>

I edited it, imported in Sibelius and it's ok.

here you can find the files: https://drive.google.com/file/d/1l1H...ew?usp=sharing
simonluca is offline   Reply With Quote
Old 06-04-2019, 11:17 AM   #17
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Quote:
Originally Posted by schwa View Post
How about { 1=>1, 2=>2, default=>3 } if multiple voices are present, and { default=>1 } if only the default voice is present?
I don't know, this seems even stranger than my suggestion.

Maybe it would be in fact really better to remove the default voice (and add 3 and 4) and make it so that when in a measure only voices with the same stem direction are present, show them like the current default. And when the opposite-stem-direction voice is added, show all notes in that measure with stem directions forced.

For backward compatibility, default voice from older RPPs would be treated as voice 3.

I think this would simplify a lot of things.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-04-2019, 02:43 PM   #18
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

[QUOTE=schwa;2142569]That doesn't seem ideal. How about { 1=>1, 2=>2, default=>3 } if multiple voices are present, and { default=>1 } if only the default voice is present?

Well for me if three voices are somehow already in the code, we should keep them as three voices. Three voices are better than just two. It would be better to call them "voice 1,2,3" and not default, high and low voice which is not ideal and also a little bit confusing (for example voices in certain situations can cross, the lower voice becoming the high pitched one and viceversa).
I still don't see a practical advantage of having a "default" voice and I still don't get it conceptually. If you say that the "default" voice is in reality an "autoassign voice" function or something then yes, I get it.

Again for me the best and clearer choice to do is to have 4 voices, and no default voice. If we can't have 4 of them but 3 we do then if we have 1 line it should be marked as voice 1, two lines voice 1 and 2, three, 1, 2, 3. If the user doesn't force the assignment then Reaper should guess, assigning them in the best way it can (as it does now i suppose).

Of course I'm not aware of all the problems and implications related to such decisions (for ex. retrocompatibility), but I know for sure that this is what everyone I know would expect from a notation editor.

Let me know if what i discovered makes sense to you.

SL
simonluca is offline   Reply With Quote
Old 06-05-2019, 03:50 AM   #19
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,090
Default

I don't understand why Sibelius will only import notes to staff 2 if they are also set to voice 2, this seems like a Sibelius bug to me. I don't think we want to force exporting all staff 2 notes as voice 2.

Last edited by schwa; 06-05-2019 at 03:58 AM.
schwa is offline   Reply With Quote
Old 06-05-2019, 04:51 AM   #20
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

This is how Sibelius exports voices:

Code:
if staff==1 then
   xmlVoice = voice
elseif staff==2 then
   xmlVoice = voice + maxVoice(staff1) //maxVoice got from entire part
end
In this way Musescore, Notion, Finale imports well it seems.

If the first note is {voice=1, staff=1} and the second note is {voice=1, staff=2} behaviour changes slightly across softwares.

Sibelius:

1)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=1, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=2, staff=2} but linked to the note1, meaning visually voice=2 but functionally voice=1


2)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=2, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=1, staff=2}

all is as expected


MuseScore:

1)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=1, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=1, staff=2}

automatic rests behave same as if note2 = {voice=1, staff=1}



2)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=2, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=1, staff=2}

automatic reste are as expected

__________________
Donations | Mixing & Mastering Services

Last edited by bFooz; 06-05-2019 at 04:57 AM.
bFooz is online now   Reply With Quote
Old 06-05-2019, 05:02 AM   #21
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Maybe this would be also helpful.

Read: https://www.musicxml.com/tutorial/no...ti-part-music/

Watch: https://wpmedia.musicxml.com/wp-cont...12/11/reve.png

Keyword: cross-staff chord
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-05-2019, 02:40 PM   #22
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

Quote:
Originally Posted by schwa View Post
I don't understand why Sibelius will only import notes to staff 2 if they are also set to voice 2, this seems like a Sibelius bug to me. I don't think we want to force exporting all staff 2 notes as voice 2.
I get your point, but it's not a bug and MuseScore behaves in exactly the same way. I checked it doing the same experiment with it and the resulting XML was identical to sibelius in voice assigning, so from voice 1 to voice 8. Check the attached image, every note is assigned to a different voice, 1-4 upper staff, 1-4 lower staff.

this is the XML of the last note (G3)

<note default-x="278.88" default-y="-110.00">
<pitch>
<step>G</step>
<octave>3</octave>
</pitch>
<duration>1</duration>
<voice>8</voice>
<type>quarter</type>
<stem>down</stem>
<staff>2</staff>
</note>


It seems to me that even if they are not following the MusicXml official specs (which I don't know) they have a reason to assign voices like they are. These two softwares "talk" very well to each other and XML is all about softwares talking to each other.

Following this logic would improve the compatibility between Reaper XMLs and at least both Musescore and Sibelius. I don't own copy of Finale so I can't check it but maybe bFooz can.
Attached Images
File Type: png Schermata 2019-06-05 alle 23.20.51.png (46.6 KB, 6 views)
simonluca is offline   Reply With Quote
Old 06-05-2019, 03:33 PM   #23
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

Quote:
Originally Posted by bFooz View Post
This is how Sibelius exports voices:

Code:
if staff==1 then
   xmlVoice = voice
elseif staff==2 then
   xmlVoice = voice + maxVoice(staff1) //maxVoice got from entire part
end
In this way Musescore, Notion, Finale imports well it seems.

If the first note is {voice=1, staff=1} and the second note is {voice=1, staff=2} behaviour changes slightly across softwares.

Sibelius:

1)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=1, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=2, staff=2} but linked to the note1, meaning visually voice=2 but functionally voice=1


2)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=2, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=1, staff=2}

all is as expected


MuseScore:

1)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=1, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=1, staff=2}

automatic rests behave same as if note2 = {voice=1, staff=1}



2)
note1 = {xmlVoice=1, xmlStaff=1}
note2 = {xmlVoice=2, xmlStaff=2}

result:
note1 = {voice=1, staff=1}
note2 = {voice=1, staff=2}

automatic reste are as expected

In my experience very simple examples as this sometimes don't create problems in Reaper generated XMLs. I have this idea that they (= sibelius and Musescore) assign voices like they do to prevent conflicts in the case you'll merge the two staves. In your example there would be no conflict because there is not even a rythmical interesection. Even by ear these two notes would be interpreted as one voice.
simonluca is offline   Reply With Quote
Old 06-07-2019, 11:46 AM   #24
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Yes, Finale seems to read it well when I tried it with voice assigments as desribed in my previous post.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Old 06-09-2019, 03:36 AM   #25
simonluca
Human being with feelings
 
Join Date: Oct 2007
Posts: 64
Default

Quote:
Originally Posted by bFooz View Post
Yes, Finale seems to read it well when I tried it with voice assigments as desribed in my previous post.
Nice, thank you. So what do you think Schwa?

Have a nice weekend everyone,
SL
simonluca is offline   Reply With Quote
Old 06-19-2019, 08:23 AM   #26
bFooz
Human being with feelings
 
bFooz's Avatar
 
Join Date: Jul 2010
Location: Slovakia
Posts: 939
Default

Do you plan to look further into this? As I was reading the specs linked above, it seemed the current implementation is not quite right.
__________________
Donations | Mixing & Mastering Services
bFooz is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.