<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>m00nd0g&#039;s blog</title>
	<atom:link href="http://m00nd0g.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://m00nd0g.wordpress.com</link>
	<description>Because getting information off the Internet is like taking a drink from a fire hydrant.</description>
	<lastBuildDate>Thu, 04 Jun 2009 22:02:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='m00nd0g.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>m00nd0g&#039;s blog</title>
		<link>http://m00nd0g.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://m00nd0g.wordpress.com/osd.xml" title="m00nd0g&#039;s blog" />
	<atom:link rel='hub' href='http://m00nd0g.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Simulate AirTunes with Popcorn Hour</title>
		<link>http://m00nd0g.wordpress.com/2009/06/04/simulate-airtunes-with-popcorn-hour/</link>
		<comments>http://m00nd0g.wordpress.com/2009/06/04/simulate-airtunes-with-popcorn-hour/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 19:28:15 +0000</pubDate>
		<dc:creator>m00nd0g</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[mpd]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[nicecast]]></category>
		<category><![CDATA[nmt]]></category>
		<category><![CDATA[popcorn hour]]></category>

		<guid isPermaLink="false">http://m00nd0g.wordpress.com/?p=9</guid>
		<description><![CDATA[Since gwillem over at the NMT forums posted his compiled version of Music Player Daemon for Popcorn Hour, I was searching to use the Popcorn Hour like an Apple Airport Express. The AirTunes function of the Airport Express allows the &#8230; <a href="http://m00nd0g.wordpress.com/2009/06/04/simulate-airtunes-with-popcorn-hour/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=m00nd0g.wordpress.com&amp;blog=8022942&amp;post=9&amp;subd=m00nd0g&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://www.networkedmediatank.com/member.php?action=profile&amp;uid=16013">gwillem</a> over at the <a href="http://www.networkedmediatank.com/showthread.php?tid=17306%29">NMT forums</a> posted his compiled version of <a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki">Music Player Daemon</a> for Popcorn Hour, I was searching to use the Popcorn Hour like an Apple <a onclick="return mugicPopWin(this,event);" oncontextmenu="mugicRightClick(this);" href="http://www.apple.com/airportexpress/features/airtunes.html">Airport Express</a>. The AirTunes function of the Airport Express allows the device to receive audio coming from iTunes, and feed it to your home stereo.</p>
<p>How great the MPD might be, I couldn&#8217;t find any client that acts like iTunes does. <a href="https://theremin.sigterm.eu/">Theremin</a> was the only Mac client I could find, but unfortunately it crashed on me too often. <a href="https://addons.mozilla.org/en-US/firefox/addon/6324">Minion</a> is a Firefox add-on which worked very well, but it&#8217;s UI is ugly in my opinion.</p>
<p>That&#8217;s why I still wanted to use iTunes as the &#8220;client&#8221; for MPD.</p>
<h2>What you will need</h2>
<ul>
<li>A networked media tank, like <a href="http://www.popcornhour.com/">PopCorn Hour</a> of course.</li>
<li>A Mac with iTunes.</li>
<li><a href="http://rogueamoeba.com/nicecast/">NiceCast</a>, an application that broadcasts any audio on your Mac.</li>
<li>Music Player Daemon installed on your NMT. This can be installed using the <a href="http://www.nmtinstaller.com/">Community Software Installer</a>.</li>
<li><a href="http://www.networkedmediatank.com/showthread.php?pid=173034">Dropbear SSH Server</a> installed on your NMT.</li>
</ul>
<h2>The scripts to make it all work</h2>
<p>I created two AppleScripts which I put in /Library/iTunes/Scripts. You can also put them in the equivalent folder in your homedir. I just prefer to put them in the system-wide library folder, because the script is then available to all users on the Mac.</p>
<p>The first script is called <em>Start stream to NMT</em>. It&#8217;s doing the following steps:</p>
<ul>
<li>It mutes the system volume of the iMac. I don&#8217;t want to hear iTunes playing through the internal speaker of course !</li>
<li>It starts <a href="http://rogueamoeba.com/nicecast/">NiceCast</a>, which is a very nice audio streamer from Rogue Amoebe. I have setup NiceCast to start streaming audio coming from iTunes when the application starts up.</li>
<li>Finally it starts the mpd daemon on the Popcorn Hour, and tells it to play the stream coming from NiceCast.</li>
</ul>
<p>Here&#8217;s the script:</p>
<blockquote><p>set volume 0</p>
<p>tell application &#8220;Nicecast&#8221;<br />
launch<br />
end tell</p>
<p>delay 2</p>
<p>do shell script &#8220;ssh root@popcorn &#8216;export MPD_HOST=localhost; export MPD_PORT=6600; /share/Apps/mpd/daemon.sh start; mpc stop; mpc clear; mpc add http://192.168.123.1:8000/listen; mpc play&#8217;&#8221;</p></blockquote>
<p>The second script, as you might have guessed, is called <em>Stop stream to NMT</em>. It&#8217;s doing these things:</p>
<ul>
<li>It tells mpd to stop playing the stream.</li>
<li>Shuts down the daemon. I don&#8217;t want the daemon to be running all the time as it disrupts video playback.</li>
<li>It shuts down NiceCast, as there&#8217;s no need to stream the audio anymore.</li>
<li>Finally it unmutes the system sound of the iMac.</li>
</ul>
<p>Here&#8217;s the code:</p>
<blockquote><p>do shell script &#8220;ssh root@popcorn &#8216;mpc stop; /share/Apps/mpd/daemon.sh stop&#8221;&#8217;</p>
<p>tell application &#8220;Nicecast&#8221;<br />
quit<br />
end tell</p>
<p>set volume 2</p></blockquote>
<p>If you have any questions or remarks about this, don&#8217;t hesitate to contact me !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/m00nd0g.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/m00nd0g.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/m00nd0g.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/m00nd0g.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/m00nd0g.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/m00nd0g.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/m00nd0g.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/m00nd0g.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/m00nd0g.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/m00nd0g.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/m00nd0g.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/m00nd0g.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/m00nd0g.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/m00nd0g.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=m00nd0g.wordpress.com&amp;blog=8022942&amp;post=9&amp;subd=m00nd0g&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://m00nd0g.wordpress.com/2009/06/04/simulate-airtunes-with-popcorn-hour/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8df5bfe0d027b23e2960ddcef437f51d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">m00nd0g</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome to my blog</title>
		<link>http://m00nd0g.wordpress.com/2009/06/03/welcome-to-my-blog/</link>
		<comments>http://m00nd0g.wordpress.com/2009/06/03/welcome-to-my-blog/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 19:37:53 +0000</pubDate>
		<dc:creator>m00nd0g</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://m00nd0g.wordpress.com/?p=3</guid>
		<description><![CDATA[Hi, I&#8217;m m00nd0g. This will be my blog where I post stuff I find interesting. Have a nice stay !<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=m00nd0g.wordpress.com&amp;blog=8022942&amp;post=3&amp;subd=m00nd0g&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m m00nd0g. This will be my blog where I post stuff I find interesting. Have a nice stay !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/m00nd0g.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/m00nd0g.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/m00nd0g.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/m00nd0g.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/m00nd0g.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/m00nd0g.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/m00nd0g.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/m00nd0g.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/m00nd0g.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/m00nd0g.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/m00nd0g.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/m00nd0g.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/m00nd0g.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/m00nd0g.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=m00nd0g.wordpress.com&amp;blog=8022942&amp;post=3&amp;subd=m00nd0g&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://m00nd0g.wordpress.com/2009/06/03/welcome-to-my-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8df5bfe0d027b23e2960ddcef437f51d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">m00nd0g</media:title>
		</media:content>
	</item>
	</channel>
</rss>
