Inserting or replacing clef
Hello,
is it possible to programmatically set a specific clef at a measure at a certain measure index, or replace an existing clef with another?
(It is certainly possible in the GUI, select measure, then choose a clef)
Kind regards,
peter
Comments
BTW, I tried to iterate through the score, measures and segments to find the element of type
Element.HEADERCLEF
orElement.CLEF
, and I can indeed get to the element. However, what would be the property which in C++ isclefType
?So far I have succeeded producing an algorithm that determines an "optimal" sequence of clefs for every staff; however, it does not seem to be possible in
MuseScore-Studio-4.5.1.250800846
on Ubuntu 22.04, using the API to a) insert a new clef in a measure, or b) replace a current clef with a different one. What is needed to make both possible?