-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Musicxml Export] - End-bar items lost due to various fraction offsets #26208
Comments
I will try to tackle it. |
Hi. I am now dealing with the Trill and I think there may be a limitation with musicXML export. I mean the the start and the end of a Trill are linked to a Note when it begins (wavy-line is the item) as in this example:
or when it ends:
I have read https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/wavy-line/ .Parent elements: barline or ornaments (which in turn depend on notations - notes). I haven't been able to find any example with trills whose parents where barlines. According to the standard ( I am an absolute beginner) https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/ If a barline is other than a normal single barline, it should be represented by a element that describes it. This seems to mean that we could only include wavy-line attached to a barline if it is not a single barline. So if you export this score: and import the musicxml you get As you can see the first Trill is correctly imported because it ends in a rest while the second one is incorrect because it can only end in a rest or a chord and it ends at the beginning of them. I would appreciate any feedback about if there is a way to end a Trill in something different that a note |
When I looked into the mscx code, it seems this trill is a bit strange, not correctly ending at the note, but with a fraction value. It should be attached to the ending note, no matter what the fraction is given, because the trill mark always applies to all the notes it runs over, not half of a note. I'm not sure if I'm correct when interpreting the mscx code Haipeng |
Within the .mscx Trills, like KeySigs, TimeSigs, Rests and Chords are "sons" of voices. Trills and Chords are at the same level:
it seems that the position of each element is next to the previous one, and when something (such as "ritardando") is within tow element you have a "location" element at the same level (as Chords, rests, Trills) that correct the location of the following element. Anyway, I don't see any parameter/option in https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/wavy-line/ that could indicate a different offset to the note the Trill is attached to |
The best solution is to make a round-up to bounce this offset to the nearest note. This is the only and currently best solution. |
I am not sure about what you are proposing;
|
Probably I didn't read the code correctly, due to I can't see the actual score. Do you mean the trill ends between two notes instead of on the second one? The trill will only be played over notes not halfway. When you said "within", do you mean between two notes or the trill lasts through two notes? When I read this part using a screen reader, it seems the trill's end falls on the second note, which will cause Musicxml write the wavy line end on that note. I'm a bit confused, sorry. Haipeng |
I will try to explain myself. See attached file example: Score_26208_trills_test1.zip Original MSCX
If you export and import them (attached files) you get: Every Trill ends in a Rest (or Chord) because the MusicXML standard links the start or the end of a trill to a Chord or a Rest MuseScore does not have this limitation because it has its own way to save the information. What MuseScore seems to do (mscx file) when the Trill does not end in a Chord is: Second Measure: after the rest (quarter with dots) it adds a negative "location" to put the trill before the rest ends
Fourth Measure: after the rest (quarter) it adds a negative "location" to put the trill before the rest ends, then it adds the trill and adds a positive "location" (the same as subtracted before) , so the following rest (eight) starts in the right position
This can't be done (at least I haven't found a way to do it) with MusicXML standard because the start and the end of a Trill are linked to a Chord/Rest. |
Thanks, now I know what it happens. For Musicxml, this is indeed a limitation. Then we have to get a temporary solution: If there's a note/rest, then a fraction for the end of a trill, when the fraction is positive to shift the trill end to between this and next note, then the export puts the wavy line end to the next note; if it's a negative value then positive to compensate the duration, thus the trill ends between this note and the previous note, then the wavy line ends at this note. Haipeng |
About
The problem is related to the fact that the line of the tempo change is not Visible I don't know why, but it means the segment "parent" to the tempo change is a "Time tick" instead of a "ChordRest". I presume there could also be a corner case because if there are two "tempo changes" in the same measure (such as "accel" and "rit") and both have the line invisible the program only imports the first of them such as in: Score_26208_test3.zip |
Ah, if it's invisible, then it should be hidden. Probably I missed this parameter. |
Just the line It is especially noticeable when you export the score to PDF: I have yet to determine how can we have two different tempo change with invisible lines in the same Measure. I presume this should be allowed. Isn't it @oktophonie ? |
This seems to be a bit complex. Besides it will no work when the trill ends after the last note/Chord of the measure as in this case: |
Indeed a difficult thing, and perhaps this is also an incorrect engraving. |
I have been trying to find out why some tempo figures are not imported correctly from musicXML and I haven't been able to know which are the rules when you have TempoLine and TempoText in the same measures. MuseScore exports every element to the .musicxml file. The importer has some rules about when to import some elements to the Measure or not. There is a parameter to determine if they can infer the text types: and regular expressions to guess if the element is a tempo line
Due to the fact that I don't know which are the rules regarding tempo texts and tempo lines I don't dare to change this part of the code I will prepare a PR to solve the problem with "The last dynamic pp is missing". |
I have created the PR #26388 to deal with the problem "The last dynamic pp is missing".
If this is not the case, please let me know. |
That's ok, thanks! Yes, if line is not shown, text is needed. |
…sLost_Dynamics Fix #26208 (Dynamics): [Musicxml Export] - End-bar items lost
Issue type
Import/export issue
Description with steps to reproduce
Violin_Sonata_No.3_Sonata_Epica-_Nikolai_Medtner.zip
Supporting files, videos and screenshots
In this score, at bar 40, there are 3 incorrectly exported things:
What is the latest version of MuseScore Studio where this issue is present?
4.4.4
Regression
No.
Operating system
Windows
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: