HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
feross
timidity
Shell2018–2023
feross / timidity

timidity

Play MIDI files in the browser w/ Web Audio, WebAssembly, and libtimidity

2Distinct people
5Mentions
0Explicit recommenders
406GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Play MIDI files in the browser w/ Web Audio, WebAssembly, and libtimidity

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2018-08-09 00:19:39 UTC to 2023-12-21 18:21:12 UTC.

01232018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

5 sources
Nice work! I am working to improve the MIDI playback quality on my MIDI archive website, BitMidi (https://bitmidi.com), and I think this might help. The main difficulty with a web-based MIDI player like BitMidi is that it's not feasible to force the user to wait for a 300+ MB SoundFont to download before starting in-browser playback. The current format I use ("patch" files) has a separate file for each instrument, so I can lazily load only the necessary instruments needed to play a single song. You can see the approach I use here: https://github.com/feross/timidity Anyway, excellent work on this SoundFont!
In FatBoy SoundFont
A 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
Read the rest
my efforts are available in the npm package 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.
In Show HN: BitMidi – Wayback machine for old-school MIDI files
Hey HN, site author here! So, the context for this site is that I was reminiscing about the days of Geocities and Angelfire, back when the web was quirky and fun. I remembered how sites used to use the <bgsound> tag to include an autoplaying background MIDI file. Those files had such a nice, old-school aesthetic. I wanted to hear some MIDIs, so I searched and found a .zip file with 100K+ MIDI files that someone posted to Reddit. I tried playing a few in Chrome, Firefox, Safari, etc. and then realized that they've all dropped the <bgsound> tag. Even Quicktime and VLC couldn't play back the files.* There were some websites that could convert MIDI to low-quality MP3, and technically Apple still offers Quicktime 7 for download which can play MIDI, but it wasn't easy or fun to do. Some websites offered inline playback with Flash (but it was fl
Read the rest
aky and hard to get working in Chrome), and the JS-based ones were missing many instruments or multi-MB Emscripten-compiled monstrosities! I decided that I'd compile the best MIDI player written in C (libtimidity) to WebAssembly and put in lots of effort to optimize the bundle and include the minimal amount of code. The result of that is here: https://github.com/feross/timidity It's quite lightweight - just 34 KB of JavaScript and 23 KB of lazy-loaded WebAssembly. Then I put a frontend on it, so it's easy to browse that .zip file's contents. And that's BitMidi. I plan to ingest a lot more MIDI files in the future, perhaps from the Geocities MIDI archive on the Internet Archive. Feedback welcome! * I later learned that VLC can actually play most MIDIs and I just got unlucky with the few I tried! That's okay though – I got to learn a lot about MIDI files, Emscripten, WebAssembly, and modern front-end web techniques. And I made a cool site too :)
In Show HN: BitMidi – Wayback machine for old-school MIDI files

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.