it's all coming together
Catherine sent me this earlier today: Simpsons versions of the Battlestar Galactica cast.
Catherine sent me this earlier today: Simpsons versions of the Battlestar Galactica cast.
matty and his lady are a-heading to europe, and more specifically, florence, and he's asked for my input in the area. emboldened by my success in advising matt f. during his italy trip, i've put a massive amount of suggestions behind the cut for the beautiful city. feel free to chime in.
This is kind of fascinating. How do you design a warning sign for a nuclear waste repository that will remain dangerous for ten thousand years? How can you make that warning remain comprehensible and credible for twice as long as human civilization has existed?
Apparently you start by commissioning a government study that considers hazards like psychotic mining robots and an Amazonian anti-male dystopia. Then you pour a lot of concrete.
New project time. The SMS dealy should be released imminently — I just need to write the help system (and, uh, ignore a persistent bug and elusive bug). I should be able to wrap that up this afternoon.
I've got a new project in mind, though. For a while I've wanted to be able to pipe sound around the computers in the apartment more easily. The Linux server is connected to a pretty nice stereo system, but it's a headless unit. We tried using SliMP3 as a webserver-based MP3 jukebox for a while, but the latency was pretty irritating. And besides, I want to be able to pipe other kinds of audio around — streaming internet radio, youtube soundtracks, even mail notification beeps. And I'd like for the various computers in the house to be able to use it (not simultaneously, though).
There are various solutions to the problem of playing MP3s over a network, but I want something a little more universal and cheap. Ideally, it'd be an icon that sits in the system tray. Click on it and it turns green (or something) and all your sound starts magically coming out of a server connected to a set of nice, big speakers.
This page shows the outlines of a solution. It involves piping raw audio samples across a network to something that catches them and shoves them at the soundcard. There's no buffering, but that should be okay — I want realtime audio, so that everything stays as closely sync'ed as possible. If the wifi gets spotty and some samples get dropped from time to time, that's fine. I've managed to get a proof of concept variation on the article working:
On the server:
listen for incoming data on port 1234 and pipe it to the rawplay application
nc -l 1234 | rawplay
On the client:
convert an mp3 into raw audio samples
mpg123 -s somemp3.mp3 > somemp3.raw
print the raw data across the network to the rawplay instance on the server
cat somemp3.raw | nc <server's ip> 1234
This setup works decently — it sounds slightly weird, like the sampling rate is a tiny bit off and as if it has a weirdly flat frequency response. But I'm going to blame that on mpg123 for now. Unfortunately, this trick doesn't account for grabbing live audio off of your system — that's the hard part. But I think this example code, combined with SoundFlower and some OS X Sockets 101 (yet to be learned), should take care of that.
Justin gave a demo of OS X software development on Thursday that made everything look encouragingly awesome and easy. Ideally I'll be able to wrap everything up in a slick GUI package, then resurrect my .NET skills and build a Windows version. Construct a proper server (a few dozen lines of Python should do), throw in FLAC support to avoid wasting bandwidth, and I'd have a pretty neat app.
That's the plan, anyway. I'm sort of hoping someone will pipe up in comments and say "that's already been done, you can download it here".