<?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>Paul's All-Purpose Blog</title>
	<atom:link href="http://www.paulsawaya.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.paulsawaya.com/blog</link>
	<description>things that I have done, and plan yet to do</description>
	<lastBuildDate>Thu, 07 Jan 2010 21:00:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Towards a Tracking-Based Computer Interface</title>
		<link>http://www.paulsawaya.com/blog/?p=20</link>
		<comments>http://www.paulsawaya.com/blog/?p=20#comments</comments>
		<pubDate>Thu, 07 Jan 2010 21:00:28 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[computer vision]]></category>
		<category><![CDATA[human-computer interaction]]></category>

		<guid isPermaLink="false">http://www.paulsawaya.com/blog/?p=20</guid>
		<description><![CDATA[I&#8217;m writing a little post here about my final project for the Computer Vision and Image Processing class I took last semester. This project was inspired by a Hollywood-style computer interfaces (think Minority Report, or more recently, Avatar) where your computer is controlled by the movement of your hand. Rather than having someone wear a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing a little post here about my final project for the Computer Vision and Image Processing class I took last semester. This project was inspired by a Hollywood-style computer interfaces (think Minority Report, or more recently, Avatar) where your computer is controlled by the movement of your hand. Rather than having someone wear a glove equipped with a sensor, I sought out to see how well I could track my hand with a camera.</p>
<p>This implementation uses OpenCV and Python. I used <a href="http://code.google.com/p/ctypes-opencv/">these bindings</a> for Python, which I now realize are somewhat out of date. Still, I&#8217;m pretty satisfied with the results, given that it was developed over the course of a few weeks.</p>
<p>It works by first selecting &#8220;good features to track&#8221;, or points in the image where the largest changes in pixel values occur. So, this works best in front of a background that contrasts well with flesh tones. Then, it tracks the location of points as they change from frame to frame of video. Together, these two techniques are known as KLT tracking. You can read more about it, as well as read the original papers describing it <a href="http://www.ces.clemson.edu/~stb/klt/">here</a>.</p>
<p>I put up my code on <a href="http://github.com/psawaya/Computer-Vision-Final-Project">GitHub</a>, though it is under commented and could use a great deal of optimization. Like a lot of my class projects, I think it represents a solid start, though. You&#8217;ll need the OpenCV libraries I linked before and Pygame in order to run it.</p>
<p>Here&#8217;s a video of me using it:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=8590999&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=8590999&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/8590999">Computer Vision Tracking Final Project</a> from <a href="http://vimeo.com/user2189116">Paul</a>, who badly needs a haircut.</p>
<p>The left window shows the tracking. Here you can see me press &#8220;f&#8221; to find these &#8220;good features&#8221;, which are highlighted in green. Then, I press &#8220;r&#8221; to tell it that I intend on moving the object to track to the right. I move my hand to the right (my right, anyway), and then the most relevant points are highlighted in red. You can see that as I move, the tracker updates which points it finds the most relevant, discarding points that go against the grain of the average movement of my hand, and picking up new ones. The gray circle represents where the program thinks the center of my hand is.</p>
<p>The right window is a simple &#8220;game&#8221;. The object is to move the hollow blue circle on the green one, while avoiding the red one. I think this does well to demonstrate the level of precision the system has, although if I had more time, I would have done something more interesting.</p>
<p>It&#8217;s also possible to see some of the limitations of this approach. For one, you can only track one object per camera. That isn&#8217;t really a problem for what I was trying to do, as a final version of this should have two cameras positioned towards the hands. That way there&#8217;s no interference from moving your head or upper arms. You can see both confuse the tracker during the course of this video.</p>
<p>Another limitation is that although this tracks position well, it does nothing to recognize gestures. Gesture recognition could be implemented on top of point tracking as it exists now, although I know more specialized algorithms exist for that purpose. Either way, that&#8217;s beyond the scope of this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulsawaya.com/blog/?feed=rss2&amp;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Scripting Maya</title>
		<link>http://www.paulsawaya.com/blog/?p=15</link>
		<comments>http://www.paulsawaya.com/blog/?p=15#comments</comments>
		<pubDate>Sun, 19 Jul 2009 20:36:17 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[computer graphics]]></category>

		<guid isPermaLink="false">http://www.paulsawaya.com/blog/?p=15</guid>
		<description><![CDATA[This entry is crossposted from the Animating Fast blog that I updated as part of the Animating Fast class I took last semester at Hampshire College. The class covered experimental ways to speed up the production of 3D animation, and this entry details my experiences getting up and running with Python in Maya, and some [...]]]></description>
			<content:encoded><![CDATA[<p>This entry is crossposted from the <a href="http://animfast.blogspot.com/">Animating Fast blog</a> that I updated as part of the Animating Fast class I took last semester at Hampshire College. The class covered experimental ways to speed up the production of 3D animation, and this entry details my experiences getting up and running with Python in Maya, and some of the work I did for the class.</p>
<p><span style="font-weight: bold;">0. Thoughts on Maya</span></p>
<p>It&#8217;s easy to find learning a piece of software like Maya daunting. At most schools, it takes two full semester-long classes in 3D animation before someone really understands how to create 3D animation from beginning to end, and that doesn&#8217;t even cover the advanced techniques and features buried inside of the program. Scripting something like Maya can seem an even more difficult task, as most of the time, we know Maya from its user interface, and not from the way it stores data internally.</p>
<p>What Maya does do for you is echo the API commands in its own scripting language, MEL.     Maya&#8217;s UI is written in MEL, at the same level I was working when I started writing my scripts. That means that the source code to the Maya tools written in MEL would provide a valuable learning tool  in my attempt to learn the ins and outs of the program. Autodesk don&#8217;t, however, provide step-by-step tutorials or even an explanation of its API by feature, rather, Maya developers are expected to learn the program through a combination of its command reference and the UI source code.</p>
<p><span id="more-15"></span></p>
<p>In addition to MEL, Autodesk provide a binding into Maya for the popular programming language Python. If you&#8217;ve already begun scripting for Maya in Python, you probably already know the weaknesses in the provided Python layer can make for some ugly code. The good news is that translating MEL into Python is fairly obvious. The bad news is that it results in code like this:</p>
<p><span style="font-size:85%;"><span style="font-family:courier new;">curQual = cmds.modelEditor (currentPanel, q=True, rnm = True)</span></span></p>
<p><span style="font-family:courier new;">if curQual == &#8216;base_OpenGL_Renderer&#8217;:</span></p>
<p><span style="font-family:courier new;"> cmds.modelEditor (currentPanel, e=True,displayAppearance = &#8220;smoothShaded&#8221;, displayLights = &#8220;default&#8221;, displayTextures = True, rnm = &#8220;hwRender_OpenGL_Renderer&#8221;)</span><span style="font-family:courier new;"> </span></p>
<p><span style="font-family:courier new;">else:</span></p>
<p><span style="font-family:courier new;">cmds.modelEditor (currentPanel, e=True,displayAppearance = &#8220;smoothShaded&#8221;, displayLights = &#8220;default&#8221;, displayTextures = True, rnm = &#8220;base_OpenGL_Renderer&#8221;) </span></p>
<p>Calling one function for everything relating to, say, 3D Paint or a model view can get confusing quickly, especially since you&#8217;re either setting or getting flags that are explained only briefly in the documentation. In order to see how these functions are actually used, you need to dive into the Maya source code and pick out the relevant bits separate from the code that creates the user interface. In practice, this means turning on “Echo All Commands” inside of Maya, doing something you want to automate inside of Maya, and then grabbing the name of the UI call from the script editor and grepping through the hundreds of thousands of lines of MEL lurking in Maya&#8217;s /scripts folder. I think most Python hackers would agree that this development process and way of laying out the API is decidedly Unpythonic (<a href="http://en.wikipedia.org/wiki/Pythonic#Programming_philosophy">http://en.wikipedia.org/wiki/Pythonic#Programming_philosophy</a>). Some projects exist, such as PyMel (<a href="http://code.google.com/p/pymel/">http://code.google.com/p/pymel/</a>), that make Python syntax and MEL objects make more sense with each other, but unfortunately we didn&#8217;t have time to look into those for this class.</p>
<p>With all of that said, once you get the hang of development in Maya, you quickly realize that you have a powerful 3D package at your control that allows you to take advantage of some very advanced features without having to code a renderer for them yourself. In terms of time taken, using Maya&#8217;s particle engine or a 3D paint tool is undoubtably faster than writing your own, and this class is all about speed, so learning how to manipulate these tools with code was necessary to the mission of the class.</p>
<p>When we first decided talking about the kinds of tools a programmer might contribute to the class, a lot of my initial ideas centered around creating art programmatically. I thought about writing some code that laid out a virtual world based on a few basic objects that populate it, so that a program could be fed a few models of carnival booths and rides and then spit out an intelligently laid out scene. Another idea we talked about was taking a rigged model and generating walking animation for it based on the layout of its limbs, similar to what happens in the game Spore.</p>
<p>We eventually decided to pursue a different path, and focus on improving the interaction between the animator and Maya. We talked a lot about how the animator can get the ideas in his or her mind into Maya as quickly and efficiently as possible, while still having creative control over what results.</p>
<p><span style="font-weight: bold;">1. 3d Paint Tool</span></p>
<p>We decided that one group would start exploring the possibility of 3D matte painting, which would greatly reduct the amount of world building and modeling necessary to create the scene for our movie, without a sacrifice in visual quality (provided the camera stayed put). I was tasked with creating a 3D paint tool to streamline the painting process in Maya.</p>
<p>This tool would include a “Prime” button that would let an artist prepare a mesh for 3d painting a single click. Naturally, this requires a lot of steps to complete, and I ultimately decided to give the artist the option of turning off each step as needed. This saves the artist time in the beginning, but we realized that the real time saver would be minimizing the number of times the artist needs to go back to the Maya 3d Paint panel and change settings. For that reason, I added some hotkey management code that would swap out common single-button hotkeys for 3d Paint specific functions (e.g. C for choose color, G for grab color from screen). The animators really liked this, and said that specifically saved them a lot of time. Another feature we were interested in was moving the current 3d paint texture map to Photoshop. That eventually became the next tool in itself.</p>
<p>One final thing I should mention on the 3d paint tool is that there were some troubles getting it working at first. One peculiar thing about Maya 2008 and 8.5 is that it requires all named commands to be linked to MEL code, even in Python. This has apparently been fixed in 2009 with the <span style="font-family:courier new;">sourceType</span> flag on the <span style="font-family:courier new;">nameCommand</span> command, but most of the computers in Hampshire&#8217;s lab weren&#8217;t running 2009, so I used a quick fix using the MEL command python(), to effectively jump from Python to MEL and back to Python. A little unusual, but it worked&#8230;</p>
<p>Another problem with the 3d paint tool was its tendency to not restore the hotkeys once you were done using it. This was a nuisance that the animators had to go into the hotkey editor and fix themselves. The problem is that even though my script could restore the hotkeys, Maya didn&#8217;t seem to provide a way to trap the event of the script ending. Strangely enough, it does provide events for when your tool window is minimized and restored (<span style="font-family:courier new;">minimizeCommand</span>/<span style="font-family:courier new;">restoreCommand</span> flags on the window command), but even these weren&#8217;t called at the appropriate time. I ended up adding a restore all hotkeys button to the window for the artist to use before they finished with the tool.</p>
<p><span style="font-weight: bold;">2. Getting Renders out of Maya and Into Photoshop</span></p>
<p>This posed an interesting problem at first, as we weren&#8217;t sure how to divide up the painting duty between Photoshop and Maya&#8217;s 3D paint, and in which order they would be used. It seems like the painters were mostly outlining in Maya and finishing up all of the detail painting in Photoshop, so it seemed necessary to write a tool that could facilitate an export to Photoshop as quickly as my previous tool made it possible to manage a palette inside of Maya.</p>
<p>Since our artists were already dividing up the textures for 3D paint into categories and render layers in Maya, it seemed to make sense to develop a tool that could organize a camera, its materials, and its child render layers and textures all in one, while pushing renders of each layer out to Photoshop. I found the <span style="font-family:courier new;">render</span> command in Maya script, which I preferred over Maya&#8217;s external renderer because it let us have a scene file open as we rendered it and had built in flags for rendering specific render layers at a time. By default, it rendered to .iff with bad transparency. Maya provides a function called <span style="font-family:courier new;">convertIffToPsd</span> which I started using in the first version of my code, but Maya&#8217;s generated .psd files didn&#8217;t retain transparency as alpha (instead painting the empty void black), so we tried several different file formats. Maya&#8217;s export to .png preserved transparency perfectly, so I devised a system to include such a file in a .psd by means of a smart object (that&#8217;s Photoshop for an updatable reference to an image stored elsewhere) and a Photoshop actions file (.atn) to update it.</p>
<p>Getting Maya to spit out a .png as opposed to a .iff required some hunting through the MEL code as well. The trick is to call <span style="font-family:courier new;">setAttr (&#8216;defaultRenderGlobals.outf&#8217;,32)</span>, with 32 being Maya&#8217;s special identifier for .png files. You may want to setAttr the value back to 7 (.iff, the default) after your call to render.</p>
<p>I built an early version of this tool and demoed it for the class, but we ultimately decided we wanted to lose the organizational overhead and let the artists push out a single render reference image themselves that they could paint over, and “spray” the new paint over the old texture back in Maya.</p>
<p>Getting that single image out was surprisingly easy, and the script ended up being deployed as a windowless button that you could press and generate a quick render of the selected camera on your desktop.</p>
<p><span style="font-weight: bold;">3.Creating a Hypergraph Shader</span></p>
<p>Having created a series of paintings on top of a quick render, it became necessary to plan how to move the new paint back into Maya. Basically, we moved the organization task of fitting the painting images in place from the “before” Photoshop stage to the “after”.</p>
<p>The two animators, Taryn and Tatiana, who were painting in the class and provided commentary on the tools took two different approaches. One chose to use a quad shading switch in Maya, which is a special <span style="font-family:courier new;">shadingNode</span> that acts as kind of a multiplexer for pixel values within a shader. Because we had so many paintings that would have to fill a single surface, we thought it would be a good idea to have the shader make an intelligent decision as to which psdNode to source the image from, instead of building shaders for each image.</p>
<p>We did run out of time at this point in the semester, so I was never able to build a final version of this script, but I did have an early version to show off on the last day. In this final tool, a painter would first select a camera and lock it into place, and then create some materials associated with that camera&#8217;s shot. The painter could then assign each material (which already had a <span style="font-family:courier new;">psdNode</span> created for it in hypershade). Then, the painter would select a meshes they wanted to texture, and assign it to a material (it&#8217;s important to realize that the relationship between meshes and materials is many to one), which would then update the hypergraph shader. Finally, when they were done, they could mash a final button which would connect the whole mess together through the quad shading switch. Seeing what this looked like created manually made it seem like a process in dire need of speeding up.</p>
<p>The animators decided later in that class to move to multiple shaders for other reasons, which does eliminate the problem of creating the quad shading switch, although a tool to create multiple shaders could certainly have been just as handy, and that most likely is what I would have started on next if I had more time.</p>
<p><span style="font-weight: bold;">4.Conclusion</span></p>
<p>I hope that the code I&#8217;ve written as part of this class becomes helpful to CG students here at Hampshire and animators anywhere that might be reading this blog. Improving the interaction between technically minded artists and necessarily complicated software is a rich area to explore, and I wouldn&#8217;t be surprised if there were big gains in efficiency to be had in the process of streamlining the interface of a massive piece of software like Maya. As for me, I&#8217;m satisfied to have learned a lot more about the techniques and terminology surrounding computer graphics, and to have picked up Maya scripting skills along the way. I&#8217;m still impressed by the program&#8217;s size and capability, but no longer intimidated, and plan on continuing to play around with Maya this summer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulsawaya.com/blog/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast Graphics with a Javascript Canvas</title>
		<link>http://www.paulsawaya.com/blog/?p=8</link>
		<comments>http://www.paulsawaya.com/blog/?p=8#comments</comments>
		<pubDate>Fri, 10 Jul 2009 17:05:07 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[computer graphics]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.paulsawaya.com/blog/?p=8</guid>
		<description><![CDATA[So, I&#8217;ve decided to start updating this blog again. As you may notice, things have changed, as this blog will no longer serve to record my experience dealing with the RIAA, but instead be a place for me to show off what I&#8217;m working on. Whether or not anyone actually reads this doesn&#8217;t matter, since [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve decided to start updating this blog again. As you may notice, things have changed, as this blog will no longer serve to record my experience dealing with the RIAA, but instead be a place for me to show off what I&#8217;m working on. Whether or not anyone actually reads this doesn&#8217;t matter, since I&#8217;m mostly using it to organize what I&#8217;m doing and show off some of my projects to my friends. Hopefully, I&#8217;ll stay dedicated to updating this and it will grow to be a meaningful log of cool things I&#8217;ve made. If you&#8217;re still looking for the RIAA story, it&#8217;s not going anywhere.</p>
<p>Recently, I&#8217;ve been experimenting with drawing graphics using Javascript. I&#8217;ve been programming Flash for some time now, so I&#8217;ve experienced the fun of graphically intense apps in the web browser already, but I really wanted to break out of the plugin and see what you can do inside of a web page just in Javascript, and how fast you can make it.</p>
<p>I&#8217;ve made two demos, neither of which are finished, but I&#8217;ll show off links to them anyway.</p>
<p>The first will eventually become the new homepage of my site, that links to my blog, replacing the white vacuous page that currently is there. It&#8217;s Wolfram cellular automata generator, that picks random rules and random states and displays them, changing rules occasionally, or when the action gets repetitive. You can see a demo of it <a href="http://www.paulsawaya.com/js/newpage">here</a>. Eventually, I want to add support for the other kind of cellular automaton we studied, and maybe make it a little interactive with regards to which rule is displayed. This project was inspired by a program I developed with a classmate for an Unconventional Computing class at school. That&#8217;s over <a href="http://code.google.com/p/cs303-sim/">here</a>.</p>
<p>The second still needs a lot more work, but still is pretty enough to show off. It&#8217;s a port of a program I originally wrote in Java and OpenGL (JoGL), for a class I took at Smith College called Programming for the Interactive Arts. This program loads a SVG font (easily converted from a TrueType font using a utility like <a href="http://xmlgraphics.apache.org/batik/">batik</a>) and displays the poem &#8220;Jabberwocky&#8221; by Lewis Carroll word for word, tweening between each word. It looks fairly cool, and I learned a lot coding it, unfortunately it can get a little slow on some of the bigger words. <a href="http://www.paulsawaya.com/js/jsfont">Check it out.</a></p>
<p>While Javascript will never beat OpenGL in terms of speed, I think there are still a lot of optimizations I can make. First and foremost, it&#8217;s important to say that the tweening function eats up most of the time. The program starts for me in a couple seconds, which is pretty impressive, considering it&#8217;s downloading an XML document, parsing it, and generating vector points for about a hundred glyphs. The tweening algorithm I&#8217;m using now results in much prettier tweening than my first, more obvious solution, but has the disadvantage of being slow. One idea I had is to sneakily prerender each frame throughout the tween during the pause during which the word isn&#8217;t animated. Right now this is about a half a second, which could be enough to render ten frames of tweening between two words. I still have to implement this, of course.</p>
<p>There are a lot of other cool things I can do here as well, such as give the user the choice of fonts, color, tweening algorithm, and text to display. Also, there&#8217;s the practical issue of big words not fitting on the screen. =x But otherwise, I think this is ready for a little showing off. If you come across this blog and try it, I&#8217;d love to hear how it runs for you.</p>
<p>I&#8217;ll also eventually release the font rendering API under an LGPL license, once it&#8217;s mature enough.</p>
<p>My eventual goal for both of these projects is to take some meaningful benchmarks, and compare them to the running time of the programs I ported them from. I wonder if we&#8217;ll be seeing more games or animations in the future done entirely in JS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulsawaya.com/blog/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Something for &#8220;Nothing&#8221;</title>
		<link>http://www.paulsawaya.com/blog/?p=4</link>
		<comments>http://www.paulsawaya.com/blog/?p=4#comments</comments>
		<pubDate>Fri, 28 Mar 2008 15:01:02 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Opinions]]></category>

		<guid isPermaLink="false">http://www.paulsawaya.com/blog/?p=4</guid>
		<description><![CDATA[I&#8217;m sure anyone reading this has heard about Nine Inch Nails&#8217; new release, Ghosts, which is at least partially available for free, released under a Creative Commons license. Regardless of what you think of his music, you have to congratulate Trent Reznor for being one of the few mainstream artists in music today who understands [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure anyone reading this has heard about Nine Inch Nails&#8217; new release, <a href="http://ghosts.nin.com/main/home">Ghosts</a>, which is at least partially available for free, released under a Creative Commons license. Regardless of what you think of his music, you have to congratulate Trent Reznor for being one of the few mainstream artists in music today who understands the digital music. This isn&#8217;t his first experiment with distribution methods of this kind, having released isolated tracks for previous albums for remixers, and even admitting to be a part of the late great music tracker, OiNK.</p>
<p>Of course, giving away music for free online is nothing new to independent and unsigned artists. Many unsigned artists used Jukebox to share the music they themselves wrote on their Facebook profile, and even some independent artists on major labels used Jukebox for their own personal profile. One recent release I&#8217;d like to draw your attention to comes from the Boston sludge band Disappearer. You can get their new EP <a href="http://disappearer.com/wintersessions.zip">here</a>. Even if you don&#8217;t think you&#8217;d like this kind of music, allow me to suggest you give this a download. Artists like this need exposure, and after all, it costs you &#8220;nothing&#8221;, only a little bit of your listening time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulsawaya.com/blog/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The RIAA Situation- Explained.</title>
		<link>http://www.paulsawaya.com/blog/?p=3</link>
		<comments>http://www.paulsawaya.com/blog/?p=3#comments</comments>
		<pubDate>Sun, 09 Mar 2008 18:37:11 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Jukebox]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[riaa]]></category>

		<guid isPermaLink="false">http://www.paulsawaya.com/blog/?p=3</guid>
		<description><![CDATA[Jukebox, my music player application for Facebook, has over 44,000 songs in its database. It originated as a project I wrote just for fun this summer, mainly because I was bored and because I wanted to play with the Facebook API. I was pretty disappointed with the other popular music apps at the time, and [...]]]></description>
			<content:encoded><![CDATA[<p>Jukebox, my music player application for Facebook, has over 44,000 songs in its database. It originated as a project I wrote just for fun this summer, mainly because I was bored and because I wanted to play with the Facebook API. I was pretty disappointed with the other popular music apps at the time, and thought I could contribute something. I guess it was a bit of an accidental success. I launched it in late June, and watched over 100,000 Facebook users add it, over 34,000 remain users, and 1,500 &#8211; 2,000 use it daily. This is all without selling any ad space, using any shady invite system (something now common among Facebook applications), or publishing any stories to a user&#8217;s news or mini feed. I&#8217;ve made no money off of it, nor do I plan to. Since Jukebox works by linking users to music hosted online, I feel that it would violate common sense to sell advertising on pages that only display content other people (i.e., musicians) have worked so hard to create.</p>
<p>With that said, it probably should have come as no surprise to me that my program would eventually gain the attention of the RIAA. At the time I started Jukebox, I already knew about the legal threats the RIAA regularly makes against individuals who download music. I also knew about their relentless pursuit of websites and peer to peer applications dedicated to sharing music, and their practice of holding the programmers themselves or their companies responsible, even though the authors of those programs designed them to be used in ways that are completely legal.</p>
<p>I knew this, but I also didn&#8217;t think it would happen to Jukebox. Jukebox isn&#8217;t Napster, after all, it&#8217;s only a Facebook application. All it knows about its songs are links to MP3 files hosted elsewhere. Some songs were hosted on Google Pages, others on various other free file hosts online, and some on users&#8217; personal web space. At any rate, it seemed logical to me that linking to MP3s is not wrong, and even if it was, it seemed clear to me that it makes no sense to hold be accountable for links I did not put up. I thought the law would take my position as well, as Jukebox had many legitimate legal uses.</p>
<p><a href = "http://www.paulsawaya.com/jukebox/letter.html">The letter</a> came anyway. By e-mail, I received the two page legal threat, and a list of 1,495 links found in the Jukebox database that the RIAA claimed infringed on copyright. In case you don&#8217;t feel like reading it all, it basically said that the list was meant not to be &#8220;exhaustive&#8221;, but was provided so that I could &#8220;understand the scope of infringement&#8221;. Furthermore it was &#8220;evident that countless other RIAA member copyrighted sound recordings are being infringed through your service in an identical manner.&#8221; The next day, I received the same letter in a thick FedEx package, including the imposing list of 1,495 links. There was also a purple CD-R which contained an Excel database that was a &#8220;more extensive, yet still non-exhaustive, listing of sound recordings the rights to which are held by RIAA member companies.&#8221;</p>
<p>Is it any surprise that a corporation that proudly boasts that it represents &#8220;approximately 90% of all legitimate sound recordings produced and sold in the United States&#8221; can claim any music sharing service online infringes on their copyrights? Is it possible to avoid committing such infringement without sacrificing much of what users are looking for in an online music application? Of course, what&#8217;s right and wrong doesn&#8217;t matter, all that matters is what they can get away with doing or saying. So, before I did anything, I had to become certain as to the legality of what Jukebox does.</p>
<p>My housemate and good friend <a href = "http://www.thenewfreedom.net">Rich</a> connected me to a lawyer at Harvard Law School, Sam Bayard. I had a brief e-mail correspondence with him, and he gave me some very helpful (and encouraging) input. It&#8217;s important to underscore here that the fact that Mr.Bayard is not my lawyer, nor do we have an attorney-client relationship. He is a smart guy who knows about the law who chose to comment on this situation. Here&#8217;s what he had to say:</p>
<blockquote><p>In general, linking to copyrighted material is not an infringement because no copy is made or hosted on the linking person&#8217;s site. So, it is pretty clear that Jukebox does not directly infringe anyone&#8217;s copyright.</p>
<p>However, services like Grokster, Napster, etc. that help others infringe copyright have been found liable under secondary copyright infringement theories &#8212; contributory infringement and vicarious infringement.</p>
<p>Contributory infringement exists where one (1) has knowledge of another&#8217;s infringement and (2) either materially contributes to or induces that infringement.  Here, your friend would have a good argument that he/she has no knowledge of any specific infringing acts because the jukebox app is capable of significant non-infringing uses (this seems to be the case from my understanding of the facts &#8212; the program could enable users to play mp3s that are placed online by the copyright owner for public consumption for free, or mp3s that are licensed under a CC license; query: does it allow them to play files on their own computer?).</p>
<p>The Supreme Court complicated this issue a bit in the Grokster case by recognizing a form of secondary liability known as &#8220;intentional inducement.&#8221; The court said that where there is evidence of a device&#8217;s characteristics or knowledge of how it may be used (i.e., it was clear how Grokster could be used to infringe), combined with &#8220;statements or actions directed to promoting infringement,&#8221; then the person or entity distributing that device may be held liable despite lack of knowledge of specific infringing acts.  The court said &#8220;one who distributes a device with the object of promoting its use to infringe copyright, as shown by clear expression or other affirmative steps taken to foster infringement, is liable for the resulting acts of infringement by third parties.&#8221;</p>
<p>Without looking too deeply into the specifics, it seems unlikely to me that the jukebox app fits into this category of intentional inducement.</p>
<p>Vicarious infringement exists where one (1)  has the right and ability to supervise the allegedly infringing activity and (2) receives a direct financial benefit from  the infringing activity.  It doesn&#8217;t appear that your friend has any right and ability to supervise outside web pages or whomever may be posting infringing material accessible by the apps users, so this doesn&#8217;t seem like much of a problem.
</p>
</blockquote>
<p>So, it became clear that I could only be held accountable if I was inducing users to commit infringement. It seems clear that I&#8217;m not inducing anyone to break the law, as Jukebox&#8217;s music library is entirely submitted by users. I can&#8217;t &#8220;induce&#8221; my users to add links to copyrighted music (in fact, there is a little warning not to when music is added, not that it is realistic to expect all users to follow it). It&#8217;s entirely possible to use Jukebox without even being involved with the database, also. Many users just add links to their own personal music library hosted elsewhere, and many are even musicians who are using Jukebox to add their own tracks to their profile. So, it is entirely possible to use Jukebox without finding shared music through my service. And the users that do share links are the ones who have made the decision to infringe copyright, by uploading them offsite in the first place.</p>
<p>Unfortunately, knowing that you&#8217;re right and even that you&#8217;re not breaking the law is not enough in this situation. The RIAA could still sue me, and being a nineteen year old college student, a legal fight just is not feasible for me. They don&#8217;t have to worry about suing people like me, all they need to do is send a legal threat. This is known as the chilling effect, and more such letters (from the RIAA and other infamous groups such as the Church of Scientology) are available for viewing <a href = "http://www.chillingeffects.org">here</a>.</p>
<p>Shortly after I made the decision to go along with the RIAA&#8217;s wishes, I received this e-mail from Facebook, which certainly complicated things further:</p>
<blockquote><p>
We have recently received the attached complaint regarding your &#8220;Jukebox&#8221; application from the RIAA.  As you know, the Facebook Developer Terms of Service prohibit infringement of any other person&#8217;s intellectual property rights, and therefore if your application does contain infringing materials, you must remove them immediately.</p>
<p>As you are solely responsible for the operation of your application, we request that you resolve this issue directly with the complaining party, whom we have cc:ed on this e-mail at antipiracy@riaa.com. Facebook will disable your application if the complainant&#8217;s concerns are not addressed within 48 hours (by 11:30am PST on February 23rd). Please notify the complainant when the necessary steps have been taken. We reserve all rights in regard to this matter, including all of our rights under the Developer Terms of Service.
</p>
</blockquote>
<p>It was just not feasible for me to sort out this entire issue in 48 hours. I&#8217;d called Mr.McDevitt, the man from the RIAA who sent me the letter, several times only to get his voicemail and an extremely unhelpful secretary (interesting sidenote: the RIAA uses The Smiths as hold music). I wrote Facebook back explaining my situation to them and, to their credit, they offered me more time. Unfortunately, this couldn&#8217;t officially be over until I had the RIAA contact Facebook again and have them withdraw their compliant against Jukebox, which meant speaking to someone from the RIAA. While I contacted McDevitt over and over, hoping to get a few minutes on the phone with the guy, I deleted the 1,495 links enumerated in the RIAA&#8217;s letter to me from Jukebox&#8217;s database. It felt like admitting defeat, and I wasn&#8217;t happy about doing it, especially since I knew I was in the right. But as the letter itself stated, those 1,495 links were only the beginning, and I would have to remove many more in order for the RIAA to consider Jukebox&#8217;s infringement of their copyrights over.</p>
<p>While I was waiting on them, the founder of <a href = "http://www.pandora.com/">Pandora Radio</a>, Tim Westergren gave a talk at my school about digital music and his experiences in starting Pandora. Specifically, he spoke about the difficulty he encountered in trying to negotiate with the music industry. Hearing that, I felt the need to talk to him after his presentation, to hear someone with actual industry experience weigh in on the situation I found myself in. Unsurprisingly, he felt my outlook was pretty bleak. He told me, point-blank, that I would not receive a call back from these people and that it just made the most sense to shut Jukebox down now before the RIAA actually came after me legally.</p>
<p>I had decided to give up after a week of silence on their part, but Mr.McDevitt did eventually get back to me on the phone. He was surprisingly courteous and professional, and after I told him I wanted to keep Jukebox working within the boundaries of the law, receptive to my ideas.  What I am going to do is use the Excel spreadsheet sent to me by the RIAA as a list to check all of the songs in the database against. While not a complete list of RIAA-represented music, there&#8217;s no doubt that the spreadsheet contains the names of many of the 44,000 songs linked to in the Jukebox database. He was receptive to this idea, and said he wanted to see Jukebox once it was implemented. If the RIAA found it satisfactory, there would be no more risk of Facebook pulling my application or me getting sued.</p>
<p>Whether or not I choose to continue to update this blog is still up in the air, as it depends on how much and what kind of interest this entry generates. I never considered myself much of a blogger, but sometimes I have things to say, and this may be a useful place for me to say them. Even if I don&#8217;t, I hope this entry helps developers in the future who are curious about how something like this may happen to them, and generally keeps people informed about what they can expect and do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulsawaya.com/blog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
