-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrill_restore.qml
32 lines (30 loc) · 1.02 KB
/
Trill_restore.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* GNU General Public License v3.0
* author: sammik (C) 2022
* https://github.com/sammik/musescore-plugin-baroque-trills-engraver
*/
import QtQuick 2.0
import MuseScore 3.0
MuseScore {
menuPath: "Plugins.Baroque Trills.Restore default Trills"
description: "Replace baroque trills with default ones"
version: "1"
onRun: {
cmd("select-all");
curScore.startCmd();
var els = curScore.selection.elements;
for (var i in els) {
var el = els[i];
if (el.type == Element.SYMBOL && el.symbol == SymId.ornamentShake3 || el.symbol == SymId.ornamentShakeMuffat1 || el.symbol == SymId.ornamentTremblementCouperin) {
console.log(el.symbol);
removeElement(el);
}
if (el.type == Element.ARTICULATION && el.symbol == SymId.ornamentTrill || el.symbol == SymId.ornamentShortTrill) {
el.visible = true;
}
}
curScore.endCmd();
cmd("escape");
Qt.quit()
}
}