How do I create and add tuplets by plugin?

• Jun 23, 2020 - 03:13

How do I create and add tuplets in MuseScore 2.x and 3.x?
console.log(newElement(Element.TUPLET));
logs
Debug: cannot create type 32 <Tuplet>
Debug: null

in MuseScore 2.x and CRASHES in MuseScore 3.x.


Comments

Not directly supported.
If you can get the total beat duration entered and then selected, you could try using the cmd("") to call the shortcut-action from Ctrl-2 up to Ctrl-9; but I don't think any other ratios can be created.

My advice would be to not bother with MS < 3.5 and make your plugin for 3.5+
Then using the function indicated by the commit above, you can create any ratio you need.

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