Wednesday, May 20, 2009

Spring 2009 Loch Raven Review Now Live


The Spring 2009 issue of Loch Raven Review is now live. The issue features:

Poetry by Bob Bradshaw, Dan Cuddy, Dawn Dupler, Liz Gallagher, Bernard Henrie, Guy Kettelhack, Larry Kimmel, Andrea Potos, Casey Quinn, Doug Ramspeck, Paula Ray, Oliver Rice, Michael Salcman, Arthur Seeley, KH Solomon, and Ray Templeton.

Fiction by Stephanie King and John Riebow.

Five poems by Ernest Bryll translated from the Polish by Danuta E. Kosk-Kosicka and a story by Al Mahmud translated from the Bengali by Ahmede Hussain.

Christopher T. George interviews C.E. Chaffin and reviews Chaffin's Unexpected Light: Selected Poems and Love Poems 1998-2008, while Dan Cuddy weighs in on Stranger At Home, An Anthology: American Poetry With An Accent, edited by Andrey Gritsman, Roger Weingarten, Kurt Brown, and Carmen Firan.

As a taster for what's in the issue here is a powerful little poem by C.E. Chaffin:

Baby

It's 4:30 AM, pitch-black and cold.
I spoon against your body
wishing there were no cotton
to separate us, not even skin.

I want to crawl up your tunnel
and hide deep in your belly
before the sun exposes me.
Let me re-gestate, please.

Maybe this time it will be better,
maybe this time I won't end up
clinging to you like a life raft
in the shipwrecked night,
forty and terrified.

If you should wake
and want to make love
I may stay inside forever.

C.E. Chaffin

Monday, May 04, 2009

How to capture and record streaming internet audio in Linux

For this exercise, lame, sox and mplayer will be used to capture audio from the streaming internet feed of Washington, DC based radio station WMAL. First, save the following script into whatever bin directory you feel comfortable with under a name such as record.sh:

#!/bin/bash
#
# record.sh
#
# Use mplayer to capture the stream
# at $STREAM to the file $FILE
#
# example: record.sh my_radio_show 60 mms://someserver.com/stream

DIR=/home/jim/Music/PodCasts #directory where to save the file
TEMPDIR=/tmp

# Don't edit anything below this line
#######################################################
DATE=`date +%Y-%m-%d` # Save the date as YYYY-MM-DD
YEAR=`date +%Y` # Save just the year as YYYY
NAME=$1
DURATION=$2 # enough to catch the show, plus a bit
STREAM=$3
TEMPFILE=$TEMPDIR/$NAME-$DATE
FILE=$DIR/$NAME-$DATE # Where to save it

# Capture Stream
mkfifo $TEMPFILE.wav
mkfifo $TEMPFILE-silenced.wav

# The lame settings below are optimized for voice encoding
# The sox command below strips out any silent portions
lame -S -a -m m --ty "$YEAR" --vbr-new -V 9 --lowpass 13.4 --athaa-sensitivity 1 \
--resample 32 $TEMPFILE-silenced.wav $FILE.mp3 >/dev/null &
sox $TEMPFILE.wav -c 1 $TEMPFILE-silenced.wav \
silence 1 0.2 0.5% -1 0.2 0.5% >/dev/null&
/usr/bin/mplayer -really-quiet -cache 500 \
-ao pcm:file="$TEMPFILE.wav" -vc dummy -vo null \
-noframedrop $STREAM >/dev/null&

sleep 5
# get the pid of all processes started in this script.
PIDS=`ps auxww | grep $TEMPFILE | awk '{print $2}'`

# the & turns the capture into a background job
sleep `echo ${DURATION}*60 | bc` # wait for the show to be over
kill $PIDS >/dev/null # kill the stream capture
rm $TEMPFILE.wav
rm $TEMPFILE-silenced.wav


I wish I could claim this nifty little script as my own creation, but I found it somewhere on the internet and modified it to suit my own needs.

This script can be invoked using the command:

/home/jim/bin/record.sh Ric_Edelman 120 http://citadelcc-WMAL-AM.wm.llnwd.net/citadelcc_WMAL_AM

where the first parameter is the name of the radio show, the second the number of minutes to record and the third the URL of your favorite radio stream.

After testing to ensure everything works properly, it is time to set up the crontab entries for recording your shows. I use gnome-scheduler so I don't miss a show no matter what I'm doing:



The details of how one recording is set up:



Hope this proves useful.