BGMIDI.js

BGMIDI.js is a Javascript-based MIDI player, with a focus on being extremely easy to implement, and very light on bandwidth. BGMIDI.js does just one thing and it does it well: It plays a MIDI in the background. Nothing more, and it's hard to imagine it doing anything less.

Ask anyone who remembers the Early Web of the 1990s, and they'll be able to rattle off a list of design elements that dominated the aesthetic of the time. Probably, you'll have some combination of

Some of these elements still survive, and CSS allows us to make others, but oldschool MIDI playback has been left in the dust. Often placed with some kind of <embed> or <bgsound> trickery - both tags have been deprecated or repurposed, and the replacement WebAudio API has no provision for MIDI loading, processing, or playback. You're supposed to Build Your Own Synth, or just stream some huge pre-rendered file because YAY TECHNOLOGY.

I assumed that this would be a solved problem, but it turns out all the existing common MIDI libraries want to do stupid things. Like download ALL the GUSPatches before starting playback. Or literally just being a port of Timidity using Emscripten. Or they're just a pile of JS object building blocks and you have to cobble them together into a player (but hey, you can also spawns glowing 3d cubes and mine a Bitcoin every time the gong plays).

In three words: FUCK ALL THAT. People used MIDI because they wanted Multimedia Web without having to wait three hours to download a page. The height of effective bgsound was probably the Real Ultimate Power website, which inexplicably paired a MIDI clip of Jay-Z's hit "Big Pimpin'" with a poorly written site about Ninjas. Hell yeah. Just thinking about that gets me so pumped up.