Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

final vid needs Doctor Who music! hmm... I wonder how simple a MIDI file you could make to play something like that tune... and what that would look like as a RAW bitmap...


You can generate music with algorithms too. I came across this a while ago:

    echo "main(i){for(i=0;;i++)putchar(((i*(i>>8|i>>9)&46&i>>8))^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay
The generated a.out is 8.5kB for me though.


That sounds better than most of the pop music out there. Amusing demonstration of ... something!


Demonstration of using very few bytes of data to generate art. The same snippet of code can (very probably) be written as a < 128 byte ELF binary on Linux.


Of course, it gets linked in the standard way. A program with an empty main takes up about the same space. The point is that this snippet could be compiled very compactly with the right tools.


dude, that is awesome!

(although, I will now spend a good few hours working out how on earth you get the 16 bar repeats, with variations, and indeed the kick, from some crazy bitshift magic.)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: