It’s funny how you can use a technology countless times and the knowledge of how it works can still rank somewhere between very little and zero. In the spirit of taking things apart and in the interest of getting to know everybody’s favorite media format in more intimate detail, BjÃ¶rn EdstrÃ¶m dissected the MP3 format and created this most excellent manual for making your own MP3 decoder from the ground up.
Even though MP3 is probably the single most well known file format and codec on Earth, it’s not very well understood by most programmers – for many encoders/decoders is in the class of software “other people” write, like standard libraries or operating system kernels. This article will attempt to demystify the decoder, with short top-down primers on signal processing and information theory when necessary. Additionally, a small but not full-featured decoder will be written (in Haskell), suited to play around with.
This article reminded me of a bunch of Commodore 64 manuals I’ve been hanging on to. These are the 6 page user guides that came inside the box when you purchased something like a printer or a modem. Most of them, right on the back page, have a printout of driver code for the device. You would literally type in the source code off this single page, toss it in your own programs, and you’d understand exactly how the device worked from the moment you started using it.
I’ve got way cooler things than a 300 baud modem on my desk these days, and I can appreciate that I likely won’t ever have the same level of deep knowledge with these devices, not like I did with the stuff I played with in the 80′s. That said, it’s awfully illuminating to dig all the way down from time to time, to get familiar with the inner details of the technology you use every day.