Plugin Writing Midi File
Hi all.
Is it still possible in MuseScore 2 to write the current score to a midi file using QML?
The writeScore() call used to work in 1.3:
import QtQuick 2.0
import MuseScore 1.0
import FileIO 1.0
MuseScore
{
menuPath: "Plugins.MidiSightReader"
version: "2.0"
description: "MIDI sight reader."
onRun:
{
if (typeof curScore === 'undefined' || curScore == null)
{
Qt.quit();
return;
}
console.log("-----------------");
console.log(menuPath);
console.log(midiFile.source);
// Write the score to a MIDI file.
writeScore(curScore, midiFile.source, "mid");
console.log("Complete.");
Qt.quit()
}
FileIO {
id: midiFile
source: tempPath() + "/MIDI_Sight_Reader.mid"
onError: console.log(msg)
}
}
Comments
It is currently not possible. See #56216: Can't save a score from within a plugin.