Plugin Writing Midi File

• Apr 14, 2015 - 20:58

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

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