/dev/audio
somethingemporium.com
somethingemporium.com
$ sleep 28800; while :; do cat /etc/termcap; done >/dev/audio
I found that termcap had just the right mix of structure and randomness to make an annoying noise that was really hard to sleep through.Another classic was:
$ ping -f hostname >/dev/audio
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!Or vice-versa. Not sure what systems it'd still work on, but it was a lot of fun on pre-Solaris SunOS machines.
ssh otherbox cat /dev/dsp > /dev/dsp
should work on a Linux system with OSS emulation enabled. Or, if you have alsa-utils installed on both systems: ssh otherbox arecord -D plughw | aplay -D plughw $ yes hacker news >/dev/audiohttp://everything2.com/user/mcc/writeups/catting+weird+thing...
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.
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.
That always amused us, and sure was useful.
shell32.dll: http://www.youtube.com/watch?v=mqNLuunxp0o itunes.exe: http://www.youtube.com/watch?v=iY-lJrX2VD0&;
There's a site to try your own at: http://wurstcaptures.untergrund.net/music/
Sigh. The days of being able to spit sounds to a char device are basically over. We have more powerful software now with far more capability. And that kind of sucks, sometimes.
For example: sudo cat /dev/mem | `padsp tee /dev/audio` >& /dev/null
The /dev/audio device on SunOS 4.1 was a clean design (albeit one that solved a much simpler problem). That sanity wasn't preserved in the march to modernity, and it sucks.
I mean, it's not as clean as things were, but we've come a long way since then in terms of features so obviously simplicity is going to suffer. Worth the trade off, in my opinion :)
Example: `cat /dev/urandom | pacat`
cat /dev/urandom | sox -traw -r44100 -b16 -u - -tcoreaudioI don't think there's a built-in method to play raw audio like this.
brew update
Fixed all my ills.cat /dev/audio > record.au
Here you will get Sun .au, which is mulaw IIRC.
/dev/dsp is different.
EDIT - after a quick google search, here are some details on the encoding difference : OSS has three kind of device files for audio programming. The only difference between these device files is the default sample encoding used after opening the device. /dev/dsp uses 8 bit unsigned encoding while /dev/dspW uses 16 bit signed little endian (Intel) encoding and /dev/audio uses logarithmic mu-Law encoding. There are no other differences between the devices. All of them work in 8 kHz mono mode after opening them.
http://en.wikipedia.org/wiki/Open_Sound_System
I'm fairly happy using the OpenAL API instead to generate audio cross-platform at the moment.
https://github.com/caoilteguiry/dev_music
Explanation of how it works is pretty scant at the moment, I'll try to expand it a little when I get a chance.