Element.KEYSIG
I was just a bit testing what I could do with a plugin.
Ok, my computer is a bit outdated, but as long as I don't use qml it should do it.
-
I tried to create a new score which should have the same parts as the current...
The problem I faced here was that I did not find the correct instrument name to create the right parts.
The instrumentId of a part gives some idea, but if I look in the .XML i find that there is no 1 to 1 realation.
So if e.g. the instrumentId is "brass.tuba" the instrument for creation of the part could be "f-tuba", "eb-tuba-treble", "eb-tuba", "c-tuba"..... No idea how to select the correct one. -
I created some score and wanted to place Key Signatures....
var mykey = newElement(Element.KEYSIG);
mykey.setKey(1);
leads to:
Unknown method parameter type: Key
If I try to read the Key of the current score the result is similar:
if (element.type == Element.KEYSIG) console.log(element.key());
Error: Unknown method return type: Key
I crashed musescore multiple times when I tried to just add a KeySig to a score. (copied form another score).
I wonder how people could like to work with that kind of tool. It's a pain.
Comments
setKey doesn't work in 2.x
See #100501: KeySig key exposure not working and more specifically https://github.com/musescore/MuseScore/pull/2429#issuecomment-232819449
Now I really stop programming. I feel I have had a million crashes and stumble from one problem to the next.
Tried to create a prog for "doubleTime" and "halfTime". It may work for some simple cases...