Element.KEYSIG

• Jan 24, 2018 - 18:47

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.

  1. 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.

  2. 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

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...

Attachment Size
changetime_alfa.qml 30.31 KB

Do you still have an unanswered question? Please log in first to post your question.