midi-player
midi-player copied to clipboard
New example file for the midi-player with 2 players
A new song file was added (example-song2.js) There are 2 separate divs for the 2 players. Two separate instances of the MidiPlayerClass are created, each of them getting the div id as parameter + an additional list of options allowing to change the progress bar color for example. Although this interface is not compatible with the previous code, it was kept as close as possible to the former one. BR
Interface changed:
- No need for having an extra link for loading the song when it's time to play it: This function (loadScore) is passed to MyPlayerClass constructor
- It's the 'play' button of the player that starts the MyPlayerClass play method
Note that the example must now be run from a web server, as browsers don't accept that local resources (here wildwebmidi.data) are pulled with file protocol (only HTTP) : CORS error