draai(1)

NAME
draai - manage playlists and play audio files

SYNOPSIS

draai [option [option ...]] command [track [track ...] | tracknumber [tracknumber ...]]

DESCRIPTION
Draai is a wrapper around mpc, making playing music from the commandline more enjoyable. mpc is a client for MPD, the Music Player Daemon. Using draai, one can play an audiofile (ogg, mp3, flac, whatever your MPD offers), play all files in a predefined playlist, view details on current, past and future playing songs, skip to the next song, etc.

GETTING STARTED
Run "draai init" to get started using draai the way the author likes it. Then, open another terminal window and run e.g. $ draai listall | dr_permutate | draai add; draai play to build a current playlist and start playing it. Other ways of using draai are possible, see below.

COMMANDS

Play music: the files given as args and playlists passed via --playlist.
Run watch(1) on "draai peek".
Start a bunch of X terminals setting up some draai jobs: tail, logtail, watch, syslog, ...
Reschedule listed tracknumbers as upcoming tracks. Last arguments should be the positions of tracks to be put on the guestlist, not filenames.
Reschedule listed tracknumbers to end of playlist.
Add file(s) (given either as args or on stdin) to playlist and schedule it as upcoming track. You probably want to have 'draai insert' read from a pipe fed by 'draai search'.
Move tracknumber to tracknumber given as last argument.
Move tracknumber to position one and immediately start playing it. Typically used to deal with radiostations in playlist.
Search for substrings in all song tag types (artist, title, comment, filename, ...). Similar to 'mpc search any <query>'. You'll typically want to pipe this commands output to e.g. 'draai insert'.
Print information about track when it starts playing, similar to tail -f on a logfile.
Run tail(1) on system log file.
List current playlist.
Show status of current song, and show upcoming $peek FIXME tracks.
Play music.
Send raw information from tail to syslog. You likely want to run "draai syslog" in the background.
Skip this track, start playing the next one now.
Run this if unwanted silence pops up during a playing session (for now, it runs draai --sloppy skip).
Delete track(s) from current playlist. Last arguments should be _positions_ of tracks to be removed, not filename. If no position is given, deletes upcoming track from playlist.
Seek forward in current track.
Play louder.
Play softer.
Shuffle the playlist. By default, this task is delegated to dr_unsort(1). However, if draai runs in "sloppy" or in "native shuffle" mode, then mpc native shuffling is done (by calling "mpc shuffle"). Draai runs in "sloppy" mode when the DR_SLOPPY environment variable is set, or when the --sloppy option is passed. Draai runs in "native shuffle" mode when the DR_SHUFFLE_NATIVE environment variable is set.
List all files as served by music database.
Add file(s) (given either as args or on stdin) to playlist. You probably want to have 'draai add' read from a pipe fed by e.g. 'draai listall' or 'draai search'.
quit

OPTIONS

Be very verbose.
Playlist file; option can be supplied more than once. To be used with command "draai".
Do not shuffle tracks and leave random mode untouched (default is: do shuffle and disable random mode). See also the script dr_unsort.
Print raw stuff, suitable for postprocessing (if combined with tail, peek or list).
Do not try hard to make everything sound smooth. If combined with skip: risk a squeak on old hardware.
If combined with commands quit or draai: time at which to quit or start.

EXAMPLES
Schedule all tracks containing the string 'delia gone' in title, artist, comment or any other tag for playing, after current song has finished: draai search 'delia gone' | draai insert.

ENVIRONMENT
Run grep DR_ `which draai` to find out about environment variables honored by draai. It honors: booleans: DR_DEBUG, DR_SHUFFLE, DR_SHUFFLE_NATIVE, DR_TIMESTAMP, DR_RAW, DR_SLOPPY, DR_INIT_NCMPCPP and DR_INIT_WATCH ; strings: DR_WATCH ; integers: DR_CROSSFADE, DR_PEEK and DR_SEEK as well as DR_FADEOUT_STEP, DR_FADEOUT_REPEAT, and DR_FADEOUT_SLEEP and DR_VOLUME_STEP ; and some more strings: DR_SYSLOG_FILE, DR_SYSLOG_FACILITY and DR_SYSLOG_LEVEL . For now, see the draai code for what it all means.

FILES, CONFIGURATION
All configuration variables (see ENVIRONMENT) can be set in ~/.draai/rc. This rc-file is sourced as a shell script. If you'd like to set the syslog facility, set syslog_facility (overruled by DR_SYSLOG_FACILITY). If you'd like to set the watch programma, set watch (overruled by DR_WATCH).

SEE ALSO
Lots of alternatives for draai exist. One is "herrie", by Ed Schouten e.a., see https://github.com/EdSchouten/herrie .

COPYRIGHT AND LICENSE
Draai is (C) 2000-2013 Joost van Baal-Ilić <joostvb-draai@mdcc.cx>. Draai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed WITHOUT ANY WARRANTY. You should have received a copy of the GNU General Public License along with draai. If not, see http://www.gnu.org/licenses/.

AUTHOR
Joost van Baal-Ilić <joostvb-draai@mdcc.cx>