Plugin to shortcut to Export as .MID without prompting

• Nov 19, 2020 - 15:35

Hello people, I am making an script in REAPER that automatically import to the session an MID file if something in it was changed in it,

If musescore could automatically export in .MID without asking me for a name would be great.

Is that possible with plugins? Haven't tried coding it yet: just to export as mid without prompting. The name and the path can be defined in the code itself for me, or use where the score is saved.

thanks a lot :)


Comments

Haven't tried it, but what about something like this:

import MuseScore 3.0
import QtQuick 2.0

MuseScore {
    id: myPlugin

    menuPath: "Plugins.watcher"
    description: "Description goes here"
    version: "1.0"
    requiresScore: false

    property string filePath: "C:/path/to/your/file/without/dot_and_extension"

    Timer {
        id: timer

        interval: 10000
        running: true
        repeat : true
        triggeredOnStart : false

        onTriggered: {
            var s = readScore(filePath + ".mscz", true)
            console.log(s)
            writeScore(s, filePath, 'mid')
            console.log("saved at " + filePath + '.mid')
        }
    }
}

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