radio streams for an alarm clock function

So a long time ago, I realized that I wake up better with music helping me along. But the last year or so I’ve been using my cell phone as an alarm clock (’cause it’s always on a charged battery and has good clock synch).

Yesterday I tried the music thing again, using an at-job ( at(1p) in the man pages) and mpg123, and it worked great. But pre-selecting a track is sorta lame, so I thought “maybe I can do a shuffle thing, using my old radio scripts” — until I realized that that’d require both work and more metadata-parsing, which I don’t feel like doing ’cause I need to wake up in 7 hours. So I thought “radio stream!”

So I grabbed a PLS from one of the most salient radio stations I could think of, and tossed mpg123 at it. Of course, it didn’t work. So I tried tossing the stream url itself at it, and it didn’t work because the stream’s aac+. Bleh.

Then I tried mplayer … ’cause mplayer’s natively command-line. And it worked from the console, so I thought things would be good. Then I put it in a test at-job, and it didn’t fire off, because while mplayer’s natively a console app it’s also natively interactive. So that was out, unless I launched it in screen… but that would just get complicated.

Then I remembered. mpg123 is a very unixy tool (as opposed to linuxy). So I built mpg321, and tried with that. SUCCESS!

So there you have it: if you want to listen to radio streams from at-jobs, remember mpg321!

And in 7 hours and 5 minutes, my at job will go off after an initial alarm clock ring, and I’ll drag myself up and go fight traffic down to my new job!

2 Responses to “radio streams for an alarm clock function”

  1. spazzium Says:

    So you’re back to linux for your main desktop huh? Gentoo I assume? Running any cool desktops with acceleration yet?

  2. complich8 Says:

    nah, windows is still the main… mkv playback is still craptacular on linux, still no mirc, and lots of other minor ui gripes keep me from switching. I’ll probably have a windows desktop at least until XP goes unsupported.

    But yeah, my new fileserver also functions as a secondary desktop, ’cause the old northwood’s a bit too slow to handle 720p h264 at high bitrates.