
Let's build an MP3-decoder (2008) - userbinator
http://blog.bjrn.se/2008/10/lets-build-mp3-decoder.html
======
Siemer
Ever since reading "How music got free" by Stephen Witt I get a bit annoyed
with the MPEG team getting credit for "creating" the mp3. They did more to
kill it than to support it.

~~~
fwdpropaganda
Link?

EDIT:

[https://www.amazon.com/How-Music-Got-Free-
Obsession/dp/01431...](https://www.amazon.com/How-Music-Got-Free-
Obsession/dp/0143109340)

[https://www.nytimes.com/2015/07/26/books/review/how-music-
go...](https://www.nytimes.com/2015/07/26/books/review/how-music-got-free-by-
stephen-witt.html)

------
sp332
Now that the patents have expired, let's make an MP3 _encoder_!

... I have no idea how to do that. Even a toy one.

~~~
opencl
[http://mp3-tech.org/programmer/encoding.html](http://mp3-tech.org/programmer/encoding.html)

Source code for a lot of early encoders is available to study. Probably easier
to understand than the modern implementations. LAME started out as a set of
performance patches against the ISO sources until eventually being rewritten
from scratch.

Toy MP3 encoders are not horrifically complicated, though ones that sound
decent are. It's astonishing how much improvement there's been over the past
few decades even with the same underlying format, modern 128kbps MP3s don't
even make your ears bleed.

~~~
sp332
Thanks for the link. I think there's a lot of room for experimental, artistic,
or even scientific specialty encoders. There's so much flexibility in picking
out what's "important" in a signal.

~~~
exikyut
The way you worded that immediately made me think of glitch art, particularly
GIFs, and particularly situations where the glitch aligns perfectly with the
content.

~~~
sp332
This is the post that got me thinking about it recently
[https://news.ycombinator.com/item?id=16034547](https://news.ycombinator.com/item?id=16034547)

------
bluedino
Here's an old list of Mp3 decoders:

[http://mp3decoders.mp3-tech.org/decoders.html](http://mp3decoders.mp3-tech.org/decoders.html)

It's amazing how terrible some of them were back then. I had probably 5
different players on my system because certain files would only play with
certain players, encoding and decoding was such a mess back then.

------
akhilcacharya
This is really cool! I've never seen an article that uses Haskell for a real-
world task like this, are there any others?

~~~
jraph
Pandoc ([http://pandoc.org/](http://pandoc.org/)) is written in Haskell and
converts documents across formats.

~~~
aepiepaey
Pandoc is great!

...except if you want to batch convert real-world markdown.

Though admittedly, that's mostly because markdown designers thought allowing
embedding of arbitrary HTML was a good idea.

(The best you can get is by going: markdown -> HTML -> $target_markup.)

~~~
Tomte
The ability to embed arbitrary HTML is an intentional feature of Markdown.

~~~
KMag
aepiepaey agrees with you that it's an intentional design decision ("thought
... was a good idea"), and his/her use of past tense also implies that s/he
disagrees with the decision.

------
kefir_cultist
Never ceases to amaze me how complicated digital audio processing seems
compared to analogic. A very nice article —and blog —.

~~~
jxub
Got any resources for analog signal processing?

