Dr. Presto - Now with MUSIC!

Jan 27, 2023

It's hard to believe that I built the Dr. Presto widget, a NES Dr. Mario clone, so many years ago. I remember back then that I really wanted to have music playing while playing the game, but I also remember I just couldn't find a way to get MIDI files to play in a widget (or even in a website!) context without resorting to Flash or some other heavy, embedded applet.

Fast forward to today, where I found myself thinking about it again. Heck, the Dr. Mario MIDI files I wanted to use are still in the folder where I store the widget files. I never threw them out. Could I make it work this time?

It turns out that the HTML5 <audio> element still doesn't support playing MIDI files, and it's doubtful if it ever will. However, there must be other ways, right? After trying and failing to make three different javascript-based MIDI player systems work, I eventually found html-midi-player by cifkao and got it working. It's a pretty big file (592kB), but the main reason I like it is precisely because it is all one file (bundled of course), and specifying a sound-font is optional. It's "plain Jane" and easily portable.

Give Dr. Presto a try yourself. The music is turned off by default (I'm not a monster!) so just click the little speaker icon to get it playing. You can turn off the music at any time by pausing the game or hitting the speaker icon again.

Hope you like! And remember to take your vitamins. ;)

Comments closed

Recent posts

  1. Customize Clipboard Content on Copy: Caveats Dec 2023
  2. Orcinus Site Search now available on Github Apr 2023
  3. Looking for Orca Search 3.0 Beta Testers! Apr 2023
  4. Simple Wheel / Tire Size Calculator Feb 2023
  5. Dr. Presto - Now with MUSIC! Jan 2023
  6. Archive