How to add a KeySignature ?

• Mar 12, 2022 - 10:18

Hello,
I don't succeed to add a key signature via the API.

I have this code snippet,

var keysig = newElement(Element.KEYSIG);
//keysig.xxxx= xxxx; //adding a "####"
cursor.add(keysig);

it doesn't break but actually
* I can't find how the specify the amount of # or b,
* Nothing visible is done on the score, except that all the following notes are getting a 'natural' in front of them.

Anyone knowing how to add a key signature via the API ?

Cheers,


Comments

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