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
Are you willing to add xhr support for getting the midi files? The file upload api is a little limiting. In my current application im solving this by the following snippet:
functiongetMidiStream(url,callback){varxhr=newXMLHttpRequest();xhr.open('GET',url);xhr.overrideMimeType('text/plain; charset=x-user-defined');xhr.onreadystatechange=function(){if(this.readyState===4){if(this.status===200){vart=this.responseText||'';varff=[];varmx=t.length;varscc=String.fromCharCode;for(varz=0;z<mx;z++){ff[z]=scc(t.charCodeAt(z)&255);}callback(ff.join(''));}else{onerror&&onerror('Unable to load MIDI file');}}};xhr.send();}getMidiStream(url,function(stream){varmidi=MidiConvert.parseParts(stream,options);})
I wanted to create a pull request but had no idea where to put the code. Btw this code is heavily inspired by how midijs solves this. Its kind of a hack to get a blob.
Frank
The text was updated successfully, but these errors were encountered:
Are you willing to add xhr support for getting the midi files? The file upload api is a little limiting. In my current application im solving this by the following snippet:
I wanted to create a pull request but had no idea where to put the code. Btw this code is heavily inspired by how midijs solves this. Its kind of a hack to get a blob.
Frank
The text was updated successfully, but these errors were encountered: