Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Universal Midi support via JavaScript in browsers

So as a Cyber Historian I figured I'd share this here with everybody.

recently I've been troubled by something, see with midi support nearly non existent a lot of old websites and designs are silent now and it's really really unfortunate because one of the cool Ideas I had for my site was to setup Midi's to play as background music... only to find out that this wasn't really possible anymore.


It is my wonderful pleasure to introduce you to Midi.js!

see this bit of javascript actually plays midi's for you, in your browser!

I've tested it on my tablet, my phone, linux, mac OSX, windows 8.1, windows 10, and windows XP.

all working without issues!

to set it up you need to include the following.

Put this in your header:
<link rel="stylesheet" href="style.css" type="text/css" media="all">
      <script type='text/javascript' src=''></script>

Change your <body> tag to this:
 <body onload="'Location of midi file')">

do these simple changes and you can play just about any midi file as your website's background music.

you can also change the top bit to link to a local variant of midi.js if you decide to, there's no issue there.

it's not perfect, I haven't gotten it to let me load custom soundfonts yet but I'm sure I'll figure it out in due time Tongue
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
That's a way to do it! Nice one.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Midi playback on websites in 2019 SpookyZalost 2 1,889 February 22nd, 2019 at 9:25 PM
Last Post: SpookyZalost

Users browsing this thread: 1 Guest(s)

Makestation Theme/Design Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2021
Forum design by Makestation Team © 2020 - a modern day time capsule | Makestation Ajax Chat Hosting