<?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>Peter Krantz &#187; Mac</title>
	<atom:link href="http://www.peterkrantz.com/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peterkrantz.com</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 09:57:17 +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>Hello OpenGL World in Ocaml</title>
		<link>http://www.peterkrantz.com/2008/hello-opengl-world-in-ocaml/</link>
		<comments>http://www.peterkrantz.com/2008/hello-opengl-world-in-ocaml/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 20:12:18 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ocaml]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/?p=198</guid>
		<description><![CDATA[I swear, if I read one more programming tutorial that starts with a recursive factorial function instead ...]]></description>
			<content:encoded><![CDATA[<p>I swear, if I read one more programming tutorial that starts with a recursive factorial function instead of a simple &#8220;Hello world&#8221; I&#8217;ll pray for perpetual nigerian spam on their inboxes. So, I was delighted to try out some <a href="http://caml.inria.fr/ocaml/index.en.html">Ocaml</a> stuff today that didn&#8217;t involve factorials.<span id="more-198"></span></p>
<p>Since I like dabbling with data visualization I was happy to find the following snippet:</p>
<pre> let _ =
   ignore( Glut.init Sys.argv );
   Glut.initDisplayMode ~double_buffer:true ();
   ignore (Glut.createWindow ~title:"OpenGL Demo");
   let angle t = 10. *. t *. t in
   let render () =
     GlClear.clear [ `color ];
     GlMat.load_identity ();
     GlMat.rotate ~angle: (angle (Sys.time ())) ~z:1. ();
     GlDraw.begins `triangles;
     List.iter GlDraw.vertex2 [-1., -1.; 0., 1.; 1., -1.];
     GlDraw.ends ();
     Glut.swapBuffers () in
   GlMat.mode `modelview;
   Glut.displayFunc ~cb:render;
   Glut.idleFunc ~cb:(Some Glut.postRedisplay);
   Glut.mainLoop ()</pre>
<p>Simple enough, apparently draws something on an OpenGL display. According to a friend of mine I am supposed to be able to compile ocaml code to a native app. Being on Mac OS X I was sceptical. Native OS X apps usually involves drawing arrows between events and boxes in some funky XCode window.</p>
<p>But, lo and behold:</p>
<p><kbd>sudo port install ocaml</kbd><br />
<kbd>sudo port install LablGL</kbd><br />
<kbd>ocamlopt -I +lablGL lablglut.cmxa lablgl.cmxa ogldemo.ml -o ogldemo</kbd></p>
<p>&#8230;creates an app that opens a window with the spinning triangle on OS X. And compilation is fast! I need to learn more about ocaml&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2008/hello-opengl-world-in-ocaml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Building your own Twitter client with Fluid and jQuery</title>
		<link>http://www.peterkrantz.com/2008/twitter-client-with-fluid-and-jquery/</link>
		<comments>http://www.peterkrantz.com/2008/twitter-client-with-fluid-and-jquery/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 23:50:28 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/?p=169</guid>
		<description><![CDATA[Like many before me, I was searching (unsuccessfully) for a decent twitter client. There are many, but ...]]></description>
			<content:encoded><![CDATA[<p>Like many before me, I was searching (unsuccessfully) for a decent twitter client. There are many, but most seem to be ad sponsored or based on a rather hefty framework like AIR (which by now, I guess, has been <a href="http://diveintomark.org/archives/2008/07/04/adobe-9">silently installed on my computer anyhow</a>).<span id="more-169"></span></p>
<p><strong>Update:</strong> This project is now deprecated and Twitter has removed basic authentication.</p>
<p>Custom apps have major implications for usability so I decided to roll my own. I wanted to try out <a href="http://www.fluidapp.com/">Fluid</a>, the <a href="http://labs.mozilla.com/2007/10/prism/">Prism</a>-like app to contain web apps in their own process/window, to see if it is possible to build a complete open source ad-free twitter client in a single web page only using javascript and HTML.</p>
<p>So, I <a href="http://www.cuil.com/search?q=jquery%20twitter%20plugin&amp;sl=long">cuiled</a> for a <a href="http://jquery.com/">jQuery</a> twitter plugin but had to <a href="http://www.google.se/search?q=jquery+twitter+plugin">google</a> it to find it. Some minor modifications to the code by the fine folks at <a href="http://tweet.seaofclouds.com/">SeaOfClouds</a> and adding a method to post new status messages gave this native-looking OS X twitter client (HUD-style to the left, default style to the right and HUD avatars style below):</p>
<p><img style="float: left;" src="http://www.peterkrantz.com/wp-content/uploads/2008/10/twoot-hud.png" alt="Twoot in HUD style" /></p>
<p><img src="http://www.peterkrantz.com/wp-content/uploads/2008/08/screenshot.gif" alt="Custom twitter client with Fluid and javascript" /></p>
<p><img src="http://www.peterkrantz.com/wp-content/uploads/2008/10/twoot-hud-black-avatars.jpg" alt="Twoot with avatars" /></p>
<p>Thank&#8217;s to the twitter json api it was trivial to query my own friend feed and display it in Safari. Then, I used Fluid to create a self contained OSX app that displays my static HTML page. Googling a <a href="http://www.iconarchive.com/show/dragon-soft-icons-by-artua/User-icon.html">nice application icon</a> makes it much better-looking in the taskbar. I decided to call it &#8220;Twoot&#8221;. Twoot consumes little memory and plays nice with embedded URLs (they open in a new Firefox tab).</p>
<p>Unfortunately, Fluid does not allow you to distribute the created app so you will have to roll your own by:</p>
<ol>
<li>Download and install <a href="http://fluidapp.com/">Fluid</a>.</li>
<li>Create a folder called &#8220;twoot&#8221; in your home directory.</li>
<li>Download the <a href="http://github.com/peterk/twoot/tree/master">twoot html, js and css files from github</a> and place in the twoot folder.</li>
<li><del>Edit twoot.js and set your twitter username and password.</del> (Enter credentials in the basic auth form when launching app the first time).</li>
<li>Open Fluid and create a new app by pointing to the twoot.htm file (e.g. file:///users/you/twoot/twoot.htm) and set a nice icon.</li>
<li>Save the app as &#8220;Twoot&#8221;.</li>
<li>Your new twitter client is ready! Run it and resize as required, set the window to floating, kill tabs etc. Change the twoot.css and html file to customize it further.</li>
</ol>
<p><strong>Simple API:s are wonderful for usability!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2008/twitter-client-with-fluid-and-jquery/feed/</wfw:commentRss>
		<slash:comments>55</slash:comments>
		</item>
		<item>
		<title>What&#8217;s your history&#124;awk&#8230;</title>
		<link>http://www.peterkrantz.com/2008/whats-your-historyawk/</link>
		<comments>http://www.peterkrantz.com/2008/whats-your-historyawk/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 20:41:12 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[SCM]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/?p=144</guid>
		<description><![CDATA[Via Bill de hÓra. Run this from the command line: history&#124;awk '{a[$2]++} END{for(i in a){printf "%5d\t%s ",a[i],i}}'&#124;sort ...]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://www.dehora.net/journal/2008/04/10/that-looks-about-right/">Bill de hÓra</a>. Run this from the command line:</p>
<p><kbd>history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s ",a[i],i}}'|sort -rn|head</kbd></p>
<p>I get:</p>
<p>108	ls<br />
78	cd<br />
53	sudo<br />
29	python<br />
13	cap<br />
9	django-admin.py<br />
9	ruby<br />
8	vim<br />
6	easy_install<br />
3 bzr<br />
1	ex<br />
1	python2.5<br />
1	ln<br />
1	mksir<br />
1	cat<br />
1 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc</p>
<p>In short:</p>
<ul>
<li>I have trouble with my default python installation.</li>
<li>I am trying Django for small project.</li>
<li>I was hit by the Leopard keyboard repeat freeze bug.</li>
<li>I am poor at spelling simple commands.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2008/whats-your-historyawk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building a Wiimote glove for virtual card sorting</title>
		<link>http://www.peterkrantz.com/2008/wiimote-glove/</link>
		<comments>http://www.peterkrantz.com/2008/wiimote-glove/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 13:32:52 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Robotics]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/?p=140</guid>
		<description><![CDATA[Thanks to Johnny Chung Lee, everyone and their mom seem to be setting up their own Wiimote ...]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.cs.cmu.edu/~johnny/projects/wii/">Johnny Chung Lee</a>, everyone and their mom seem to be setting up their own Wiimote whiteboards these days. I tried it too but disliked the pen-based interaction. So, I built a simple glove that allows you to pinch an object to drag and drop it somewhere. <span id="more-140"></span>Here is what you need:</p>
<ul>
<li>IR LED in the 920 nm range (a bag of 20 cost me )</li>
<li>1.5V AA battery</li>
<li>a glove</li>
<li>battery holder (with optional velcro to fit it to the glove)</li>
<li>some wires</li>
<li>a Wiimote</li>
<li>software (I tried <a href="http://www.uweschmidt.org/wiimote-whiteboard">Uwe Schmidt&#8217;s java based Mac version</a>).</li>
</ul>
<p>The first beta version looks like above after some soldering.</p>
<p>&nbsp;</p>
<p>After calibration the precision is really good, even when using it in front of the small screen of my Macbook Pro. It worked very well for card sorting in the <a href="http://www.optimalsort.com/">OptimalSort demo</a> and it feels natural to pick up objects with your fingers instead of pushing a switch on a pen.</p>
<p>I am eager to try it with a projector but that will have to wait until tomorrow when I get back to work. It would also be nice to try the <a href="http://justaddwater.dk/2008/03/14/where-to-find-a-giant-affordable-touch-screen/">virtual scrum board that Jesper Rønn-Jensen</a> and hos colleagues are working on. Updates will follow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2008/wiimote-glove/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Prism &#8211; web apps as desktop apps</title>
		<link>http://www.peterkrantz.com/2007/prism-web-desktop-apps/</link>
		<comments>http://www.peterkrantz.com/2007/prism-web-desktop-apps/#comments</comments>
		<pubDate>Mon, 24 Dec 2007 11:58:35 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Trends]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/2007/prism-web-desktop-apps/</guid>
		<description><![CDATA[When people started making applications available in the browser a number of interaction challenges appeared. How do ...]]></description>
			<content:encoded><![CDATA[<p>When people started making applications available in the browser a number of interaction challenges appeared. How do you launch a web app compared to a desktop app? How do you prevent people from navigating away from your app? The <a href="http://starkravingfinkle.org/blog/2007/10/webrunner-becomes-prism-a-mozilla-labs-project/">Mozilla people</a> have been hard t work with <a href="http://wiki.mozilla.org/Prism">Prism</a> &#8211; basically a customized version of Firefox, which lets you create desktop apps pre-configured to load a certain URL at startup. The desktop app is launched like any other application. Pretty sweet as the user experience becomes more consistent. You can also customize the application icon and <a href="http://wiki.mozilla.org/Prism/Config">other parameters</a>.<span id="more-124"></span></p>
<p>I have been running the beta version of <a href="http://mailplaneapp.com/">MailPlane</a> which provides at desktop version of Gmail (using Webkit). Apart from keeping Gmail in a separate branded window it also provides standard mac shortcut keys as well as desktop integration for screenshots and other file related things. Pretty sweet.</p>
<p>I was interested to see if Prism could provide a similar experience. Prism is currently an early beta at version 0.8 so it isn&#8217;t fair to expect too much of it. The <a href="http://wiki.mozilla.org/Prism#Wishlist">feature wish list</a> looks great.</p>
<p>Launching prism and creating a Gmail app worked great. However, Prism currently has some issues:</p>
<ul>
<li>It consumes close to 100% of a CPU core on my MacBook which makes it unusable for now.</li>
<li>Font size can not be adjusted (should be a parameter?).</li>
<li>There is a white space at the bottom of the app screen which reduce valuable screen estate. <img class="illustration" src="http://www.peterkrantz.com/wp-content/uploads/2007/12/prism-whitespace.png" alt="prism 0.8 white space bug" /></li>
</ul>
<p>I would also like to see an option to map access keys to native OS keys (e.g. Prism forwards ⌘+r as alt+r to the web app). This would allow users to work with the application in a way indistinguishable from a desktop application. also, if there was a way to interact with files (drag and drop etc) à la MailPlane I could see how Prism could be the preferred choice of many application developers in the future.</p>
<p>Couple it with a stand alone Ruby on Rails app (by using <a href="http://joyeur.com/2007/03/22/joyent-slingshot">Joyent&#8217;s Slingshot</a>) and you have a whole new way of developing applications that work offline, online and in a coherent way with other desktop apps. The future is bright!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2007/prism-web-desktop-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Keeping software up-to-date in OS X</title>
		<link>http://www.peterkrantz.com/2007/osx-application-update/</link>
		<comments>http://www.peterkrantz.com/2007/osx-application-update/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 09:39:03 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/2007/osx-application-update/</guid>
		<description><![CDATA[I often install apps to try if they work the way I like. Some stay, some I delete almost immediately. Some of them have built in functionality that alerts you when there is an update available. I find that very annoying. If you have many apps these little reminders tend to pop up all the time.]]></description>
			<content:encoded><![CDATA[<p>I often install apps to try if they work the way I like. Some stay, some I delete almost immediately. Some of them have built in functionality that alerts you when there is an update available. I find that very annoying. If you have many apps these little reminders tend to pop up all the time.</p>
<p>So, I was looking for something to keep tiny apps up to date and found <a href="http://metaquark.de/appfresh/">AppFresh</a>. AppFresh will scan your programs folder when you want it to and alert you of any updates it can find. Downloading and installation is automated for most apps as well.</p>
<p>It will also tell you when you lasted used an application &#8211; nice if you want to clean you programs folder from unneccessary apps.</p>
<p>You can <a href="http://metaquark.de/appfresh/">download AppFresh here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2007/osx-application-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OS X package management</title>
		<link>http://www.peterkrantz.com/2007/osx-package-management/</link>
		<comments>http://www.peterkrantz.com/2007/osx-package-management/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 09:35:19 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/2007/osx-package-management/</guid>
		<description><![CDATA[Mark Pilgrim writes about the benefits of the easy-to-use package manager in Ubuntu and then feels sorry ...]]></description>
			<content:encoded><![CDATA[<p>Mark Pilgrim <a href="http://diveintomark.org/archives/2007/11/11/installing-mysql-on-ubuntu">writes about the benefits of the easy-to-use package manager</a> in Ubuntu and then feels sorry for his Mac OS-using friends.<span id="more-119"></span></p>
<blockquote><p>&#8220;But Jesus H. Christ, it must suck giant wet donkey balls to be stuck on an archaic OS where you need to be dropping into the terminal and tweaking configuration files and compiling shit all the time. I hope the translucent menu bar is worth it. &#8220;</p></blockquote>
<p>I agree wholeheartedly that a good package manager really makes life a lot easier. At work the other day I was about to begin installing TWiki by following the rather lengthy <a href="http://twiki.org/cgi-bin/view/TWiki04x01/TWikiInstallationGuide">installation guidelines</a>. As I was on a clean install of Ubuntu 7.10 I fired off a <kbd>apt-get install twiki</kbd> and lo and behold, two minutes later the whole thing was there including mysql and a large part of the CPAN library.</p>
<p>On OS X I have been using <a href="http://www.macports.org/">MacPorts</a> from the terminal. It provides similar features to apt-get but you don&#8217;t get update notifications without diving into the terminal. And I rarely dive into the terminal to manually check for updates.</p>
<p>So, I googled around for a decent GUI and found <a href="http://porticus.alittledrop.com/">Porticus</a>. Porticus provides a nice GUI, checks for package updates and with a few clicks you can have your environment up to date. It even integrates nicely with Growl. The big difference is of course that packages aren&#8217;t pre-compiled (does that disqualify the use of &#8220;packages&#8221; to describe them?). MacPorts will download the source and build it on your machine. This is strange as Mac platforms are well known and vary little. Why not save everyone the build step and just push the universal binaries?</p>
<p><img class="center" src="http://www.peterkrantz.com/wp-content/uploads/2007/11/porticus-package-manager.gif" alt="Porticus package manager highlighting outdated packages" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2007/osx-package-management/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Fixing OS X Leopard menu bar transparency</title>
		<link>http://www.peterkrantz.com/2007/leopard-menu-transparency-fix/</link>
		<comments>http://www.peterkrantz.com/2007/leopard-menu-transparency-fix/#comments</comments>
		<pubDate>Sun, 28 Oct 2007 16:12:18 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/2007/leopard-menu-transparency-fix/</guid>
		<description><![CDATA[<img src='http://www.peterkrantz.com/wp-content/uploads/2007/10/leopard-transparency.jpg' alt='Leopard transparency fix' class="illustration">For some reason Apple decided to make the menu bar in Leopard transparent. With my background image this means that the menu bar will be in a shade of blue. It doesn't look good and makes my computing environment less comfortable (I'm picky, I know...).]]></description>
			<content:encoded><![CDATA[<p><img class="illustration" src="http://www.peterkrantz.com/wp-content/uploads/2007/10/leopard-transparency.jpg" alt="Leopard transparency fix" /><strong>Update:</strong> As many readers now noticed, as of 10.5.2 there is now a preferences setting for the menubar transparency.</p>
<p>For some reason Apple decided to make the menu bar in Leopard transparent. With my background image this means that the menu bar will be in a shade of blue. It doesn&#8217;t look good and makes my computing environment less comfortable (I&#8217;m picky, I know&#8230;).</p>
<p>Someone created a software <a href="http://www.manytricks.com/blog/?id=14">hack to remove the transparency</a>. There is also a system setting (thank you Johan) to <a href="http://www.macosxhints.com/article.php?story=20071115135215262">trick the window manager</a> into thinking it is in older hardware. I am not sure of the side effects so I&#8217;m not that keen on installing that. Here is the pragmatic fix: take your background image and paint a white stripe, 21 pixels high, at the top. Problem solved. My menu bar is now easy to read with black text on white background (see picture above).</p>
<p>Before painting the white stripe you may have to resize the picture to the exact size of your desktop, otherwise the OS will resize it and it won&#8217;t fit the size of the menu bar.</p>
<p><img class="illustration" src="http://www.peterkrantz.com/wp-content/uploads/2007/10/leopard-transparency-black.png" alt="Leopard black menu" /><strong>Update:</strong> As Peter points out in the comments below, if you use black instead of white the menu will look similar to the default ash grey style of other Leopard apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2007/leopard-menu-transparency-fix/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Water and Light Controlled Synthesizer (No Soldering Required!)</title>
		<link>http://www.peterkrantz.com/2007/water-light-synthesizer/</link>
		<comments>http://www.peterkrantz.com/2007/water-light-synthesizer/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 13:59:16 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Robotics]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/2007/water-light-synthesizer/</guid>
		<description><![CDATA[This was going to be my summer project, but after getting the parts I couldn&#8217;t stop myself ...]]></description>
			<content:encoded><![CDATA[<p>This was going to be my summer project, but after getting the parts I couldn&#8217;t stop myself from putting it together straight away. About a year ago I read an article about a guy who put together a synthesizer controller using laser pointers, a bowl of water, a solar panel and <a href="http://www.cycling74.com/products/maxmsp">MAX/MSP</a>. I can&#8217;t find the link anymore but it doesn&#8217;t matter when you want to roll your own!<span id="more-90"></span></p>
<p>This is what you need:</p>
<ul>
<li><a href="http://www.kjell.com/?item=44016&amp;path=">A solar panel</a> (2V to be able to connect it to the audio in port on my MacBook),</li>
<li>Some cabling (a 3.5 mm standard stereo plug)</li>
<li>A bowl of water</li>
<li>A software synthesizer that can read input from the audio in port.</li>
</ul>
<p>I already had access to water and a glass bowl and decided to skip the laser pointer (a round bowl will create interesting areas of focused light anyway).</p>
<p>Connecting the solar panel to your Mac is easy. Just connect the wires to a 3.5 mm stereo (or mono) cable and connect it to the line in audio port. Instead of using MAX/MSP I opted for the <a href="http://puredata.org/">free Puredata toolkit</a> (Pd). Pd is a real-time graphical programming environment for live interactive computer music. It is an interesting way to program a virtual synthesizer.</p>
<p>Fire up Pd and create a patch that looks like this:</p>
<p><img class="center" src="http://www.peterkrantz.com/wp-content/uploads/2007/06/patch-setup.gif" alt="Pd patch for water controlled synthesizer" /></p>
<p>Starting form the top left the adc (analog to digital converter) receives the signal input from the solar panel and sends it to a multiplier to increase signal strength. Two oscillators and a sawtooth phasor generator send data in various frequencies (330, 440, and 349 correspoding to C, F and A on a piano) to an amplitude modulator which is controlled by the solar panel input.</p>
<p>The resulting audio signal is sent to a dac (digital to analog converter) which will ouput the result to your computer speaker. If I starting Pb and create a small wave in the bowl of water in front of the solar panel the <a href="http://www.peterkrantz.com/wp-content/uploads/2007/06/pbtest.mp3">result sounds like this (heavily compressed mp3)</a>.</p>
<p>The options are, as usual, endless. Pd is capable of creating extremely complex patches and visualizations. You can easily use the optical interface to control aspects of midi streams.</p>
<p>Now that I ruined my summer project I have to think of something else. Any ideas? Maybe <a href="http://en.wikipedia.org/wiki/Smalltalk">Smalltalk</a>. Or an <a href="http://www.makezine.com/blog/archive/2007/06/rc_steam_turbine_rank.html">R/C steam turbine tank</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2007/water-light-synthesizer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
<enclosure url="http://www.peterkrantz.com/wp-content/uploads/2007/06/pbtest.mp3" length="397897" type="audio/mpeg" />
		</item>
		<item>
		<title>Automated iPhoto backups to Amazon S3</title>
		<link>http://www.peterkrantz.com/2007/iphoto-backup-to-s3/</link>
		<comments>http://www.peterkrantz.com/2007/iphoto-backup-to-s3/#comments</comments>
		<pubDate>Tue, 03 Apr 2007 10:53:48 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[HTPC]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.peterkrantz.com/2007/iphoto-backup-to-s3/</guid>
		<description><![CDATA[<img src='http://www.peterkrantz.com/wp-content/uploads/2007/04/iphoto-icon.jpg' alt=''  class="illustration"/>The combination of parental leave, a Sony A100 10 Mpix camera and the 80 Gb HD of my Mac mini server has resulted in a lot of zeroes and ones needing a place to live. I have realized that a lof of valuable photos are only stored on the HD. Should it fail the family will be really disappointed. Hence, the need for a backup solution.]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.peterkrantz.com/wp-content/uploads/2007/04/iphoto-icon.jpg' alt=''  class="illustration"/>The combination of parental leave, a Sony A100 10 Mpix camera and the 80 Gb HD of my Mac mini server has resulted in a lot of zeroes and ones needing a place to live. I have realized that a lof of valuable photos are only stored on the HD. Should it fail the family will be really disappointed. Hence, the need for a backup solution.</p>
<p>I was planning to get a small RAID solution for the home network, but they are fairly expensive, need electricity and space. So, I had a look at the <a href="http://www.amazon.com/gp/browse.html?node=16427261">Amazon Simple Storage Service (S3)</a>. If you haven&#8217;t heard of S3 before:</p>
<blockquote><p>Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives any developer access to the same highly scalable, reliable, fast, inexpensive data storage infrastructure that Amazon uses to run its own global network of web sites. </p></blockquote>
<p>I was expecting S3 to be fairly expensive with the redundancy and all, but it turns out that it is cheap. Really cheap. To calculate what it would cost me to backup my iPhoto library I threw together an <a href="http://www.peterkrantz.com/s3calc/">iPhoto backup to S3 calculator</a>.</p>
<p>Turns out that starting with 2000 photos at around 2 megs each, adding 100 photos each month willcost me $10/year. Hard to beat if you are trying to build your own RAID solution.</p>
<h2>Backup software</h2>
<p>Here is the setup I use. I tried some of the S3 client libraries available, but the only one that was persistent enough to do the initial 2000 file sync was <a href="http://jets3t.s3.amazonaws.com/index.html">jets3t</a>. It is a java library that comes with some easy to use command line synchronization scripts. After setting up jets3t with your S3 API key, all you do is tell the synchronize script to check your iPhoto folder.</p>
<p>Currently, I run it as a scheduled job once a month, but depending on your photography habits you may want to trigger it differently. It works like a charm and last month&#8217;s bill from Amazon was $1.23.</p>
<p>Try <a href="http://www.peterkrantz.com/s3calc/">the calculator</a> and see what your cost would be.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peterkrantz.com/2007/iphoto-backup-to-s3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: www.peterkrantz.com @ 2012-02-04 12:41:20 -->
