You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using MidiConvert on client side, and export is done with blobs.
Generally it's working fine, but I came up with this minimal example that show the issue.
midi
.track()
.patch(32)
.note(76, 0, 0.66666)
.note(46, 0, 0.66666)
.note(50, 0, 2)
.note(76, 0.66666, 0.66666)
.note(76, 1.33333, 0.66666);
this example will lead to an midi file with length more than 2seconds, and the rhythm is not correct as shown below.
I am curious if this bug will reproduce on server side.
here is the full code const midi = MidiConvert.create() midi.track().patch(32).note(76, 0, 0.66666).note(46, 0, 0.66666).note(50, 0, 2).note(76, 0.66666, 0.66666).note(76, 1.33333, 0.66666); const binaryString = midi.encode(); const bytes = new Uint8Array(binaryString.length); for (let i = 0; i < binaryString.length; i++) { bytes[i] = binaryString.charCodeAt(i); } var blob = new Blob([bytes], { type: "audio/midi;charset=binary" }); FileSaver.saveAs(blob, "output.mid");
The text was updated successfully, but these errors were encountered:
I'm using MidiConvert on client side, and export is done with blobs.
Generally it's working fine, but I came up with this minimal example that show the issue.
midi
.track()
.patch(32)
.note(76, 0, 0.66666)
.note(46, 0, 0.66666)
.note(50, 0, 2)
.note(76, 0.66666, 0.66666)
.note(76, 1.33333, 0.66666);
this example will lead to an midi file with length more than 2seconds, and the rhythm is not correct as shown below.
I am curious if this bug will reproduce on server side.
here is the full code
const midi = MidiConvert.create()
midi.track().patch(32).note(76, 0, 0.66666).note(46, 0, 0.66666).note(50, 0, 2).note(76, 0.66666, 0.66666).note(76, 1.33333, 0.66666);
const binaryString = midi.encode();
const bytes = new Uint8Array(binaryString.length);
for (let i = 0; i < binaryString.length; i++) { bytes[i] = binaryString.charCodeAt(i); }
var blob = new Blob([bytes], { type: "audio/midi;charset=binary" });
FileSaver.saveAs(blob, "output.mid");
The text was updated successfully, but these errors were encountered: