draai(1)

πŸ“¦
this version Β· 4 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’Ώ draai(1) β€” the Unix manual page but make it cute πŸ’Ώ

USER COMMANDS ✨ draai ✨

okay bestie, sit down, hydrate, because this is the manual page for draai and it's genuinely iconic πŸ’…


🌸 NAME 🌸

draai β€” manage playlists and play audio files 🎧


✨ SYNOPSIS ✨

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So. Draai is a wrapper around mpc, and what it does is make playing music from the command line actually enjoyable, which β€” no cap β€” is a whole vibe. mpc is a client for MPD, the Music Player Daemon.

With draai you 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. Literally all of it. It's giving ✨command-line DJ✨ and I'm obsessed.


πŸŽ€ GETTING STARTED πŸŽ€

Run this first, it sets draai up the way the author likes it:

draai init

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 πŸ’–

  • draai β€” Play music: the files given as args and playlists passed via --playlist.
  • watch β€” Run watch(1) on draai peek.
  • init β€” Start a bunch of X terminals setting up some draai jobs: tail, logtail, watch, syslog, ...
  • guestlist β€” Reschedule listed tracknumbers as upcoming tracks. Last arguments should be the positions of tracks to be put on the guestlist, not filenames. (yes bestie, the guestlist is real 🎟️)
  • unguestlist β€” Reschedule listed tracknumbers to end of playlist. bye babe 🫢
  • insert β€” 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 β€” Move tracknumber to tracknumber given as last argument.
  • zap β€” Move tracknumber to position one and immediately start playing it. Typically used to deal with radiostations in playlist. ⚑
  • search β€” 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 command's output to e.g. draai insert.
  • tail β€” Print information about track when it starts playing, similar to tail -f on a logfile.
  • logtail β€” Run tail(1) on system log file.
  • list β€” List current playlist.
  • peek β€” Show status of current song, and show upcoming $peek FIXME tracks.
  • play β€” Play music. ▢️
  • syslog β€” Send raw information from tail to syslog. You likely want to run draai syslog in the background.
  • skip β€” Skip this track, start playing the next one now.
  • osjittisstil β€” Run this if unwanted silence pops up during a playing session (for now, it runs draai --sloppy skip). 😭 silence? not on my watch
  • delete β€” 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.
  • fastforward β€” Seek forward in current track.
  • crescendo β€” Play louder. πŸ”Š
  • diminuendo β€” Play softer. 🀫
  • shuffle β€” 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. πŸ”€
  • listall β€” List all files as served by music database.
  • add β€” 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 β€” quit

πŸ’… OPTIONS πŸ’…

  • --debug (debug), -d β€” Be very verbose. πŸ‘€
  • --playlist (with playlistfile), -p β€” Playlist file; option can be supplied more than once. To be used with command "draai".
  • --noshuffle (no shuffle), {-S} β€” Do not shuffle tracks and leave random mode untouched (default is: do shuffle and disable random mode). See also the script dr_unsort.
  • --raw (raw), -r β€” Print raw stuff, suitable for postprocessing (if combined with tail, peek or list).
  • --sloppy (sloppy), -s β€” Do not try hard to make everything sound smooth. If combined with skip: risk a squeak on old hardware. πŸ™ˆ (yes, a squeak. on purpose. iconic behaviour)
  • --time (with timespec), -t β€” 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 🧚

Wanna know what env vars draai honors? Run

grep DR_ `which draai`

to find out. 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. iykyk πŸ’œ


πŸ“ 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 and Martijn van den Dungen, see http://freshmeat.net/projects/herrie/.


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. (fr fr, no warranty, bestie β€” read that twice)

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>


okay that's the whole page, you ate that 🫢 this was draai 20201215, dated 15 Π΄Π΅Ρ† 2020, and it lives in section 1 of the manual β€” now go play some music, main character πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from