NAME
play – music player file system

SYNOPSIS
o/play [ –d –m mnt ]

DESCRIPTION
Play is a file system to control the host music player and capture its state. It serves a directory one file called ctl.

This file server is a spooler. A new file created within the directory is played by the host's music player. To stop the playing, the file must be removed.

Ctl provides the state of the player. The first line describes the status, which can be playing, pause, or stopped. If a file is being played or is paused, ctl also provides the following information (one per line): volume of the player (percentage, preceded by the word vol), position in the song (in seconds, preceded by the word pos), song name (preceded by the word song), artist name (preceded by the word artist), and album name (preceded by the word album).

These strings can be written in the file to control the player. The string pause pauses the player. The string playing commands the player to resume the playing. A percentage preceded by the word vol sets the player volume. A number preceded by the word pos sets the position of the song at this number of seconds. Writes with several lines are allowed. Lines beginning by the words song, artist, and album, are ignored in order to allow to directly copy the ctl file to capture or restore the state of the player.

EXAMPLES

Suppose the file system is mounted at /mnt/play. Play a file:
% cp tiki.mp3 /mnt/play

Set the volume to 75%:
% echo vol 75 > /mnt/play/ctl

Go to second 12:
% echo pos 12 > /mnt/play/ctl

Get the state of the player:
% cat /mnt/play/ctl
playing
vol 40
pos 6
song Shark
artist Tiki Tiki
album The Tiki Tiki

Stop the playing:
% rm /mnt/play/tiki.mp3

SOURCE
/usr/octopus/port/play.b

SEE ALSO
mplay(2)

BUGS
Only available for MacOSX (ITunes).