Adding articulation problem

• Mar 1, 2024 - 19:17

Hello everyone, I'm encountering an issue while adding articulations. Every time I add a new articulation, it seems to include all the previously added articulations as well. For instance, if I add a staccato to the first note, then attempt to add an accent to the next note, it ends up having both staccato and accent articulations. I'm puzzled by this behavior. Does anyone know why this is happening?

import QtQuick 2.0
import MuseScore 3.0

MuseScore {
menuPath: "Plugins.pluginName"
description: "Description goes here"
version: "1.0"

function createArticulation(artic) {
    var element = newElement(Element.ARTICULATION)
    element.symbol = null
    element.symbol = artic
    return element
}

onRun: {
    var cursor = curScore.newCursor()
    cursor.rewind(0)

    cursor.add(createArticulation("articAccentBelow"))
    cursor.next()

    cursor.add(createArticulation("articAccentStaccatoBelow"))
}

}

Do you still have an unanswered question? Please log in first to post your question.