Fix some reference issues when creating a ScoreVariant#461
Fix some reference issues when creating a ScoreVariant#461
Conversation
|
I have a question about the failing test. It's failing because I've added the attribute class Fermata(TimedObject):
"""A Fermata sign.
Parameters
----------
ref : :class:`TimedObject` or None, optional
An object to which this fermata applies. In practice this is a
Note or a Barline. Defaults to None.
Attributes
----------
ref : :class:`TimedObject` or None
See parameters
"""However, it seems that this attribute can also be a string: It seems that @mgrachten worked on fermatas, could I get your point of view on this? |
|
I'm not aware that partitura/partitura/io/importmusicxml.py Lines 647 to 679 in 0c76286 Actually, I don't understand why it gets the location attribute a second time, when it's already defined above. It seems like repeated tweaks to this code over time made it somewhat inconsistent. |
|
I would argue that if this EDIT: If I'm understanding correctly this |
It seems that there might be quite a few problems in that barline code indeed. A few things that I find strange are:
There might be other issues, but that's the first ones that came to my mind while reading that code. |
|
All valid points. Since you have a good grasp on the issues, feel free to resolve as you see fit. I currently don't have the bandwidth to address this. |
|
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
|
Hi @leleogere! Are there any updates on this PR? |
|
Hi! Unfortunately, I did not take to time to dig into that |
Closes #450.
This PR adds a couple of attributes that were not correctly handled when a
ScoreVariantwould be produced, resulting inRecursionErrors (and even segmentation faults with some scores) when trying to pickle some unfolded scores:The added references are the following:
GenericNote.fermataNote.beamUnpitchedNote.beamBeam.notesFermata.refEDIT: Seems problematic, see comment belowBefore, those attributes were not updated during the creation of a
ScoreVariant, resulting in them pointing to the elements in the original score. Now, the references are correctly updated to point to the corresponding elements in the createdScoreVariant.