sox and remind alarm clock

sox console output

I’m long time user of remind, which by the way is excellent calendar,reminder and alarm program, also with text-based front-end wyrd and both text and graphical front/back-end wxRemind. It is also possible to use iCal data with remind, thanks to the two scripts, ical2rem for conversion from iCal to remind format and rem2ics for oposite conversion.

Beside text reminders I’m using remind as everyday alarm with the assistance from sox, known as ‘the Swiss Army knife of sound processing programs’ or as ‘command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files on most platforms.’

remind use simple text file for executing various reminders, calendars and alarms:

REM sunday AT 10:00 MSG "Don't forget to write WordPress post about remind."

This reminder can be executed with, for instance xorg-xmessage or gxmessage:

remind -z '-kxmessage %s' .reminders &

…were .reminders is the name of text file…
another option is use of RUN command, for executing scripts or programs. This is very useful for various alarm options to start various audio players and this is where sox come into play for me:


#.alarms
REM monday AT 6:30 RUN sox -q "~/alarms/file.mp3" -t alsa default
REM tuesday AT 6:15 RUN sox -q "~/alarms/file1.mp3" -t alsa default
REM wednesday, thursday AT 7:00 RUN sox -q "~/alarms/file2.mp3" -t alsa default
...
...

…and alarms with:

remind -z .alarms &

There are many ways to start both remind instances, with .bashrc, .xinitrc ar in my case with .ratpoisonrc:

#Remind
exec remind -z '-kxmessage %s' .reminders &
exec remind -z .alarms &

…With remind, possibilities are endless.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s