How to access Chord Symbols at a cursor?
I'm trying to access Chord Symbols I've inserted in a staff, but the element.type can't show it, this is my code.
import QtQuick 2.2
import MuseScore 3.0
MuseScore {
version: "3.0"
description: qsTr("This plugin prints chord symbols in the selection")
menuPath: "Plugins.Notes.Print Chord Symbols"
function accessChordSymbols() {
var cursor = curScore.newCursor();
cursor.rewind(0);
while (cursor.segment) {
var element = cursor.element;
console.log(element.type);
cursor.next();
}
}
onRun: {
accessChordSymbols();
Qt.quit();
}
}
I got the message: Running…
Plugin Details:
Menu Path: Plugins.Notes.Print Chord Symbols
Version: 3.0
Description: This plugin prints chord symbols in the selection
Requires Score
Debug: 93
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
Debug: 25
As I know, 93 is chord object, 25 is rest object, there is no harmony object.
Attachment | Size |
---|---|
Screen Shot 2024-08-22 at 5.16.02 PM.png | 15.86 KB |
Comments
Chord symbols are annotations of the segment
miniHarmony.qml