File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,6 @@ root.loadFile = function (file, callback) {
112
112
return ;
113
113
}
114
114
///
115
- var title = file . split ( " - " ) [ 1 ] || file ;
116
- document . getElementById ( "playback-title" ) . innerHTML = title . replace ( ".mid" , "" ) ;
117
- ///
118
115
var fetch = new XMLHttpRequest ( ) ;
119
116
fetch . open ( 'GET' , file ) ;
120
117
fetch . overrideMimeType ( "text/plain; charset=x-user-defined" ) ;
Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ if (window.AudioContext || window.webkitAudioContext) (function () {
137
137
var synth = MIDI . GeneralMIDI . byName [ instrument ] ;
138
138
var instrumentId = synth . number ;
139
139
var url = urlList [ index ] ;
140
+ if ( ! MIDI . Soundfont [ instrument ] [ url ] ) { // missing soundfont
141
+ return callback ( instrument ) ;
142
+ }
140
143
var base64 = MIDI . Soundfont [ instrument ] [ url ] . split ( "," ) [ 1 ] ;
141
144
var buffer = Base64Binary . decodeArrayBuffer ( base64 ) ;
142
145
ctx . decodeAudioData ( buffer , function ( buffer ) {
You can’t perform that action at this time.
0 commit comments