Rehearsal mark detection
Hi guys is there any way I can get cursor.tick of a rehearsal mark when it occurs in a score ?
I provide you with a code when the rehearsal mark occurs it is element type of 44
import QtQuick 2.0
import MuseScore 3.0
MuseScore {
menuPath: "Plugins.pluginName"
description: "Description goes here"
version: "1.0"
onRun: {
var cursor = curScore.newCursor();
cursor.rewind(1);
var allElements = curScore.selection.elements
for(var i = 0; i < allElements.length; i++){
if(allElements[i].type === 44){
//IDK
}
}
}
}
Attachment | Size |
---|---|
reharslamarka.png | 19.39 KB |
Comments
I would try allElements[i].parent.tick or allElements[i].parent.firstSegment.tick
In reply to I would try allElements[i]… by sammik
Thanks I figured it out