RANDOMPLAY(1)
๐ต NAME ๐ต
okay so randomplay โ it's a command-line based shuffle music player that remembers songs between sessions. bestie it literally never forgets. ๐
โจ SYNOPSIS โจ
randomplay [options] [directory ...] [file ...]
๐ Options ๐
--helpโ tiny little baby help message, just the basics ๐ผ--manโ the FULL man page, the whole lore drop ๐--versionโ shows the version number and then dips immediately ๐-q,--quietโ quiet output: it will NOT report the name of each song as it is played, so shhh ๐คซ-v,--verboseโ verbose output: it also includes the output from the player program right there on your console, so you see everything ๐ข-d n,--days=nโ minimum days since a track was last played before it's even considered (default is10days).ncan be a plain number of days, or you can slap a suffix on it (W= week,M= month,Y= year), or honestly just give it an absolute date ๐๏ธ-0โ special case that ignores history entirely (it's the same thing as--days=0) ๐ซ--randomโ shuffle that track listing (this is the default, random is the whole vibe) ๐--norandomโ don't do the shuffle thing, keep it in order ๐--rememberโ remember the tracks played for future sessions (default, bestie, it remembers) ๐ง--norememberโ don't remember anything, live in the moment, no thoughts head empty ๐ซง--utf8โ use UTF-8 encoding for output (default, utf8 all day) ๐--noutf8โ don't use UTF-8 encoding for output-w,--weightโ weight the random shuffle so it prefers the songs you rated as favorites (default, weighting is on) โ๏ธ--noweightโ no weighting, every song gets equal main character energy ๐- *
-r,--regexp=regexp string* โ only play files where the filename matches the regexp string ๐ -n,--names-onlyโ don't actually play the tracks, just hand over the list of filenames ๐-t n,--tracks=nโ how many tracks to play (or display) in total (default is unlimited, go feral) ๐ข- *
--maxsize=number of bytes* โ the maximum number of bytes of music to play or display (default unlimited) ๐ฆ - *
--maxtime=duration* โ how long to play before stopping, in minutes or hours (default unlimited) โณ -l n,--last=nโ play the lastXsongs in the exact same order as they were played before, a lil rerun ๐ฌ--newer-than n,--newer nโ only play songs newer thanndays old (e.g.W= week,M= month,Y= year, and plain days is the default), or newer than the daten๐--older-than n,--older nโ only play songs older thanndays old, or older than the daten๐บ- *
--basedir=directory* โ the directory that all your other directory specifications get resolved relative to ๐ - *
--history=filename* โ the file to use for the randomplay history (default is~/.randomplay_history) ๐ --clearโ permanently clear (delete) the history file and start over with a brand new history. no takebacks. ๐--pause=nโ delay between songs, in seconds (default is one second) โธ๏ธ- *
--announce=command* โ the program to run to announce each new track. Track info gets piped into the program. Set it to a blank string if you don't want any on-screen announcements. The default isxosdif it's installed ๐ฃ --playerextension=command โ play files with that extension using the specified command (defaults aremp3=mpg321,ogg=ogg123) โถ๏ธ--keyfunction=keystroke โ define alternative keystrokes for the player actions (defaults are right down below bestie) โจ๏ธ
๐น Default keys while playing ๐น
h,?โ show keystrokes (set it with--key help=keystrokes) โ+โ increase the currently playing song's random weight (set it with--key like=keystrokes) ๐-โ decrease the currently playing song's random weight (set it with--key dislike=keystrokes) ๐0,=โ reset the currently playing song's randow (sic โ that's literally how the original spells it, I'm not fixing it, it's iconic now) weight to0(set it with--key reset=keystrokes) ๐fโ skip to the next song (set it with--key next=keystrokes) โญ๏ธbโ skip to the previous song (set it with--key back=keystrokes) โฎ๏ธpโ pause the playback, it's a toggle (set it with--key pause=keystrokes) โธ๏ธlโ quit randomplay after the current song is finished (set it with--key quit=keystrokes) ๐ชqโ quit randomplay (set it with--key last=keystrokes) ๐
๐ DESCRIPTION ๐
randomplay is a shuffle music file player with a memory across sessions. It also can remember which songs you like better and weight them more heavily in the random shuffle. It can also be used to play a directory or set of directories nonrandomly, remembering where you left off between sessions. You can specify any number of directories to be recursively searched for music files, as well as how long since a track was last played for it to re-enter the rotation. You can also keep track of different playlist histories (for example, for different users of the same account) by specifying a different history filename.
All options can also be kept in ~/.randomplayrc, with one option per line, option name followed by a space followed by the option value. Command line settings will override settings specified in ~/.randomplayrc; later settings will override earlier settings. There is a default randomplayrc that comes with this package and includes all possible settings. ๐ซถ
๐ EXAMPLE ๐
Play all ogg files in dir1 and dir2 under your home directory, and dir3 under the base directory specified in ~/.randomplayrc, which have not been played for 15 days, in random order, with 5 seconds between songs:
randomplay --days=15 --pause=5 --player ogg=ogg123 ~/dir1 ~/dir2 =dir3
Play all ogg, wav, and mp3 files under the current directory (or base directory, if specified in the .randomplayrc file) which have not been played for 10 days, in alphabetical order, switch the 'skip to next song' keystroke to G or g and 'quit' to q or c:
randomplay --norandom --key next=Gg --key quit=qc
Play all files under the current directory with the strings "frisell" and "bill" in the filename, in any order (saves having to hunt down a file in a hierarchy), ignore whether the file has been played recently, but stop playing after 15 minutes:
randomplay --regexp 'frisell bill' -0 --maxtime=15m
Display 100M worth of music files, randomly sorted, without recording the history of tracks, using the default music directory (or the current directory if not specified):
randomplay --maxsize=100M --noremember --names-only
Play the last 10 songs played over again:
randomplay --last=10
Play songs test.ogg, test2.ogg, test3.ogg, and all files in musicdir, in random order, without weighting preferred songs:
randomplay --noweight test.ogg test2.ogg test3.ogg musicdir
Copy 128M of songs into a Neuros Audio Player, using positron:
positron add `randomplay --names-only --maxsize=128M`
Pick a random jpeg or png file that has not been displayed in the last week from the images directory and display it with the ImageMagick display command:
randomplay --player jpg=display --player gif=display --days 7 ~/images
๐ NOTES ๐
Most options can be abbreviated as a single letter; e.g., -t for --tracks, -d for --days, -r for --regexp. You can also omit the = sign between the option and the value if you prefer. But heads up bestie: if many options start with the same letter (e.g., --maxtime, --maxsize), then you must use the full name for the option. no shortcuts allowed on that one. ๐
For maxsize, you can use k for kilobytes and m for megabytes, or just enter the number of bytes.
For maxtime, you can use s for seconds (the default units), m for minutes, h for hours, or d for days.
You might want to specify a basedir setting in your .randomplayrc if all your music is under a certain directory. Then you can just give the relative names of the directories on the command line โ e.g., you have basedir=~/music in ~/.randomplayrc, and rock is a directory under ~/music, so just enter randomplay rock. ๐ธ
Randomplay will search for music in specified subdirectories first under the current working directory, and then relative to the basedir setting, if any. If the specified directory name begins with =, it will be searched relative to the basedir setting, even if the specified directory also exists under the current working directory.
Spaces in regexps are turned into "ands," making it more convenient to find the files you want. For example, --regexp 'thelonious monk blues' will play all songs with the words thelonious, monk, and blues in the filename, regardless of the order in which those words occur. Regexp searching is case-insensitive. ๐ค
If you specify an extension and a player for that extension, either in ~/.randomplayrc or on the command-line, only files with that extension will be played. You can, however, specify multiple players/extensions in either place, and all extensions listed will be played. โจ
The--lastoption implies--norandomand--noremember. it's giving package deal, no cap.
ยฉ๏ธ COPYRIGHT ยฉ๏ธ
Copyright (c) 2003-2006 Adam Rosi-Kessel. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, to the extent permitted by law. ๐ญ
๐ BUGS ๐
Your history file will grow indefinitely. This could either be a bug or a feature โ honestly iconic either way. You may want to clear the history at some point. It might also compromise your privacy if other people can see your history file and you are concerned about people knowing which songs you have listened to. ๐
The system used to kill the music player when you decide to skip to the next track looks up the process IDs using ps; this may not work on all platforms. ๐
The --maxtime option only works if you actually play the songs; it calculates actual time elapsed, rather than totalling the length of the tracks. This may or may not be the behavior you expect. ๐
๐ AUTHOR ๐
Adam Rosi-Kessel, ajkessel@debian.org <mailto:ajkessel@debian.org> ๐
and that's the whole page bestie!! ๐ this was perl v5.34.0, dated 2022-06-14, and it's the RANDOMPLAY(1) page from User Contributed Perl Documentation. slay, go play some music, ily ๐ฆ
๐ฆ where this page comes from
- debian bookworm: randomplay 0.60+pristine-1.1
- ubuntu noble: randomplay 0.60+pristine-1.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms