{"id":124,"date":"2005-11-05T14:09:00","date_gmt":"2005-11-05T14:09:00","guid":{"rendered":"http:\/\/adam.rosi-kessel.org\/weblog\/free_software\/code\/randomplay.html"},"modified":"2007-07-22T15:24:06","modified_gmt":"2007-07-22T20:24:06","slug":"randomplay","status":"publish","type":"post","link":"https:\/\/adam.rosi-kessel.org\/weblog\/2005\/11\/05\/randomplay","title":{"rendered":"randomplay"},"content":{"rendered":"<p><!-- keywords:Free Software --><\/p>\n<h3> Get the latest version of randomplay as a <a href=\"\/code\/randomplay\/randomplay.tar.gz\">tarball<\/a> (v0.60, released 10\/15\/06).<\/h3>\n<hr \/>\n<p> Randomplay is a command-line based shuffle music player that remembers songs between sessions.Randomplay plays your music collection (or execute any arbitrary commands on any arbitrary filetypes) in random order, remembering songs played across sessions. It also has many features to make command-line music playing more convenient, including recursive regexp searching for tracks and the ability to specify a certain number of tracks, bytes, or minutes to play. Randomplay will also generate a list of music files to be loaded onto a portable music player device. It includes a \u00e2\u20ac\u02dcrandom weighting\u00e2\u20ac\u2122 feature, so your favorite songs are more likely to come up in the random shuffle.Randomplay is a convenient tool for the user who does everything in an xterm window or console and is constantly devising complex find\/grep\/sed command lines to play just the right set of songs.<\/p>\n<p>Following are some example invocations of randomplay to give a general sense of its flexibility; see the <a href=\"http:\/\/adam.rosi-kessel.org\/code\/randomplay\/manpage.html\">manpage<\/a> for more complete information:<\/p>\n<p>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:<\/p>\n<blockquote>\n<pre>randomplay --days=15 --pause=5 --player ogg=ogg123 ~\/dir1 ~\/dir2 =dir3<\/pre>\n<\/blockquote>\n<p>Play all ogg, wav, and mp3 files under the current directory (or base directory, if specified in .randomplayrc file) which have not been played for 10 days in alphabetical order, switch the \u00e2\u20ac\u02dcskip to next song\u00e2\u20ac\u2122 keystroke to \u00e2\u20ac\u02dcG\u00e2\u20ac\u2122 or \u00e2\u20ac\u02dcg\u00e2\u20ac\u2122 and \u00e2\u20ac\u02dcquit\u00e2\u20ac\u2122 to \u00e2\u20ac\u02dcq\u00e2\u20ac\u2122 or \u00e2\u20ac\u02dcc\u00e2\u20ac\u2122:<\/p>\n<blockquote>\n<pre>randomplay --norandom --key next=Gg --key quit=qc<\/pre>\n<\/blockquote>\n<p>Play all files under the current directory with the strings \u00e2\u20ac\u0153frisell\u00e2\u20ac\u009d and \u00e2\u20ac\u0153bill\u00e2\u20ac\u009d 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:<\/p>\n<blockquote>\n<pre> randomplay --regexp 'frisell bill' -0 --maxtime=15m<\/pre>\n<\/blockquote>\n<p>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):<\/p>\n<blockquote>\n<pre>randomplay --maxsize=100M --noremember --names-only<\/pre>\n<\/blockquote>\n<p>Play the last 10 songs played over again:<\/p>\n<blockquote>\n<pre>randomplay --last=10<\/pre>\n<\/blockquote>\n<p>Play songs test.ogg, test2.ogg, test3.ogg, and all files in musicdir in random order without weighting preferred songs:<\/p>\n<blockquote>\n<pre>randomplay --noweight test.ogg test2.ogg test3.ogg musicdir<\/pre>\n<\/blockquote>\n<p>Copy 128M of songs into a Neuros Audio Player, using positron:<\/p>\n<blockquote>\n<pre>positron add `randomplay --names-only --maxsize=128M`<\/pre>\n<\/blockquote>\n<p>Pick a random jpeg or png file that has not been displayed in the last week from the \u00e2\u20ac\u02dcimages\u00e2\u20ac\u2122 directory and display it with ImageMagick \u00e2\u20ac\u02dcdisplay\u00e2\u20ac\u2122 command:<\/p>\n<blockquote>\n<pre>randomplay --player jpg=display --player gif=display --days 7 ~\/images<\/pre>\n<\/blockquote>\n<p><a href=\"http:\/\/freshmeat.net\/projects\/randomplay\">randomplay is listed on freshmeat.net<\/a>.<\/p>\n<p>You can download randomplay as a <a href=\"\/adam\/code\/randomplay\/randomplay.deb\">Debian package<\/a>, or get it directly from <a href=\"http:\/\/packages.debian.org\/randomplay\">the Debian archive<\/a>.<\/p>\n<p>You can take a look at <a href=\"http:\/\/adam.rosi-kessel.org\/code\/randomplay\/code.html\">randomplay<\/a>, the main script, with nice highlighting, also see the <a href=\"http:\/\/adam.rosi-kessel.org\/code\/randomplay\/changelog.html\">changelog<\/a>.<\/p>\n<p><hints id=\"hah_hints\"><\/hints><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get the latest version of randomplay as a tarball (v0.60, released 10\/15\/06). Randomplay is a command-line based shuffle music player that remembers songs between sessions.Randomplay plays your music collection (or execute any arbitrary commands on any arbitrary filetypes) in random order, remembering songs played across sessions. It also has many features to make command-line music [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/posts\/124"}],"collection":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":0,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/posts\/124\/revisions"}],"wp:attachment":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/media?parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/categories?post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/tags?post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}