I tried to apply the java script from this site : www.midijs.net
but it works only for few files ( I don't know why)
Have anybody solved a similiar problem? Thanks a lot for any suggest
Unless you need more than playing a MIDI file, the HTML5 audio element should be enough. There is no need to use JavaScript to play MIDI, and the 90's websites were already playing MIDI as background sound, without loading any JavaScript. You may have a look here: HTML/Elements/audio (w3.org/wiki).
Thanks Yannick, Your posts on several topics have been very helpful and we really appreciate your attention to detail in your responses.
Hello,
The ability to play a MIDI File in a browser depends on the browser and the OS.
The HTML5
According to the midi.js website, their solution uses the Web Audio API to play the MIDI file, which requires a browser that supports the Web Audio API (Safari does not, and Chrome on iOS does not). The website says it will fallback to "conventional plug-in methods", but that won't help someone whose browser and/or OS doesn't provide any method for playing a MIDI file.
Since you say your problem is you can only play some files and not others, it doesn't seem like your particular configuration (browser and OS) is likely to be the problem, but if you let us know your configuration, maybe someone here with a similar configuration can provide some assistance.
Regards,
Forum Admin
MMA
You NEED to use JS if you need advanced control for track solo/mute, instruments, effects, etc. Look to advanced MIDI player example.
You can select from thousands of instruments, example consists of link to al used libraries.