Why I cannot map over notesArray
Here is my code I cannot map over newElement this element is a chord with three notes and when I console.log(newElement.length) it gives me three so it is definitely an array do you guys know the problem ?
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(0);
var newElement = cursor.element.clone();
cursor.next();
// Log notes
newElement.notes.map(function(item) {
console.log(item);
});
}
}
Comments
pls try
for (var i = 0; i < es.length; i++) {
see https://musescore.org/en/node/320673#s1
https://www.google.com/search?q=qml+list+iterate