I made a MIDI player for Wick Editor based on MIDIjs.
But why?
Let's say you're making a game. You want to add some music, but the file's way too large. Some people with slower internet connections may have to wait VERY long to download that music!
There's no way to add small music files... but that's where MIDIs come in.
What's a MIDI file?
The Wikipedia article
MIDI, from Wikipedia, the free encyclopediaI don't have time to read that!
I found this YouTube video.
While I'm at it, here's an example of a MIDI file. Keep in mind that this particular MIDI, when downloaded, is just 33 kilobytes!
Video of CANYON.MID
YouTube URLHow do I use this thing?!
Download the wickobj file (scroll down!), and upload it into your project. Then, drag and drop it into the very first frame of your game. This frame has to contain nothing in it.
To play a MIDI from an URL when the user clicks on a button, type in "MIDIjs.play('url-here');" into the "Mouseclick" script of your button, where url-here is the url of your music (ending with .mid or .midi, so no YouTube videos or .mp3).
Depending on your internet speed, MIDIjs will take a short while to download the MIDI before it plays it.
If you find yourself needing to stop a MIDI, there's MIDIjs.stop();. Putting a play command and a stop command in the same script will cause the MIDI to not play at all.
An example i made
midiplayer.html (2.2 MB)
The default soundfont sounds like (rubbish/garbage) to me! Is it possible to add a soundfont?
Technically, yes. But, without going through hoops and hurdles like I do, no.Download
Leopard Hosting
(Mirror 1)
Google Drive (Mirror 2)