7 ms·
Show HN: BitMidi – Wayback machine for old-school MIDI files
- feross 8y agoHey HN, site author here! I was asked to repost this by the HN mods (read about the second-chance queue: https://news.ycombinator.com/item?id=11662380 https://news.ycombinator.com/item?id=11662380). --- So, the context for this site is that I was reminiscing about the days of Geocities and Angelfire, when the web was quirky and fun. In those days, sites often used the <bgsound> HTML tag to include an auto-playing song in the background of a page. Usually the song was in the MIDI file format. It’s hard to describe MIDI files if you’ve never heard them before. The MIDI aesthetic is synth-laced, nostalgia-inducing, old-school, and endearing. It’s mixed up with the first DOS video games I ever played and the first websites that I visited as a small child in ‘95 and '96. A textual description can’t adequetly capture the feeling of listening to a MIDI. I was surprised and sad to learn that all major web browsers have removed MIDI file support. Perhaps this happened at the same time that the <bgsound> HTML tag was removed? This explains why I haven’t heard a MIDI in many years! So, I really wanted to play a MIDI file. When I searching the web for a MIDI websites, I discovered that existing websites were quite disappointing. It was difficult to find a site with a decent user experience. Almost all the top sites were unmaintained or broken in various ways. Most sites could not play back the files directly in the site, requiring them to be downloaded and played in an external program instead. Quicktime also dropped support for MIDI when Quicktime X was released in 2009 which inconvenienced many musicians and probably stopped many users from playing back (or discovering!) this wonderful file format. Technically, Apple still offers Quicktime 7 for download, which can play MIDI. But it’s a 32-bit app so it will likely stop working once the macOS version after 10.14 Mojave is released. Also, embarrassingly, the Quicktime 7 download link uses insecure HTTP! Even the venerable VLC failed to play back the MIDI files I threw at it. (I later learned that VLC can actually play MIDIs and I just got unlucky with the few I tried, hah!) There were some websites that could convert MIDI to low-quality MP3, and some sites offered inline MIDI playback using Adobe Flash, but they were flaky and impossible to get working in Chrome. Other websites implemented MIDI players in JavaScript, but they were usually missing instruments or extremely ineffecient multi-megabyte cross-compiled Emscripten libraries. I eventually found a .ZIP archive with around 100,000 MIDI files. I wanted a way to search through them and share the best ones with friends. So I decided to build a site to address the shortcomings of existing MIDI sites. And that’s BitMidi. A free way to browse and play MIDI files! Feedback welcome!
- feross 8y agoA bit more info about how BitMidi is built... First step, I needed to build a MIDI player in JavaScript. At first, I was determinted to write one from scratch in JavaScript and use the Web Audio API to synthesize all the instruments in code. I thought this would yield the the smallest possible JavaScript file size. However, I didn’t really have the audio engineering skills to pull this off. So ended up settling for an approach that uses SoundFonts, which are basically instrument voices or files that contain all the possible notes an instrument can play. BitMidi uses the instrument voices from the General MIDI sound set released by FreePats. Then I compiled the best MIDI player written in C (libtimidity) to WebAssembly using Emscripten. I put in lots of effort to optimize the built size and include the minimal amount of code. The result of my efforts are available in the npm package timidity (https://github.com/feross/timidity https://github.com/feross/timidity). It’s quite lightweight – just 34 KB of JavaScript and 23 KB of lazy-loaded WebAssembly, smaller than anything I’ve seen on any other site. Then I put a frontend on it, so it’s easy to browse all the files. BitMidi uses all the best techniques that I know about to make it super fast and snappy. The site gets perfect 100s on all categories on Chrome’s Lighthouse Performance benchmark, which is extremely non-trivial in my experience. I plan to ingest a lot more MIDI files in the future, from sources like the Geocities MIDI archive on the Internet Archive and elsewhere.
- j0wy 8y agoAwesome job - I’m about to cry from the memories this brings back. I really appreciate the effort put into porting a proper MIDI player to the browser while keeping page optimization in mind. Dragging and dropping to play a midi is a great touch!
- feross 8y agoIt's heartwarming to get feedback like this. Thank you for this.
- coding123 8y agoThat's a pretty amazing technical feat!
- Kim_Bruning 8y agoCurrently site seems to have errors: Error – this._lib is undefined Error – HTTP request error. JSON.parse: unexpected character at line 1 column 1 of the JSON data
- feross 8y agoAre you by chance using an older iOS or macOS release? Since this is a hobby project, I decided to make BitMidi have extremely aggressive browser requirements. You must use an evergreen browser (Chrome, Firefox, Opera, Brave, etc.) or the latest version of Edge or Safari. Specifically, the feature you're probably missing is URLSearchParams with a spec-compliant toString() method, which I believe only the latest versions of Safari and Edge have, despite what Can I Use says. https://caniuse.com/#feat=urlsearchparams https://caniuse.com/#feat=urlsearchparams
- Kim_Bruning 8y agoOn this machine I'm using Firefox-ESR (Extended Support Release) on Debian Stable. That's conservative on top of conservative; quite the opposite of what you are targeting! I have limited grounds to complain then (short of quoting Postel's law) . Hope you continue to have fun :-)
- feross 8y agoAhh, that explains it. I'm sorry for the inconvenience. All I can say in my defense is that it was more fun to build the site using new features and because it's a new site I'm not dropping support for any existing users, just missing out on some news ones like yourself ;) I expect the next version of Firefox ESR will have the necessary features to make the site work for you. Cheers!
- vortico 8y agoReally cool! Do you offer collection archives for download, for distributed archival purposes? It seems like this archive (https://www.reddit.com/r/WeAreTheMusicMakers/comments/3ajwe4/the_largest_midi_collection_on_the_internet/ https://www.reddit.com/r/WeAreTheMusicMakers/comments/3ajwe4...) has more.
- feross 8y agoThat zip file is actually the one I mentioned in my comment here (https://news.ycombinator.com/item?id=17930684 https://news.ycombinator.com/item?id=17930684). It was the initial seed for the site. They actually had quite a bit of duplication that I removed by using content hashing. I'll consider adding a big "download archive" button. Just curious: do you have any immediate plans for the archives, or just want to keep a copy for backup purposes?
- vortico 8y agoArchival is a weird animal that doesn't behave like other things in tech. It's like scrapbooking. It doesn't have to be perfectly organized or available online. The archivist just has to be extremely consistent throughout his or her life, in order to make the files last for 50+ years, to be passed down to another extremely consistent person, and so on. Imagine WWI photos. In 1920, why would anyone keep those around? They had no message to portray, it was just a horrible recent event that you'd be called weird for trying to keep. Yet the few people in the chain of ownership were important for piecing together the photographic history we know today. MIDI files are somewhat similar. Only a small population care, an even smaller population care a lot, but archivalists shouldn't be the one to determine to keep them around for 200 years. They just should, and forget it. So yeah, that's pretty much what I do.
- david_ar 8y agoAn option to download the archive would be great, just because it's always good to have an offline copy. Any chance you could also add the ability to upload new MIDIs to the collection?
- joshypants 8y ago
- cindywu123 8y agoi love this website so much
- feross 8y agoThanks Cindy
- lalos 8y agoReminded me of the first customizable ringtones, thanks :)
- gugagore 8y agoMy favorite MIDI player back in the day was http://www.vanbasco.com/ http://www.vanbasco.com/ It had controls for transposition and tempo. It had visualization of the individual tracks, ability to mute and solo individual tracks The site also contains a search engine for MIDI files, but most of the links are dead these days.
- mysterydip 8y agoI used to play MIDI files on my windows 3.1 machine, so this is great nostalgia. The quality was dependent on the instruments available on the soundcard. It wasn't until years later that I realized the "real" version of a song I had listened to sounded very different to what I knew!
- SmellyGeekBoy 8y agoI remember discovering mod files, just before MP3 became a thing. Absolutely blew me away what some people achieved with that format. I remember having a version of Snap's "Rhythm Is A Dancer" which was virtually indistinguishable from the CD and yet only a few hundred KB.
- redonkulus 8y agoThe tricky part with the 100k downloads is that you do not have all the meta data for each file. You just have the filename, so some are just called “index.mid”. Which I guess is nice for a random surprise when you play it. My shameless plug is my old MIDI site called MIDI Delight. I had user registration, ratings, comments, top 10 lists, etc. I always wanted to get it working again like you did. It would be cool to see more user features added on your site. I’m glad there is a new MIDI site carry the torch.
- feross 8y agoI'm interested in finding ways to better organize the MIDI files. I'm curious how you figured out which category to put each MIDI file in on your website. Was that done manually by you?
- redonkulus 8y agoYup I had a whole UI to add the MIDI’s and apply a genre. Plus I would get the time and size etc from the file when I uploaded it. Much of it was manual. Also the reason why I never got to 100k :(
- JTxt 8y agoExactly I wanted to hear doom soundtrack music but "doom" did not work. https://bitmidi.com/search?q=doom https://bitmidi.com/search?q=doom I had to dig more to remember the level format and search for https://bitmidi.com/search?q=E1m4 https://bitmidi.com/search?q=E1m4 Perhaps a crawler can find the identical file (checksum/md5) and collect meta data: alternate filenames, urls, zip archive names... It was next to this file in this list/zip archive... And in this sub folder name, on this page on this wayback machine link... So associations can be built automatically? Also for each unique checksum with listed alternate file names, Perhaps user content: ratings, similar files, comments... A wiki like page where the automaticly generated meta data can be vetted... Oh and suggested sound font and other settings to play that particular file maybe. Fun challenge! BTW https://bitmidi.com/search?q=E1m1 https://bitmidi.com/search?q=E1m1 crashes it for me. It's cool you can drag a file on it to play. Except on mobile, so perhaps the ability to play from url. Awesome work, thanks! Looking forward to seeing where this goes.
- Mizza 8y agoThank you, Feross! I can confirm that this sounded exactly the way it did when I last heard it in the pre-Napster days: https://bitmidi.com/sublime-wrong-way-mid https://bitmidi.com/sublime-wrong-way-mid Any chance of getting customizable soundfonts? Me and Ben already compiled a few here: http://gleitz.github.io/midi-js-soundfonts/ http://gleitz.github.io/midi-js-soundfonts/
- feross 8y agoThat's a cool idea! I'm currently using the FreePats soundfont (https://freepats.zenvoid.org/ https://freepats.zenvoid.org/). I'm curious which soundfonts you'd like to see? What are other, better-sounding choices?
- Mizza 8y agoThe "Fluid" pack which ships with MuseScore and "Musyng Kite" pack which is just found online are both Freely licensed and sound "better" in karaoke-parlor kind of way (though personally I think I prefer the MIDI sound you have now, which is a bit closer to how I remember it sounding before my dad invested in a SoundBlaster card.) Having options for the overall playback sound is one of the cool features of MIDI though.
- muglug 8y agoThis is incredible. Could you add ratings and/or play counts?
- feross 8y agoI already have play counts! Just go to any MIDI page and you'll see it right there at the top. Example: https://bitmidi.com/theme-from-beauty-and-the-beast-walt-disney-mid https://bitmidi.com/theme-from-beauty-and-the-beast-walt-dis... But ratings is a great idea and I plan to add it.
- mullikine 8y agoMIDI is making a comeback. I still think the 10,000 midi files torrent is bang for buck. Something for the zombie apocalypse survival kit
- culot 8y agoThe entirety of 20th century music on a single 3.5" floppy disk. It doesn't get any better than that.
- Mizza 8y agoI have uncovered a bug in Firefox with this! Playing a MIDI file, then playing another MIDI file, then playing _another_ MIDI file, causes the "Mute Tab" feature to break. The icon disappears and right-click-Mute-Tab no longer works easier. Can somebody else confirm? Firefox 61, latest OSX.
- feross 8y agoConfirmed! This happens for me too. Want to file the bug?
- Mizza 8y agoDone, thank you for confirming. https://bugzilla.mozilla.org/show_bug.cgi?id=1489375 https://bugzilla.mozilla.org/show_bug.cgi?id=1489375
- feross 8y ago> There is now no way to stop the sweet, sweet sound of 90s MIDI. I kind of hope this bug never gets fixed now.
- SmellyGeekBoy 8y agoYou can't stop rock 'n roll!
- ReverseCold 8y agoJust tried it out, same issue. (Also on Firefox 61/OSX 10.13).
- FrozenVoid 8y agoNo one mentioned https://vgmusic.com/ https://vgmusic.com/ ? My favorite site for videogame midis.
- werber 8y agoNo sound on iOS
- feross 8y agoIt works on iOS. You may need to just wait a bit longer, as the instrument files need to load to play back the song and there's currently no UI to indicate that loading is still happening.
- joshypants 8y agoFlip the button to turn your ringer on.
- dtjohnnymonkey 8y agoAwesome! The downside is that I couldn't find the MIDIs that come with Windows 95 like Claire De Lune. The upside is that I found these gems while searching for them: https://laughingsquid.com/windows-95-startup-sound-on-accordion/ https://laughingsquid.com/windows-95-startup-sound-on-accord... https://musicthing.blogspot.com/2005/05/tiny-music-makers-pt-2-microsoft-sound.html https://musicthing.blogspot.com/2005/05/tiny-music-makers-pt...
- SmellyGeekBoy 8y agoHa! You just reminded me of canyon.mid and passport.mid from Windows 3.1. Good times.
- khazhou 8y agoMy all-time favorite MIDI, circa 1996-98: http://gamma.nic.fi/~rikuh/main/music/Girl%20from%20Ipanema.mid http://gamma.nic.fi/~rikuh/main/music/Girl%20from%20Ipanema.... Can you add it? :-)
- purplezooey 8y agototo-africa.mid good times.
- joshypants 8y agoAmazing work. I wanted to do something with that same archive you mentioned but soon realized how difficult it would actually be. One idea I thought of that might still be useful - would it make sense to alter midi file playback so it uses only a reduced set of instruments? ie if something is asking for steel drum, just play that part on piano. Would that limit soundfont filesize?
- feross 8y agoYes, this would definitely reduce the SoundFont size but it would make multi-instrument songs sound pretty awful!
- joshypants 8y agoYeah but let's be real, part of midi's charm is its awfulness
- speps 8y agoAlbino Black Sheep had a ton of very good ones back in the mid 00's: http://web.archive.org/web/20050301075002/http://www.albinoblacksheep.com:80/audio/ http://web.archive.org/web/20050301075002/http://www.albinob... They don't seem to work anymore but I would love to hear some of those again.
- bartread 8y agoI can download the midi files but I can't seem to get anything to play directly on the site. The play button is simply non-functional piece of text with an icon next to it. This is in Chrome 68 on OSX.
- dvfjsdhgfv 8y agoI'm waiting for a Gravis Ultrasound version, might be awesome! For a quick comparison of "old-school" MIDI files played on (equally old-school) sound cards: https://www.youtube.com/watch?v=figScJtkQk8 https://www.youtube.com/watch?v=figScJtkQk8
- mhd 8y agoIf I recall correctly, timidity (the player used here) can support GUS patches. So it shouldn't be that hard…
- sgt 8y agoI wish this would be synthesized the way the Roland MT-32 would play it. IMHO that's how MIDI should sound like. Check out the 8-bit guy showing the capabilities of MT-32 compared with PC speaker, Adlib / SB: https://youtu.be/BMmFcs-_4x4?t=249 https://youtu.be/BMmFcs-_4x4?t=249 Lean and back and enjoy. It's mind blowing.
- petercooper 8y agoIs anyone familiar with something like this but for MOD/tracker style music? I've downloaded quite a few and play them locally but it's hard work and fiddly.. it'd be awesome to just play them on the Web :-) (Actually, I guess, sadly, just rendering tracker files to MP3 en masse and playing those would be easier.. if less cool technically.)
- crtasm 8y agoI think you could set your browser to immediately open the downloaded .mod/.it/etc in VLC or some other player? I found my old collection of downloaded + self created MODs recently, some fantastic stuff in there while mine are amusing in their mediocrity :-)
- WillKirkby 8y agoThere's https://modarchive.org/ https://modarchive.org/ though it seems they're having some server trouble at the moment. Definitely worth checking out when it's back up though.
- dmd 8y agoWhen I try to play anything I get: You just blew our server's mind Error – play() called after destroy() This is in Chrome 68.0.3440.106.
- ssharp 8y agoMidi files were such a joy in the '90s! I remember when I would get a new computer or upgrade sound cards, one of the first things I'd do was play some midi's to see how they sounded. At some point, I got a Yamaha keyboard for a gift and it happened to have a midi interface. With that, I could play my midi files through the keyboard, which sounded so much better than what the sound card could do. The keyboard also featured LED's above each key and you could isolate a midi channel to see what notes were being played. It was such a neat way to learn songs. I actually still use midi files today if I want to do things like analyzing the chords or harmonies of a song, or if I'm learning it on guitar and a midi file is available, I can use it and easily do things like slow the track down, learn the parts, and then gradually speed it up. Some of the midi's produced for popular songs are also very well done (although some are pretty bad!). If you're into music production, you can easily import them into your DAW and assign the channels to high-quality plug-ins and have something that actually sounds close to the real recording. Although it's understandable why midi's days as a consumer music format are over (it was never meant to be that, anyway), it's somewhat a shame since there aren't a ton of midi files out there for songs after 2000 or so.
- deleted 8y ago[deleted]
- TruthSHIFT 8y agoHi, feross. This is great and you're great. Before this, I was importing my Midi files into Garage Band (which doesn't work great.) Thanks!