querying ChordRest.Beam returns Element not Beam
When getting a reference via ChordRest's beam method only an Element is returned. This makes it impossible to then call methods specific to the Beam class like Mode or elements. This is not the case for other returns like system or page. I think this should be made more specific. Is there another way to get the Beam in the mean time? Can it be casted somehow? I attached a test plugin to demonstrate the issue.
I use MuseScore 3.6.2 Plugin-API
Attachment | Size |
---|---|
beamTest.qml | 1.21 KB |
Comments
Is there really no way to get the information whether a beam starts, continues or ends on a chord?
In reply to Is there really no way to… by harmony8
You can use the plugin "element analyser" to get properties of elements like notes and beams in the score. However, I used it on beams and there's no information that differentiates where it starts or ends. In other words, I don't think it's possible to get that information with a plugin.
In reply to Is there really no way to… by harmony8
Actually the closest I found was [Chord].beamMode . [Chord].beamMode: 0 corresponds to AUTO, which will be the case for most beams unless it was manually set. But at least it should be possible for you to change beam direction with a plugin.
In reply to Is there really no way to… by harmony8
Not directly but you can do this yourself by parsing the score for chords and beams. See https://musescore.org/en/node/357781