That reminds me of a couple tricks I used to use in the old days. As an alarm clock I'd do:<p><pre><code> $ sleep 28800; while :; do cat /etc/termcap; done >/dev/audio
</code></pre>
I found that termcap had just the right mix of structure and randomness to make an annoying noise that was <i>really</i> hard to sleep through.<p>Another classic was:<p><pre><code> $ ping -f hostname >/dev/audio
</code></pre>
When you have zero packet loss, "ping -f" would generate an endless sequence of '.' and '\b' characters, resulting in a constant tone. When there is 100% loss you only get the '.' characters and the sound will stop. In between, you'll get a progressively noisier sound. Then just turn the speakers on your SPARCstation all the way up and crawl around the lab, flexing the 10base2 cabling until you find what segment is causing that irritating intermittent problem!
We had a lot of fun with this in University 20 years ago. Our computer lab had a handful of shiny new Sun Sparcstations. The freshmen would regularly end up hogging them (no timelimit) and we needed them for project work, so we'd just remote login to them and cat some pre-recorded messages out to /dev/audio. A very official-sounding "Please log out now, system going down for maintenance" usually worked wonders, although occasionally more serious messing with people's minds was done. Some of the 1st year students had literally no idea what a computer was capable of and would believe anything that came out of its speakers. :D
From July 19, 2000: "Catting weird things to /dev/audio"<p><a href="http://everything2.com/user/mcc/writeups/catting+weird+things+to+%252Fdev%252Faudio" rel="nofollow">http://everything2.com/user/mcc/writeups/catting+weird+thing...</a><p>The eleven-year-old MP3 link in this article is dead, of course. I probably still have the files on a hard drive somewhere, but they're exactly what you would expect: weird looping noise.
Only mildly related, but I have fond memories of my friend and I needing to wake each other up at different points in the 90's, and we had our neat-o Linux boxes next to our beds, and we would create loops that would echo ^G's to a tty on the console.<p>But if you sent them too fast the sound would completely cease, so we would have to put a sleep 1 in the loop to make a nice consistent beep-beep-beep-beep, etc.<p>That always amused us, and sure was useful.
I found people had posted audio interpretations of binary files on YouTube.<p>shell32.dll: <a href="http://www.youtube.com/watch?v=mqNLuunxp0o" rel="nofollow">http://www.youtube.com/watch?v=mqNLuunxp0o</a>
itunes.exe: <a href="http://www.youtube.com/watch?v=iY-lJrX2VD0&" rel="nofollow">http://www.youtube.com/watch?v=iY-lJrX2VD0&</a>;
Probably been posted before, but this reminds me of this rather awesome article about one-liner algorithms outputting to /dev/audio to create some really quite cool "compositions": <a href="http://createdigitalmusic.com/2011/10/entire-musical-compositions-made-from-just-one-line-of-code-are-glitchy-but-musical/" rel="nofollow">http://createdigitalmusic.com/2011/10/entire-musical-composi...</a><p>There's a site to try your own at: <a href="http://wurstcaptures.untergrund.net/music/" rel="nofollow">http://wurstcaptures.untergrund.net/music/</a>
Related from HN a few years ago: <a href="http://news.ycombinator.com/item?id=564568" rel="nofollow">http://news.ycombinator.com/item?id=564568</a> (not a dupe, but extra awesome stuff on the same topic)
I believe this is specific to OSS, which was deprecated after it went closed source for a bit and ALSA replaced it:<p><a href="http://en.wikipedia.org/wiki/Open_Sound_System" rel="nofollow">http://en.wikipedia.org/wiki/Open_Sound_System</a><p>I'm fairly happy using the OpenAL API instead to generate audio cross-platform at the moment.
A while ago I did a bit of reverse-engineering on this and figured out how to get it to play music.<p><a href="https://github.com/caoilteguiry/dev_music" rel="nofollow">https://github.com/caoilteguiry/dev_music</a><p>Explanation of how it works is pretty scant at the moment, I'll try to expand it a little when I get a chance.