<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some Brisbane Guy &#187; software</title>
	<atom:link href="http://kentwell.net/glenn/tag/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://kentwell.net/glenn</link>
	<description>Or, 101 Ways to Improve Your Life. And that's ironclad!</description>
	<lastBuildDate>Thu, 15 Oct 2009 13:08:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Play MP3s from the command line on Mac OS X</title>
		<link>http://kentwell.net/glenn/2009/04/play-mp3s-from-the-command-line-on-mac-os-x/</link>
		<comments>http://kentwell.net/glenn/2009/04/play-mp3s-from-the-command-line-on-mac-os-x/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 13:11:48 +0000</pubDate>
		<dc:creator>the same clown</dc:creator>
				<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://kentwell.net/glenn/?p=325</guid>
		<description><![CDATA[For maybe a year on and off I&#8217;ve been using a command-line music player from Hieper software called Play. 

It&#8217;s not always what you want, like if you want to browse your music and pick one song at a time to play, or if you want to build a custom playlist. But if you want [...]]]></description>
			<content:encoded><![CDATA[<p>For maybe a year on and off I&#8217;ve been using a command-line music player from Hieper software called <a href="http://www.hieper.nl/html/play.html">Play</a>. </p>
<p><img src="http://www.hieper.nl/images/play-icon.png" alt="play icon" /></p>
<p>It&#8217;s not always what you want, like if you want to browse your music and pick one song at a time to play, or if you want to build a custom playlist. But if you want to play all songs in a directory, or a bunch of songs with some word (e.g. band or album name) in the file name, it&#8217;s great because you can be playing the song in about 5 seconds, without starting up iTunes and doing a search within the GUI.</p>
<p>Here&#8217;s how I&#8217;m using it at the moment, to play all the songs I have by <a href="http://www.myspace.com/foals">Foals</a>:<br />
<code><br />
cd ~/Music<br />
find . -type f |grep -i foals|play -vr<br />
</code></p>
<p>First I change directory to my music directory, then use <code>find</code> with <code>grep</code> to find all files that have the word &#8216;foals&#8217; in their filename; and then just pipe that list to <code>play -vr</code>.  Pretty quick, pretty simple. </p>
<p>The command line options <code>-vr</code> are &#8220;v&#8221; to display the name of the song currently playing, and &#8220;r&#8221; to play the list in a random order.</p>
<p><strong>Update!</strong></p>
<p>I became bored with typing all that <code>find</code> and <code>grep</code> guff, so I thought I would take a few minutes and <strong>quickly</strong> write a shell script that does it for me, all I wanted to have to do is type <code>play search1 search2</code> and it would go. </p>
<p>A couple of <strong>hours</strong> of feature creep later, it now lists and counts the songs before playing them, and you can put an <code>-r</code> argument before or after the search keywords for a randomly ordered playlist.  Here&#8217;s the script source:</p>
<p><script src='http://pastie.org/465700.js'></script></p>
<p>So now, with the script in my path and a symlink named <code>path</code>, if I want to hear, say, <a href="http://www.youtube.com/watch?v=VkSq2Zn2XoY">Day &#8216;N&#8217; Nite by Kid Cudi</a>, I can just type:<br />
<code>play cudi.*nite</code><br />
It&#8217;s still pretty nerdy cause you have to do regex-style search expressions.  If I want to hear every song with &#8220;bass&#8221; in the title in random order, I do:<br />
<code>play bass -r</code></p>
<p>Here&#8217;s an example of it in use playing some <a href="http://myspace.com/britishindia">British India</a>:<br />
<img src="http://kentwell.net/picsimgs/misc/play.png" alt="playing MP3s" /></p>
]]></content:encoded>
			<wfw:commentRss>http://kentwell.net/glenn/2009/04/play-mp3s-from-the-command-line-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
