doc.txt

RSiTunes

_RSiTunes_
==========================================

By Jay McCarthy (jay at kenyamountain dot com)

Keywords: _media_

Introduction
============

On my computer I use AntiRSI, like Workrave, but when I play video games
I need something else. So, I wrote this. The idea is that you play music
while you play a game, and use this program to turn off the music periodically.
When the music goes off, pause the game. It works surprisingly well.

_rsitunes.ss_
---------------

Require it like this:

> (require (planet "rsitunes.ss" ("jaymccarthy" "rsitunes.plt" 1)))

It provides the follow procedures and structures:

> (define-struct interval (id frequency duration)) :: symbol seconds seconds

> (rsi-player start-interval stop-interval intervals) :: (-> void) (-> void) (listof interval) -> void

> (workrave micro-freq micro-duration macro-freq macro-duration) :: minutes seconds minutes minutes -> (listof interval)

Produces a list of intervals like workrave uses.

> (rsitunes intervals) :: (listof interval) -> void

rsi-player with the correct play/pause for iTunes.

Example
=======

The following example will cause a micro-pause every 3 minutes, for 13 seconds,
and a macro-pause every 40 minutes, for 8 minutes, and use iTunes.

(rsitunes (workrave 3 13
                    40 8))