converting midi to xml fails
ultraGentle opened this issue · 1 comments
ultraGentle commented
I'm getting FileError: WebMscore: FILE_UNKNOWN_TYPE
when attempting to ingest a .mid
file and output a .musicxml
.
Here's my code to reproduce:
let file = fs.readFileSync(filePath, null); // note : besides null, which yields a buffer, I've tried 'binary' and 'utf-8'
function generateAudioViaWebMScore(file) {
WebMscore.ready.then(async () => {
const score = await WebMscore.load('mid', file, [], true);
fs.writeFileSync(`converted.musicxml`, await score.saveXml());
score.destroy();
});
}
Is this by design/my error/a bug?
Thanks for any suggestions!
ultraGentle commented
solved: webMscore wants midi
not mid
in the .load
method