Music in the library
October 30, 2018 at 9:03 pm #31209
After reading about people managing to pack videogames into one page I’ve thought about doing the same with music. Now I need to disappoint you all first, as we can’t even fit one second of okayish quality .mp3 audio on a page (128 kb/s), so instead I went for a different way of storing music (in this case instruments): the midi format.
Happy Birthday as a midi file only needs 480 bytes of space, which is roughly one third of a page and thus isn’t in need of preprocessing through compression.
By using HxD (shoutout to Delengroth for recommending it; can be found here: https://mh-nexus.de/en/hxd/) and subsequently making the hex data suitable for the library using Delengroth’s conversion of
0 – G
1 – H
2 – I
3 – J
4 – K
5 – L
6 – M
7 – N
8 – O
9 – P
we can now find the page through the search function, which I have bookmarked here: https://libraryofbabel.info/bookmark.cgi?happy_birthday:4
In order to be able to listen to the song, you need to replace the letters from h to p with the numbers as mentioned above in your text editor of choice and then create a new file in HxD. You then just paste the text into the hex part of HxD and save the file as a .midi or .mid.
Currently I’m tinkering with ways to compress larger midi files even further to allow them to fit on a single page, the limit, for 3 KB as well as for 21 KB .mid’s seems to be at 1.9-2 KB. Perhaps one could use the remaining characters from Q to Z as well as the space, comma and period to replace other pieces of hex data (there’s a lot of 00’s in the zipped files for example).
Tell me what you think.October 30, 2018 at 10:38 pm #31210
How will this help society? An idle mind is the devil’s workshop!November 2, 2018 at 12:54 am #31240
Hey, thanks for taking interest in that experiment I put out. I managed to recreate the midi file you posted, and it worked like a charm!
After reading your post, I tried to do the same experiment with a regular MP3, as I did similarly to an MP4 video file. However, after trying all of the same tricks I used then, I gave up after only managing to get a song down to 126KB for a 30 second portion of it. Any less than that, and it’s less of a song and more of a tune or jingle.
The only advice I can give is to use the highest level of compression available. If using WinRAR, just choose “Best” when making an archive. On that note, it might also be worth trying other compression formats such as RAR, 7Z, TAR, GZ, etc.January 7, 2019 at 4:11 am #36622
How do you go about getting hex data from a midi file?January 7, 2019 at 4:38 am #36624