You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slur bezier-x/y from start element gets overwritten by stop element's values #2019
When a slur has bezier control points on both its start and stop elements in MusicXML, parsing only keeps the stop element's values, the start element's bezier-x/bezier-y get silently overwritten instead of landing in the (separately named) bezierX2/bezierY2 slots.
Looks like it's coming from xmlNotationsToSpanners in musicxml/xmlToM21.py, it calls setStyleAttributes once per element found, writing into bezierX/bezierY regardless of whether the element is the start or the stop tag, so whichever one gets processed second wins. The bezier-x2/bezier-y2 attribute names exist and would land in the right slot, but nothing ever routes the stop element's own bezier attributes there.
I want to clarify something before I go (further) down a rabbit hole.
The MusicXML schema (musicxml.xsd) bezier attribute group states:
The attributes bezier-offset2, bezier-x2, and bezier-y2 are only valid with slurs of type continue, and describe the outgoing bezier point
In the export module (m21ToXml.py), the first Slur gets all the style attributes and type set to start, while the last is just type set to stop. There's even the comment: do not put a notation on mid-slur notes, which would be the continue's
Are the -X2 and -Y2 intended to be used for the stop coordinates?
I could fix the import bug by having the end and continue slurs not overwrite the attributes, but this raises questions about the scope of the issue and the value of implementing the full musicXML behavior. That would require someone more familiar with the project to evaluate.
Activity
mscuthbert commentedon Aug 31, 2026
Great description -- yes, that would be a good improvement. (attributes are bezierX2 and bezierY2 not -x2 -y2, just in case anyone else is looking)
bingliscodes commentedon Oct 6, 2026
I'd like to take this one, assuming it's still available!
bingliscodes commentedon Oct 7, 2026
I want to clarify something before I go (further) down a rabbit hole.
The MusicXML schema (
musicxml.xsd) bezier attribute group states:In the export module (
m21ToXml.py), the firstSlurgets all the style attributes andtypeset tostart, while the last is justtypeset tostop. There's even the comment:do not put a notation on mid-slur notes, which would be thecontinue'sAre the -X2 and -Y2 intended to be used for the stop coordinates?
I could fix the import bug by having the
endandcontinueslurs not overwrite the attributes, but this raises questions about the scope of the issue and the value of implementing the full musicXML behavior. That would require someone more familiar with the project to evaluate.