<?xml version="1.0" encoding="utf8"?>
<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>daisyrust.com &#187; mac development</title>
	<atom:link href="http://www.daisyrust.com/category/mac-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.daisyrust.com</link>
	<description>digital art - quartz composer - performance - exhibition</description>
	<lastBuildDate>Thu, 29 Jul 2010 17:42:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Quartz Composer and the Nintendo Wii Remote &#8211; QCWii a demo application</title>
		<link>http://www.daisyrust.com/2007/02/12/quartz-composer-some-projects/</link>
		<comments>http://www.daisyrust.com/2007/02/12/quartz-composer-some-projects/#comments</comments>
		<pubDate>Mon, 12 Feb 2007 15:14:20 +0000</pubDate>
		<dc:creator>ian grant</dc:creator>
				<category><![CDATA[cocoa]]></category>
		<category><![CDATA[mac development]]></category>
		<category><![CDATA[physical computing]]></category>
		<category><![CDATA[quartz composer]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.daisyrust.com/2007/02/12/quartz-composer-some-projects/</guid>
		<description><![CDATA[<img align="left" onclick="window.open('http://www.daisyrust.com/wp-content/uploads/2007/02/QCWiiMainScreen.png','popup','width=520,height=411,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false" src="http://www.daisyrust.com/wp-content/uploads/2007/02/QCWiiMainScreen-tm.png" height="100" width="126" alt="Qcwiimainscreen" />

Download Application: <a href="http://www.daisyrust.com/quartzcomposer/qcwii_v0.1.zip" title="download link for qcwill_v0.1.zip">qcwii_v0.1.zip</a>
Download Source Code:  <a href="http://www.daisyrust.com/quartzcomposer/qcwii_v0.1_src.zip" title="download link for qcwill_v0.1.zip">qcwii_v0.1_src.zip</a>

QCWii is an application that lets a user connect a Nintendo Wii Remote to the mac and control a simple teapot. It is a proof of concept for a digital puppet controller. The final project controls a face - where the mouth is real-time video and the eyes a pre-recorded video loops that can be controlled from the wii remotes buttons. Please see the following website for more details.
]]></description>
			<content:encoded><![CDATA[<p>Download Application: <a href="http://www.daisyrust.com/quartzcomposer/qcwii_v0.1.zip" title="download link for qcwill_v0.1.zip">qcwii_v0.1.zip</a><br />
Download Source Code:  <a href="http://www.daisyrust.com/quartzcomposer/qcwii_v0.1_src.zip" title="download link for qcwill_v0.1.zip">qcwii_v0.1_src.zip</a></p>
<p>QCWii is an application that lets a user connect a Nintendo Wii Remote to the mac and control a simple teapot.</p>
<p>It is a proof of concept for a digital puppet controller. The final project controls a face &#8211; where the mouth is real-time video and the eyes a pre-recorded video loops that can be controlled from the wii remotes buttons. Please see the following website for more details and the project write up.</p>
<p><strong>Link:</strong> <a href="http://ellington.tvu.ac.uk/ma/computer-arts-major-project/">http://ellington.tvu.ac.uk/ma/computer-arts-major-project/</a><br />
<img src="http://www.daisyrust.com/wp-content/uploads/2007/02/QCWiiMainScreen.png" height="411" width="520" border="1" hspace="4" vspace="4" alt="Qcwiimainscreen" /><span style="font-size:0pt;"></p>
<p></span><br />
<img onclick="window.open('http://www.daisyrust.com/wp-content/uploads/2007/02/QCWiiMainScreen.png','popup','width=520,height=411,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false" src="http://www.daisyrust.com/wp-content/uploads/2007/02/QCWiiMainScreen-tm.png" height="100" width="126" border="1" hspace="4" vspace="4" alt="Qcwiimainscreen" />	<img onclick="window.open('http://www.daisyrust.com/wp-content/uploads/2007/02/pref_01.png','popup','width=520,height=565,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false" src="http://www.daisyrust.com/wp-content/uploads/2007/02/pref_01-tm.png" height="100" width="92" border="1" hspace="4" vspace="4" alt="Pref 01" />	<img onclick="window.open('http://www.daisyrust.com/wp-content/uploads/2007/02/pref_02.png','popup','width=520,height=565,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false" src="http://www.daisyrust.com/wp-content/uploads/2007/02/pref_02-tm.png" height="100" width="92" border="1" hspace="4" vspace="4" alt="Pref 02" /> <img onclick="window.open('http://www.daisyrust.com/wp-content/uploads/2007/02/pref_03.png','popup','width=520,height=565,scrollbars=no,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=yes,left=0,top=0');return false" src="http://www.daisyrust.com/wp-content/uploads/2007/02/pref_03-tm.png" height="100" width="92" border="1" hspace="4" vspace="4" alt="Pref 03" /></p>
<p>The source code demonstrates the following:</p>
<ul>
<li>how the darwiin-remote framework can be used to control a 3D model in a simple Quartz Composer patch.</li>
<li>how cocoa bindings work connecting UI elements, code and published keys from a quartz composer patch.</li>
<li>a crude &#8216;full screen&#8217; mechanism.</li>
</ul>
<p>Many thanks to Jasen Jacobsen for advice on how to make the animation smooth and to Hiroaki for the &#8216;Darwiin-Remote&#8217; framework and project.</p>
<p><strong>Link:</strong> <a href="http://sourceforge.net/projects/darwiin-remote/">http://sourceforge.net/projects/darwiin-remote/</a></p>
<p><strong>Usage</strong></p>
<p>To connect to the Wii Remote: press button 1 and 2 on the wii remote so the lights flash, then click &#8216;Connect with wii remote&#8217; on the preference pane:</p>
<p><img src="http://www.daisyrust.com/wp-content/uploads/2007/02/pref_01.png" height="565" width="520" border="1" hspace="4" vspace="4" alt="Pref 01" /></p>
<p>To activate sensor tracking: click &#8216;Track Motion Sensors&#8217; on the same preference pane.</p>
<p>That should be it. Most of the buttons on the Wii are connected to do something in the Quartz Composer composition &#8211; if only signal a connection to the patch.</p>
<ul>
<li> The cursor pad moves the object, left, right (x axis), forward and backwards (z axis).</li>
<li> Buttons 1 and 2 rotates the object around the Y axis.</li>
<li> + and &#8211; scale the object.</li>
</ul>
<p>It is acknowledge that both scaling and translating on the Z axis is probably not as useful as moving up and down.</p>
<p>To exit full screen mode &#8211; press SHIFT &#8211; F on the keyboard.</p>
<p><strong>Some Additional Information if you wish to edit the Quartz Composer Patch to do something other than move a teapot around</strong></p>
<p>To find the QC composition:</p>
<p>ctrl-click on the QC-Wii application &#8216;view package contents&#8217; and dig down to &#8216;resources&#8217; that is where the QC patch &#8211; wii_to_qc.qtz &#8211; lives. You can (carefully) edit that composition to do something different other than trigger the text display and move the teapot&#8230; Just don&#8217;t change the name of any of the root level published port &#8216;keys&#8217;:</p>
<p><img id="image56" src="http://www.daisyrust.com/wp-content/uploads/2007/03/FinderScreenSnapz001.png" alt="crucial published keys that bind the patch to the wii remote via the application" /><br />
Image: The crucial published keys that bind the patch to the wii remote via the application. Do not change the published name of these &#8211; or the application will break<br />
If you edit that composition, save it. Then when you re-launch the application, it will use the edited composition as it&#8217;s source.</p>
<p>This way you don&#8217;t need to use xcode or re-build the application.</p>
<p>The qc patch needs to run inside an application wrapper. The application handles all the blue-tooth connection wizardry provided by the wiiremote-framework, the calibration preferences etc and toggling full screen. So you can&#8217;t simply edit the composition and preview it using Quartz Composer itself and expect the WiiRemote to connect.</p>
<p><strong>Ian Grant January, 2007</strong></p>
<p><strong>ian [dop ] grant [at ] mac [dop ] com</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.daisyrust.com/2007/02/12/quartz-composer-some-projects/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

