How to add two pitches in one cursor place ?
This code adds two in a row not in one place any help ?
// Import necessary modules
import QtQuick 2.0
import MuseScore 3.0
// Define the MuseScore plugin
MuseScore {
menuPath: "Plugins.pluginName"
description: "Description goes here"
version: "1.0"
onRun: {
var cursor = curScore.newCursor();
cursor.rewind(1);
// Add the first note
cursor.setDuration(1, 2);
cursor.addNote(75); // Change the pitch as needed
console.log(cursor.tick);
// Move the cursor to the same position for the second note
cursor.rewind(1);
// Add the second note
cursor.setDuration(1, 2);
cursor.addNote(70); // Change the pitch as needed
console.log(cursor.tick);
Qt.quit();
}
}
Comments
pls see https://musescore.org/en/node/320673#s7