ode to radio

denpa - the official no illegal emission mascot of Japan

Earlier this week, I completely overlooked time zones when I set out to record online radio using my remote server. My Debian server is set in UTC and I put all of the times in my crontab (scheduler) in local time, therefore missing everything I wanted to hear. I feel like a donut for taking so long to notice, but I might as well take this teaching opportunity to detail a use for computer scheduling that I haven’t seen documented anywhere else and that you could benefit from.

As you may know, I’ve been going out of my way recently to find new music, especially in lieu of social media and the mysterious Algorithm. One avenue I chose to take was local radio. The idea is simple: use my computer as a VCR of sorts to record local music programs that air at odd hours for later dissection.

I’ve always had an affinity towards information being beamed across the sky, and am eternally grateful and nostalgic for the lazy summer days I spent at the mercy of whatever our corporate overlords chose to broadcast over the air - music, cartoons, sitcoms, news, etc. Therefore, while I continue my mission to finally grow up and avoid mindless consooming product (YouTube, social media feeds, TV shows), I can’t help but feel that there is still merit in what small scale producers have to offer as opposed to the top 3 federated, commerical companies, akin to the difference between open source and proprietary software.

Therefore, I got to work researching who owns what in my area and eliminated any stations that met the following criteria:

That got rid of most of them, and the remainder ended up being college stations on the non-commercial band (88-92 MHz), and in turn, only a few of those had focused, thematic programming (bebop, salsa, J-pop, baroque). At the end, I chose 5 or 6 of those segments and got to work putting them into cron syntax.

As an example, this entry will record city pop on Sakura Radio on Tuesdays and Wednesdays from 9pm to 10pm and use the date and time as the title (notice how the percent signs are escaped with a backward slash). I am transcoding to 32 kbps Opus because I am going though the added barrier of my remote server and its bandwidth/storage limitations. I don’t have internet at home, so I sync them to my laptop when I’m on public or university Wi-Fi. 32k is the most bang for your buck when it comes to open source fullband stereo sound, but feel free to -acodec copy to avoid quality loss.

0 21 * * 2,3 /usr/bin/ffmpeg -i 'https://streamer.radio.co/s5d7f2937d/listen' -t 01:00:00 -c:a libopus -b:a 32k "/root/radio/sakura-$(date '+\%y\%m\%d-\%H\%M').opus"

In the future, I might eliminate a few programs to prevent backlogging myself, but for now, I’m excited to explore the sounds of the local metropolis while I’m still here. I’m aware that I am no longer limited to stations within line of sight thanks to the magic of the internet, but I’d prefer to keep a 1:1 correspondence with reality, to pay it forward to those who choose to persevere in the dying art of radio.