About Muki

What IS this sh**?

Well, this sh** is actually called Muki. It's a web based player for sequenced music, that contains a carefully curated list of songs from video games of the 90's, and some even older. The sound you hear does not come from lossy compressed formats, by the way. Your browser is actually acting as a synthesizer and generating the waveforms from the original notation scores.

How does it work?

Muki uses web-based (Javascript) ports of different libraries that can play native formats for sequenced music such as MIDI or Nintendo music files, among many others. Keep reading if you want to know more.

Who did this?

The guy behind this is Tomás Pollak, a journalist-slash-developer-slash-aspiring musician who obviously spent too much time playing DOS games when he was young.

Why did you build this?

Because I love MIDI and I wanted to play some of my old songs to my newborn daughter. But it so happens that I use Linux, and it turns out that MIDI and Linux are not exactly, well, best friends. So one day an acorn hit me in the head and I realized the web offered all the tools I needed to build something in order to play them. Once I began the journey, I realized I could actually play a number of different formats besides MIDI. And that's how I got started.

Is this actually legal?

Yes, apparently there's nothing wrong with ripping music from old games nor sharing it, and letting people listen to them is just another form of distribution. If that wasn't the case, YouTube certainly wouldn't allow people to upload the ton of videos with game music that you can find on their site.

Regarding manually sequenced tunes, I've taken precaution in contacting some of the authors of these songs and asked for their permission. I haven't managed to contact eeeveryone, but the response has been overwhemingly positive so far. So thanks again guys!

That said, if there's anything you think should be removed, either because it's yours or because it's from someone who might get pissed, please let me know. I'll make sure to remove it in a snap.

How did you build this? What technologies did you use?

A whole bunch of them! The key piece of all is probably emscripten, a transpiler that provides a way to port native C code to Javascript. Using emscripten I was able to build JS versions of the following libraries: libTiMidity (for MIDI playback, borrowing ideas from midijs.net), Munt (for Roland MT-32 emulation/playback), Game Music Emulator (VGM/VGZ/NSF/SPC/etc), AdPlug and AdlMidi (for Adlib emulation) and Highly Experimental (PSF/PSF2). The only one I didn't actually build was the JS port of libopenmpt, which I borrowed from the chiptune2.js project. The real challenge was to glue everything together, ensuring there were no memleaks, and of course, selecting the list of songs.

What about the UI?

Oh yes, the UI. You like it? Also a LOT of code-stiching. The 3D navigation was taken from one of the cool examples from Codrops. The intro script uses the typed.js library as well as one called starfield.js.



As for the audio visualizations, the first one (Bubbles) is a customized version of a Codepen snippet I found long ago. Lights is a (very lightly) modified version of Github user @soulwire's Plasmatic Isosurface, and Hills is based on an example from Google, as shown in the Web Audio demos page.

And what about the music?

Well, so the music is a collection of different files of different formats that hail from different sources. Probably the most important one is the great, the amazing World of Game Music, a website that contains a huge database of game music in both MIDI (rips and arranged tracks) and MOD format. Then there's VGMusic, another great site that contains a nice collection of MIDIs that have been sequenced by its own (and very talented) community.

Another key source is Zophar's Domain, that contains ripped soundtracks from console games (NES, SNES, Sega, PSX, etc). Music from Sierra games comes from the legendary guys at QuestStudios. Finally there's VGMRips, a recent (and surprisingly good) discovery that holds an ever-growing database of VGM music. Everything else was ripped and tweaked personally by me either using an extractor tool or through DOSBox, like the Might and Magic 3 music or the intro song from HeroQuest. You gotta listen to those!

By the way, if you click over the name of the song that's playing, a window will pop up showing the source where the file was downloaded from, as well as the name of the company that holds the rights for the tune. I was able to get that information from TheGamesDB (via API) or MobyGames (by hand!).

Looks like you've put a lot of time into this...

You bet your boots I have! It's been a lot of fun, though. I hope you enjoy listening to Muki as much as I enjoyed building it.

What bank does the Soundfont-based MIDI synth use?

It actually uses a combination of different soundfonts, aiming to balance the highest possible sound quality with the lowest possible file size. Most of the patches come from the great Arachno soundfont, though.

I'm having trouble using Muki.

Rats. Did you check out the troubleshooting section? If you think you might have spotted a bug, please let me know.

Can I submit a new song?

But of course you can! Just shoot me an email and I'll be happy to add it, as long as it's a good rip and it's not already in the Muki database.

Where's the code?

I thought you'd ask. I'd like to make the player code available but it's an ugly mess as it is right now, so I need to do some housekeeping before I push anything up. It should be available soon on my Github account.

Is there something I can do to help?

Of course! Spreading the good word on Twitter, IRC or your BBS would be nice. Helping me pay for the server, CDN and domain would be even nicer, and might even grant you access to The Sign of Muki.

Regardless of the amount, this is probably the strongest way of telling me to keep on putting hours in Muki and not to give up. (And yes, The Sign of Muki is Something that Exists. But only few have seen.)

Can I use something from Muki on my site/project/etc?

Sure, help yourself. Remember though that most of the songs aren't mine, so I'm not the one to ask for permission.

What's the logo supposed to mean?

It's an acorn. The magic acorn that hit me in the head.

And what about the name?

It's a long story. Here's the short version: it's what you get if you combine the words "music" and "midi", and divide them by "monkey". You can give it a try.

Ok, I'm out of questions. Anything else?

Yes! I'd like to thank everyone who directly on indirectly helped in making this possible. Kudos to the libTiMidity developers, to the people that made Munt possible (way to go guys!), to the OpenMPT, the Highly Experimental and the Chiptune2.js projects, and to Kode54 for his great work on GME and the nifty trick he pulled on Munt (Super mode). And last but not least, I should thank everyone in the game music community that has contributed their rips, their tweaks and their arrangements to the sites I mentioned above. Thanks for making this possible, and for helping keep sequenced music alive.