Skip to content

Commit

Permalink
MIDI 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Oct 31, 2023
1 parent f15e96f commit 0abc4eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
8 changes: 6 additions & 2 deletions javascript/JZZ.gui.Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
self.fileInput.type = 'file';
self.fileInput.style.position = 'fixed';
self.fileInput.style.visibility = 'hidden';
self.fileInput.accept = '.mid, .midi, .kar, .rmi, .syx';
self.fileInput.accept = '.mid, .midi, .midi2, .kar, .rmi, .syx';
self.gui.appendChild(self.fileInput);

if (window.FileReader) {
Expand Down Expand Up @@ -587,7 +587,11 @@
for (var i = 0; i < bytes.length; i++) data += String.fromCharCode(bytes[i]);
var smf;
try {
smf = new JZZ.MIDI.SYX(data);
smf = new JZZ.MIDI.Clip(data);
}
catch (err) {}
try {
if (!smf) smf = new JZZ.MIDI.SYX(data);
}
catch (err) {}
try {
Expand Down
Loading

0 comments on commit 0abc4eb

Please sign in to comment.