<?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>Evan Jacover (dot com!) &#187; Open Source</title>
	<atom:link href="http://evanjacover.com/archives/category/open-source/feed" rel="self" type="application/rss+xml" />
	<link>http://evanjacover.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 03 Nov 2011 16:43:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>I Love Fake Rock And Roll</title>
		<link>http://evanjacover.com/archives/2008/i-love-fake-rock-and-roll</link>
		<comments>http://evanjacover.com/archives/2008/i-love-fake-rock-and-roll#comments</comments>
		<pubDate>Wed, 06 Feb 2008 18:55:17 +0000</pubDate>
		<dc:creator>Evan</dc:creator>
				<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://evanjacover.com/archives/2008/i-love-fake-rock-and-roll</guid>
		<description><![CDATA[About a month ago, while utterly dominating ZZ Top on Guitar Hero, I got a dumb idea. Everyone loves Guitar Hero, right? How cool would it be to play a Guitar Hero guitar during a live show? Okay, bad question, but I intended to do it anyway. I couldn&#8217;t just play the game on stage, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><img src="http://evanjacover.com/wp-content/uploads/2008/02/guitarheroschubas.jpg" /></p>
<p>About a month ago, while utterly dominating ZZ Top on Guitar Hero, I got a dumb idea.  Everyone loves Guitar Hero, right?  How cool would it be to play a Guitar Hero guitar during a live show?  Okay, bad question, but I intended to do it anyway.  I couldn&#8217;t just play the game on stage, however.  That would cross the very narrow line from geek-cool into Lamesville, USA,  Population: The nerd playing Guitar Hero on stage.   No, I&#8217;d have to play an actual song&#8230; so I did, and &#8220;<a href="http://www.youtube.com/watch?v=bbASRMMbWTc">Underneath Your Clothes</a>&#8221; never sounded so dumb.  The sound guy at <a href="http://www.schubas.com/">Schubas</a> seemed to get a kick out of it, though.</p>
<p>Several people have asked me how the dingus worked, so I will explain it below if you&#8217;re interested.</p>
<p><span id="more-273"></span>Wii controllers are actually bluetooth devices.  Bluetooth is most commonly used for those <a href="http://flickr.com/photos/28191346@N00/1172562431/">wireless borg-esque cellphone ear-thingies</a> but it can send other types of wireless signals as well.  So the first step was getting a bluetooth receiver for my computer.  (Thanks, eBay!)</p>
<p>I then found a little C# library written by Brian Peek that reads and processes the raw wireless signal from the Wii controller.  It needed a little wrangling, but the software was soon reacting to button presses from the Guitar Hero controller.</p>
<p><img src="http://evanjacover.com/wp-content/uploads/2008/02/guitarherochart.png" align="right" hspace="10" />The next step was to make those buttons do something.  I figured out all the chords I would need to play the song and mapped them out to combinations of buttons on the controller as shown to the right.  Single buttons were used for single notes and multiple buttons represented chords.  I then recorded all of the guitar strums and plucks.  The &#8220;up&#8221; strums were short and choppy, while the &#8220;down&#8221; strums were longer and more sustained.  I did three versions of each sound so that repeated strums wouldn&#8217;t sound too, well, repeated.</p>
<p>Then, using the managed DirectSound library, the application plays the appropriate sound file based on the buttons that are being pressed, cycling to the next version each time a sound is played.</p>
<p><strong>Next Steps<br />
</strong>I had some motivation at one point to use midi instead of wave files, but decided wave files would be easier.  Also, I don&#8217;t have any midi gear.  I also had a fantasy of using the accelerometer values (which measure the position of the wiimote) to make a kind of theramin, basically manipulating a sine wave based on the tilt of the guitar.  I realized, however, that I&#8217;m nowhere near coordinated enough to push the buttons and control the tilt of the guitar at the same time.  I have a hard enough time with star power.</p>
<p><strong>Download Source Code<br />
</strong>If anyone is interested, you can download the crappy C# code I wrote here.  I don&#8217;t know C# very well, so It&#8217;s pretty lame.  Like I said, it&#8217;s based on <a href="http://brianpeek.com/blog/">Brian Peek</a>&#8216;s library.  He did most of the hard work.  I should probably clean this up before presenting it to the public.  It&#8217;s pretty embarrassing that all of the sound files need to be in the C:\WiiChords folder, but I&#8217;m lazy like that.   It&#8217;s also pretty embarrassing that all of the sounds are just loaded into memory.  But, whatever, the dang thing worked, right?  Anyone who wants can do whatever they want with this.</p>
<p><a href="http://evanjacover.com/wp-content/uploads/2008/02/guitarherowiimote.zip" title="GuitarHeroWiimote.zip">GuitarHeroWiimote.zip</a> (1.44 MB .zip)</p>
<p>See <a href="http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx">Managed Library for Nintendo Wiimote</a> by Brian Peek for more information.</p>
<p>You will need .NET and a <a href="http://www.microsoft.com/downloads/details.aspx?familyid=3904b19a-02b9-447b-ab58-c12e2456e9ba&amp;displaylang=en">Managed DirectX  library</a> to run this.  I should probably, at some point, move the audio over to XNA.  That seems to be where Microsoft is heading.</p>
]]></content:encoded>
			<wfw:commentRss>http://evanjacover.com/archives/2008/i-love-fake-rock-and-roll/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FlickrTunes</title>
		<link>http://evanjacover.com/archives/2007/flickrtunes</link>
		<comments>http://evanjacover.com/archives/2007/flickrtunes#comments</comments>
		<pubDate>Sat, 08 Dec 2007 20:53:36 +0000</pubDate>
		<dc:creator>Evan</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://evanjacover.com/archives/2007/flickrtunes</guid>
		<description><![CDATA[The album&#8217;s done and will be on sale soon, but in the meantime I&#8217;ve posted some tunes on the new &#8220;songs page.&#8221; I wanted to do something a little more interesting than just playing the song, so I decided to borrow an idea from the Astronaut project I liked so much. Images based on the [...]]]></description>
			<content:encoded><![CDATA[<p>The album&#8217;s done and will be on sale soon, but in the meantime I&#8217;ve posted some tunes on the new &#8220;<a href="/songs">songs page</a>.&#8221;  I wanted to do something a little more interesting than just playing the song, so I decided to borrow an idea from the <a href="http://www.avoision.com/experiments/astronaut/">Astronaut</a> project <a href="http://evanjacover.com/archives/2007/pretty-pictures">I liked so much</a>.</p>
<p>Images based on the lyrics are pulled from Flickr and shown as each song plays.  When it&#8217;s working as intended, apt photos are displayed in time with the music.  When it works as unintended, some pretty weird photos can show up. Either way, I&#8217;m down.</p>
<p>Since the photos are somewhat random and people are constantly uploading new photos to Flickr, the videos should change every time you watch them.</p>
<p>I only have a couple of the songs up for now, but I&#8217;ll get  them all posted in the next couple days.</p>
<p><strong>For Developers:<br />
</strong>I&#8217;m posting the source code here in case anyone else wants to use it.  Like many projects I work on, I start out writing well-organized, elegant code, but as the night wears on the cutting of corners tends to increase.  In other words, I apologize if it&#8217;s hard to work with.</p>
<p>You will need a Flickr API Key and your own stinking songs.<br />
Download 20kb .zip: <a href="http://evanjacover.com/wp-content/uploads/2008/02/flickrtunes_06.zip" title="FlickrTunes_0.6">FlickrTunes_0.6</a></p>
<p><strong>CHANGE LOG</strong></p>
<p><strong>FlickrTunes 0.6</strong><br />
I made the search a little more flexible so it works with full text searches now.</p>
<p>If you put a &#8220;~&#8221; before the search term, it does a full text search.<br />
{s:&#8221;~raised glasses&#8221;, t:&#8221;0:05&#8243;}<br />
If you put a &#8220;+&#8221; before a search term, it must match ALL of the comma-separated tags.<br />
{s:&#8221;+friends,hug&#8221;, t:&#8221;0:42&#8243;}<br />
Otherwise it tries to match ANY of the comma-separated tags.<br />
{s:&#8221;friends,hug&#8221;, t:&#8221;0:42&#8243;}</p>
]]></content:encoded>
			<wfw:commentRss>http://evanjacover.com/archives/2007/flickrtunes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

