Skip to content
Jun 20 / Mike Ward

Compose Music From Entropy in /dev/urandom

I used to do things like mess around with cat something > /dev/audio now and then, just to see what various non-media files sounded like (log files were kind of neat – there’s a lot of repeated patterns in there).

I even once started trying to make a shell script that would perform the Moonlight Sonata using just the beep command I didn’t get very far before exams or something came up, and I hit a slight roadblock because I had one computer in the room, and multiple voices for the music, and I just never got around to convincing other people in the office that this was worth the time to do. I can’t imagine why.

Neither of those things is as cool as this this recent blog entry I came across, where they use entropy from /dev/urandom to make music: Bash One Liner – Compose Music From Entropy in /dev/urandom. They even do a good job breaking down the parts of it to explain what exactly they’re doing.

One Comment

Leave a comment
  1. Jarrod / Sep 4 2016

    Haha I’m glad I’m not the only one that’s tried this! This was one of the first thing I tried years ago after I figured out I could pipe stuff into /dev/audio

Leave a comment