In MusicXML files SLUR tag has no an attribute "placement"

• Jun 3, 2013 - 19:39

Version: 1.3
Revision: 5702
operating system: Windows 7 Home Basic SP1 x64

1. Add a slur to the notes.
2. Save the file as MusicXML. (unpacked for clarity)
3. Open the saved file with a text editor.
4. Find branch "score-partwise/part/measure/note/notations/slur"
Attribute "placement" is not recorded.


Comments

In reply to by [DELETED] 5

Apparently in the line 393: int i = findSlur(s);

findSlur always returns 0, because for any slur's position attribute "placement" does not appear.

Yes, I think it is better to explicitly specify the SLUR, and not rely for an indefinite "by default". (Because MusicXML is designed for the interchange of scores between various programs and the "defaults" may be different)

In reply to by rao

True, but I also very much dislike having another program's defaults imposed on me when importing into MuseScore, and I have to imagine users of other programs would feel similarly. In 2.0, I understand that MuseScore will give a choice as whether this type of formatting info is retained on import or whether MuseScore will replace that info with its own defaults, and I'd plan to usually set option the later way. I wonder, do many other programs provide that option on import? I see Sibelius apparently has something similar.

In reply to by [DELETED] 5

propose to change the line 455 in the file exportxml.cpp:
xml.tagE(QString("slur%1 type=\"start\"%2 number=\"%3\"").arg(rest).arg(s->slurDirection() == MScore::UP ? " placement=\"above\"" : "").arg(i + 1));

on:
xml.tagE(QString("slur%1 type=\"start\"%2 number=\"%3\"").arg(rest).arg(s->slurDirection() == MScore::UP ? " placement=\"above\"" : " placement=\"below\"").arg(i + 1));

and the line 464:
xml.tagE(QString("slur%1 type=\"start\" number=\"%2\"").arg(rest).arg(i + 1));

on the same:
xml.tagE(QString("slur%1 type=\"start\"%2 number=\"%3\"").arg(rest).arg(s->slurDirection() == MScore::UP ? " placement=\"above\"" : " placement=\"below\"").arg(i + 1));

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