How to select the Key signatures elements in the score through the musescore plugin.
I found that using :
curScore.selection.selectRange(0,curScore.lastSegment.tick + 1,0,curScore.nstaves); //cmd(“select-all”) method
cannot select Key signatures.
I found that using :
curScore.selection.selectRange(0,curScore.lastSegment.tick + 1,0,curScore.nstaves); //cmd(“select-all”) method
cannot select Key signatures.
Do you still have an unanswered question? Please log in first to post your question.
Comments
In Cursor class reference I see
https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…
int keySignature
Key signature of current staff at tick pos.
In reply to In Cursor class reference I… by elsewhere
This also means that it cannot be checked or removed by plugins?
In reply to In Cursor class reference I… by elsewhere
My ultimate goal is to want to remove it via plugin
In reply to In Cursor class reference I… by elsewhere
Or hide key signatures through plugins
In reply to Or hide key signatures… by davil123
I don't know. It says read only. So I think you can see what it currently is from a plugin, but not change or remove it.
In reply to I don't know. It says read… by elsewhere
Thank you for your help
In reply to In Cursor class reference I… by elsewhere
I'm frustrated that when I see this message, it means my plugin isn't going to be perfect。
In reply to I'm frustrated that when I… by davil123
the plugin api indeed cant do everything, and there are lots of plugins i would like to make but cant. maybe in a future update we will get more features, but for now hiding the key signature manually is pretty simple
In reply to I'm frustrated that when I… by davil123
If only removing key signatures is a goal then it is possible to do. You can use the Cursor.filter property to make a cursor go through key signature segments (it only goes through chords and rests by default). The following code will allow the plugin get all key signatures, at least in the current track:
You can then remove the found key signatures with
removeElement(keySig);
In reply to If only removing key… by dmitrio95
.
In reply to If only removing key… by dmitrio95
.
In reply to If only removing key… by dmitrio95
Thank you. I just checked some information and it was my negligence that keySig could be selected. Now the problem has been solved.
In reply to If only removing key… by dmitrio95
With the current plugin's functionality, can we implement this function for images? Invisible all of staff lines
In reply to If only removing key… by dmitrio95
Why am I unable to hide all key signatures using this code? It only hides the key signature of the first staff.
my code:
In reply to Why am I unable to hide all… by davil123
try this:
In reply to try this: curScore.startCmd… by XiaoMigros
Just a moment, I'm testing
In reply to try this: curScore.startCmd… by XiaoMigros
Thank you, it's ready to run now
In reply to try this: curScore.startCmd… by XiaoMigros
This is very strange. When I tried to hide the clef information using a similar method, I found that I couldn't hide the clef on the left side of the time sign, while the clef on the right side of the time sign could be hidden normally.
In reply to This is very strange. When I… by davil123
What SegmentType value are you using? I would try both
Segment.Clef
andSegment.HeaderClef
In reply to What SegmentType value are… by XiaoMigros
And Segment.HeaderClef? I didn't know about this before.I need to retest,now!
In reply to What SegmentType value are… by XiaoMigros
.
In reply to for some you do make time… by gustebus10
.
In reply to for some you do make time… by gustebus10
This is his freedom.
In reply to try this: curScore.startCmd… by XiaoMigros
Could you help me again? I have tried to modify the offset of the beam before, but if the custom position is not modified, it cannot be moved. However, I do not know which attribute belongs to the beam for this custom position。https://musescore.org/en/node/349714