<?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>Rev Dan Catt&#039;s Blog</title>
	<atom:link href="http://revdancatt.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://revdancatt.com</link>
	<description>Sporadically posts from someone who still does occasional &#039;blogging&#039;</description>
	<lastBuildDate>Tue, 08 May 2012 14:53:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The Penn &amp; Teller magic trick that made me fall in love with magic again.</title>
		<link>http://revdancatt.com/2012/05/03/the-penn-teller-magic-trick-that-made-me-fall-in-love-with-magic-again/</link>
		<comments>http://revdancatt.com/2012/05/03/the-penn-teller-magic-trick-that-made-me-fall-in-love-with-magic-again/#comments</comments>
		<pubDate>Thu, 03 May 2012 21:09:44 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1273</guid>
		<description><![CDATA[Below, is the trick that changed how I thought about magic and made me see tricks in a new &#38; more interesting light., I&#8217;ll explain why in a second. [WARNING: the sound quality is awful on this video but it is all in one piece, see below for links for better quality split over 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Below, is the trick that changed how I thought about magic and made me see tricks in a new &amp; more interesting light., I&#8217;ll explain why in a second.</p>
<p><strong>[WARNING: the sound quality is awful on this video but it is all in one piece, see below for links for better quality split over 2 videos (or if you're reading this in an RSS reader)]</strong></p>
<p><strong></strong><br />
<iframe src="http://www.youtube.com/embed/Sdv91BoN1tg?rel=0" frameborder="0" width="480" height="360"></iframe></p>
<p>&#8230;this trick is split over two much better quality videos, you&#8217;re probably better of viewing them on YouTube:</p>
<p>Part 1: <a href="http://youtu.be/sTbm3WPJQ8k?t=8m27s">The World&#8217;s Most Expensive Card Trick, starting at 8:28</a><br />
Part 2: <a href="http://youtu.be/AsIj7OpIogU">The World&#8217;s Most Expensive Card Trick, second half</a></p>
<p>I&#8217;ll run through the trick in just a second, first a little background on my introduction to magic.</p>
<p>Like many people around my age in the UK, I grew up watching the <a href="http://www.youtube.com/results?search_query=Paul+Daniels+Magic+Show&amp;oq=Paul+Daniels+Magic+Show&amp;aq=f&amp;aqi=g5&amp;aql=&amp;gs_l=youtube-psuggest.3..0l5.411.411.0.751.1.1.0.0.0.0.64.64.1.1.0...0.0.">Paul Daniels Magic Show</a>, we only had three channels at the time so Saturday night entertainment TV options were limited. We ended up watching magic not because we sought it out but rather because there was nothing else on, we didn&#8217;t hunt it, it came to us.</p>
<p><a href="http://en.wikipedia.org/wiki/Noel's_House_Party">Noel Edmonds</a>, <a href="http://www.bbc.co.uk/archive/tomorrowsworld/">Tomorrow&#8217;s World</a>, <a href="http://en.wikipedia.org/wiki/Grange_Hill">Grange Hill</a> and Paul Daniels; entertainment, wonky technology, school life and magic was part of our growing up curriculum, it&#8217;s just something you had to sit through until you graduated to being old enough &amp; trusted enough to go play with your friends in the street.</p>
<p>Thus the UK ended up with this odd magic literate generation, some hated it, some loved it and some of us had a passing interest.</p>
<p>I generally took magic at face value, a trick designed to delight and entertain, being happy to play the roll of the naive observer trusting what the magician said to enjoy the surprise payoff at the end. The magician isn&#8217;t really the one doing the tricking it&#8217;s the audience, successfully fooling the magician into thinking they&#8217;ve pulled off the trick. The better the audience is with this deception the greater the magician. Otherwise everyone would just sit there and go &#8220;Trap door! Slight of hand! Twins! Hidden compartment&#8221; and no-one would have a very good time. The audience make a deal with the magician(s) to go along with the deception for everyone&#8217;s benefit.</p>
<p>Penn &amp; Teller changed that deal.</p>
<p>They were magicians who showed us how (some of) the tricks were done, this was new and interesting to me, it also changes the dynamic. Now we weren&#8217;t on two separate ends of a deal but on the same side, still complicit with each other but now just focused on enjoying the performance rather than fooling each other.</p>
<p>Or so I thought until the above trick.</p>
<h2>Ok, so about the trick then</h2>
<p>For those that don&#8217;t care to watch the trick, here&#8217;s the run down.</p>
<p>Penn is out in the street, explaining to us the audience in the studio and watching at home, how the trick is going to be done. How <em>we</em> are going to fool a couple of people on the street, using a couple of top-of-the-range tricked out computers and a perfect fanning of the cards.</p>
<p>Penn will get the oh-so-foolish marks to pick a card from a deck. The remaining cards are quickly fanned and shown the the camera, and then the bit I loved.</p>
<p>I loved it, because I wanted to believe in computers, they were magical wonderful machines. I had one (an <a href="http://en.wikipedia.org/wiki/Acorn_Electron">Acorn Electron</a>) and I could make it do, well, stuff, I typed in incantations of special words and invoked a response. I totally bought into the computer part, I was always telling people that computers would be able to do great things, and now, here, was a demonstration of that. Boy Penn &amp; Teller got computers, <em>I</em> got computers, it&#8217;s almost like we could hang out and talk about computers.</p>
<p>In this trick, the computer would take a screen shot of the fanned cards, analysis the image recognising each of the cards in turn and, here&#8217;s the great bit, deduce the missing card, the one the &#8220;marks&#8221; in the street picked.</p>
<p>This, is did perfectly.</p>
<p>Teller then typed the card into the <em>second</em> computer which displayed it on a large advertising screen above and <em>behind</em> the people on the street, so that Penn could see it and therefore tell them what the card was.</p>
<p>I was so down with this, <em>we</em>, all of us, knew how the thing was done, together we had tricked the two people in the street.</p>
<p>Until the very last moment, and then this happened.</p>
<p>Penn had asked them their names, Teller typed it into the display, which was then shown above their heads, just like this&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/05/The-Unpleasant-World-of-Penn-Teller-E05-Part-3_3-YouTube.jpg"><img class="aligncenter size-full wp-image-1275" title="Sue &amp; Ian" src="http://revdancatt.com/wp-content/uploads/2012/05/The-Unpleasant-World-of-Penn-Teller-E05-Part-3_3-YouTube.jpg" alt="" width="639" height="390" /></a></p>
<p>&#8230;.and at that moment, my perception of magic changed forever.</p>
<h2>The big switch-a-roo</h2>
<p>I&#8217;m sure most people already know what&#8217;s going on, you probably have it figured out already, I mean it&#8217;s so obvious really. However remember I was magic tricks naive, I took things a face value, I trusted those guys. We were on the same side, right?</p>
<p>That sign is old, made up of bulbs, not these super modern screens with millions of pixels, but a limited number of pixels/bulbs across and down, it&#8217;s a low resolution screen. Or in other words you can only fit so many letters on it.</p>
<p>And I asked myself, what are the chances that out of all the people on the street, Penn ended up with a pair that had short names?</p>
<p>Roger &amp; Laura, too long.<br />
Padmavati &amp; Steve, too long.<br />
Bob &amp; Martin, too long.<br />
Andrew &amp; Felicity, too long.<br />
Mary &amp; Sue, too long.</p>
<p>No, none of that, but <strong>Sue</strong> and <strong>Ian</strong>. Two three letter names, what are the chances of that? Well not high enough for me. And then it unravelled, I could feel my mind playing the whole trick backwards, and then even further back to all the TV magic shows I&#8217;d seen.</p>
<p>If the two people <em>had</em> to have short names, then they couldn&#8217;t have been just anyone. If they weren&#8217;t just <em>anyone</em> then there&#8217;s no reason to try and fool them, all that (now apparently fake) stuff with the computer wasn&#8217;t to trick <em>them</em> so who was it tricking?</p>
<p>Us.</p>
<p>This wasn&#8217;t part of the deal, I bought into the whole <em>we</em> were going to trick <em>them</em> part, the inside knowledge, the collusion. I thought Penn &amp; Teller were being straight up with me, letting me in on the trick, after all that&#8217;s what they do isn&#8217;t it, show you how things are done?</p>
<p>I had been tricked. The magicians had lied, not the lying that we all agreed to do together to make the trick work &#8220;the card is lost in the deck&#8221;, but out and out, bare faced, lying lying.</p>
<p>And this made me very happy.</p>
<p>I thought back even further, if that had been a lie, then what else?</p>
<p>A trick, of sorts I remembered from the Paul Daniels Magic Show, a master of memory trick, in which he had memorised each audience members&#8217; name, 100s of people. He explained it as a &#8220;visualization and word association technique&#8221; by creating word pictures, the crazier the better you can remember a great number of things. The example in this case was looking at a man wearing glasses called Ash. You mentally  build up an image of the man with a volcano growing out of his head, dripping lava and billowing ash out that comes to rest along the top of his glasses. Once you have that image, you can easily remember his name. And then you do this for each person in turn. Watching it was impressive.</p>
<p>But as feasible as the explanation for how it was done was, it didn&#8217;t mean he wasn&#8217;t &#8220;cheating&#8221;. I&#8217;d heard a little about visualising images to help memory before, there are books on the subject and so on, but just because it&#8217;s a real thing, doesn&#8217;t mean that&#8217;s how it was done, but enough for me to buy into at the time.</p>
<p>I then applied this thinking to other tricks I remembered, is the trick itself a trick? At which point I discovered a new joy in magic, a new dimension to explore, an extra layer on-top of the layers that I thought I knew about. The meta-trick, a trick wrapped inside a trick.</p>
<p>A good few years later along came <a href="http://www.youtube.com/results?q=Derren+Brown&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=w1&amp;gl=GB">Derren Brown</a>, wonderful fantastic entertainment. Many of the tricks explained to us upfront with perfectly reasonable psychological explanations. But were we being let in on the trick, or being tricked?</p>
<p>I certainly had no better understanding of how the magic tricks were being done, no magic insight to the moves, slights, gaffs or trick construction. But instead a greater appreciation of the art and the setup than I had before.</p>
<p>And it was this one trick by Penn &amp; Teller, the World&#8217;s Most Expensive Card Trick, shown on Channel 4. That very evening was the moment that shifted everything about magic for me, made me fall in love with it more, made me think about it a little more, and made me once more enjoy being tricked by charlatans, cheats and liars.</p>
<h2>Update: The US version &amp; an interview extract</h2>
<p>@hugovk uploaded the US version of this trick to vimeo.</p>
<p><iframe src="http://player.vimeo.com/video/41659935?byline=0&amp;portrait=0" frameborder="0" width="500" height="375"></iframe></p>
<p><a href="http://vimeo.com/41659935">Penn &amp; Teller: The World&#8217;s Most Expensive Card Trick</a> from <a href="http://vimeo.com/user380955">Hugo</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>And also pointed me to this interview on WiReD from back in the day: <a href="http://www.wired.com/wired/archive/2.09/penn_pr.html">A completely unredeeming profile of Penn Jillette, wired magician, Umaphile, little girl trapped in a fat man&#8217;s body</a>. Which includes this extract&#8230;</p>
<blockquote><p>Teller quotes Arthur C. Clarke, who noted, &#8220;A sufficiently advanced technology is indistinguishable from magic.&#8221;</p>
<p>Eight years ago, Penn &amp; Teller devised a trick that illustrated Clarke&#8217;s Law, Teller says. You might recall this number &#8211; the World&#8217;s Most Expensive Card Trick &#8211; done before millions of people on <em>Saturday Night Live</em>.</p>
<p>While the <em>Saturday Night</em> audience watched Teller sit on stage surrounded by computer equipment, Penn was out in Times Square, &#8220;by a newsstand,&#8221; Teller recalls. &#8220;Penn had two passersby select one card from the pack and remove it. He then fanned the cards so the TV camera could get a glimpse of the 51 others. I apparently captured the fan on my computer scan, and took a still frame to determine which card was missing. I turned to a second terminal and typed in Four of Diamonds. The terminal transferred it to the giant Spectacolor screen in Times Square: Penn just looked over the bystanders&#8217; shoulders, and there it was.&#8221;</p>
<p>&#8220;All that elaborate rigamarole could have just as easily been done by a standard palming of the card,&#8221; he adds. In fact, the trick was done like this: The &#8220;bystanders&#8221; were really two actors. And the answer was always going to be the Four of Diamonds; that was the card that the actors had been instructed to select. But what everyone saw was an incredible stunt done by powerful, mystical computers.</p>
<p>&#8220;The subject of that trick was how close to magic being able to manipulate a lot of technology is,&#8221; Teller says.</p></blockquote>
<p>Which still feels true today.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/05/03/the-penn-teller-magic-trick-that-made-me-fall-in-love-with-magic-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I’m leaving the Guardian</title>
		<link>http://revdancatt.com/2012/04/26/im-leaving-the-guardian/</link>
		<comments>http://revdancatt.com/2012/04/26/im-leaving-the-guardian/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 14:26:51 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[guardian]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1261</guid>
		<description><![CDATA[The title says it all &#8211; after two-and-a-half years I’m going to be leaving the Guardian. I was just going to continue to copy &#38; paste Martin&#8217;s leaving blog post from the other week, but decided that was just a little bit too cheeky ;) instead&#8230; I shall miss the Guardian terribly, the people, projects [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/revdancatt/6011160421/"><img class="aligncenter size-full wp-image-1268" title="the guardian" src="http://revdancatt.com/wp-content/uploads/2012/04/6011160421_2cb896c96b_b.jpeg" alt="" width="1024" height="680" /></a></p>
<p>The title says it all &#8211; after two-and-a-half years I’m going to be leaving the Guardian.</p>
<p>I was just going to continue to copy &amp; paste <a href="http://www.currybet.net/cbet_blog/2012/04/leaving-the-guardian.php">Martin&#8217;s leaving blog post from the other week</a>, but decided that was just a little bit too cheeky ;) instead&#8230;</p>
<p>I shall miss the Guardian terribly, the people, projects and even the building despite it giving me electric shocks when I&#8217;m least expecting it. Highlights have included sitting down with various editorial teams, especially the technology peeps and joining in the recording of the Tech Weekly podcast. The wide range of guest speakers that come into &#8220;Morning Conference&#8221; each week and talk off the record. Getting words I&#8217;ve written printed in the <em>actual</em> paper, I know, old school!</p>
<p>Also, the space to push forwards the connectedTV agenda, a whole bunch of number crunching data dashboards and widgets to help us understand what various measurement metrics actually mean. Bits &amp; bobs that integrate with Tumblr, twitterbots tweeting, an &#8220;ebookifier&#8221; and a &#8220;liveblog-o-matic&#8221;. A weekly Kindle digest that never saw the light of day and a weekly print version in the form of The Long Good Read that did.</p>
<p><a href="http://www.flickr.com/photos/revdancatt/5558653330/"><img class="aligncenter size-full wp-image-1263" title="The Long Good Read" src="http://revdancatt.com/wp-content/uploads/2012/04/5558653330_0ea3500018_b.jpeg" alt="" width="1024" height="683" /></a></p>
<p>Actually it&#8217;s probably easier just to point at this blog&#8217;s <a href="http://revdancatt.com/category/guardian/">guardian tag</a> and be done with it.</p>
<p style="text-align: center;">* * *</p>
<p>Anyway, enough words.</p>
<p>I don&#8217;t have a next thing lined up, just the great wilderness of the unknown future with nothing but some vague ideas and my pockets stuffed full of Guardian API keys to pass the time. So I expect there&#8217;ll be a few more Guardian hacks and projects coming out, just from the outside this time rather then the inside :)</p>
<p>Farewell the Guardian, it was&#8230; well, actually, that&#8217;s once I&#8217;ve worked through the notice period, and tied up loose ends, fleshed out some documentation, made sure all my projects are in git, ticked off the knowledge sharing, fixed my assigned bugs&#8230;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/04/26/im-leaving-the-guardian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guardian Ambient Headline Radio &#8211; The Definitive Blogpost</title>
		<link>http://revdancatt.com/2012/04/25/guardian-ambient-headline-radio-the-definitive-blogpost/</link>
		<comments>http://revdancatt.com/2012/04/25/guardian-ambient-headline-radio-the-definitive-blogpost/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 20:04:17 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[guardian]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1220</guid>
		<description><![CDATA[I&#8217;ve written up about the GAHR  before, but now that it&#8217;s finished (well for the moment anyway) I wanted to put it all down in one place, sorry this is a long one, you may want to skip to the part you&#8217;re interested in&#8230; THE VISION SOUND DESIGN TEXT TO SPEECH GRAPHIC DESIGN TECHNOLOGY THINGS [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Guardian-Ambient-Headline-Radio-v0.6.3-8.jpg"><img class="aligncenter size-full wp-image-1221" title="Guardian Ambient Headline Radio" src="http://revdancatt.com/wp-content/uploads/2012/04/Guardian-Ambient-Headline-Radio-v0.6.3-8.jpg" alt="" width="1230" height="1000" /></a></p>
<p>I&#8217;ve written up about the GAHR  <a href="http://revdancatt.com/2012/03/31/the-pxl-effect-with-javascript-and-canvas-and-maths/">before</a>, but now that it&#8217;s finished (well for the moment anyway) I wanted to put it all down in one place, sorry this is a long one, you may want to skip to the part you&#8217;re interested in&#8230;</p>
<ul>
<li><a href="#the-vision">THE VISION</a></li>
<li><a href="#sound-design">SOUND DESIGN</a></li>
<li><a href="#text-to-speech">TEXT TO SPEECH</a></li>
<li><a href="#graphic-design">GRAPHIC DESIGN</a></li>
<li><a href="#technology">TECHNOLOGY</a></li>
<li><a href="#things-ive-learnt">THINGS I LEARNT ALONG THE WAY</a></li>
</ul>
<p>If you&#8217;re on Chrome or Firefox (the only things I&#8217;ve tested it on) you can listen/see the project here: <a href="http://revdancatt.github.com/GuardianAmbientHeadlineRadio/">http://revdancatt.github.com/GuardianAmbientHeadlineRadio/</a>. It <em>should</em> play seamless looping sounds and read headlines at you.</p>
<p>The source code is here: <a href="https://github.com/revdancatt/GuardianAmbientHeadlineRadio">https://github.com/revdancatt/GuardianAmbientHeadlineRadio</a></p>
<p>&nbsp;</p>
<h1><a name="the-vision"></a>The Vision</h1>
<p>It started just over a year ago, before the <em>last</em> SxSW (2011), the <a href="http://www.guardian.co.uk/">Guardian</a> was going &amp; internally we were asked for suggestions for what we could do there, that demonstrated our internet/data/hacking/open/api skillz. I think we had a room to show our stuff, one reaction I normally have when faced with a space to fill, is to fill it with speakers. The bigger and more fuck-off the better.</p>
<p>A room, with a a couple of laptops running <a href="http://www.ableton.com/">Ableton Live</a> with various pad/soundscapes running through them. Also, have it wired up to the Guardian API picking up the latest articles, videos and podcasts. Then, converting those articles into speech, auto-tune it and then drop it into the mix, changing the levels on the soundscapes to match the &#8220;mood&#8221; of the article, or the section it was from. So &#8220;sporty&#8221; background sounds for sport stories, &#8220;filmy&#8221; background sounds for film stories and so on. While cleverly and automatically chopping up the podcasts to drop soundbites and loops into the mix to.</p>
<p>Meanwhile our reporters would go round interviewing people and bands (from the music bit) and general ambient field recordings; out in the street, in the crowd and so on. Which they could also download to another laptop in the room, which would again feed bits and pieces into the mix.</p>
<p>All this would then be broadcast on the internet 24 hours a day for the full duration of the SxSW festival(s). An evolving news soundscape, that could happily sit in the background but still keep you informed of roughly what was going on if you paid attention to it.</p>
<p style="text-align: center;">* * *</p>
<p>This browser-based end result is sort of that.</p>
<p>Oh of course, I had no idea how to use Ableton Live, and so began the year of learning.</p>
<h3>In-between then and now a couple of things happened</h3>
<p>One was a hack-day at work where I threw some of the code running live through Ableton, and the other was leaving it running over a weekend. Here&#8217;s a video from the hack-day, where I point at various things&#8230;</p>
<p><iframe src="http://player.vimeo.com/video/36147194?byline=0&amp;portrait=0" frameborder="0" width="500" height="281"></iframe></p>
<p><a href="http://vimeo.com/36147194">Guardian Ambient Radio</a> from <a href="http://vimeo.com/revdancatt">RevDanCatt</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>And the audio on SoundCloud so you can hear how it compares to the javascript version.</p>
<p><iframe src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F35335455&amp;show_artwork=true" frameborder="no" scrolling="no" width="100%" height="166"></iframe></p>
<p>&nbsp;</p>
<h1><a name="sound-design"></a>SOUND DESIGN</h1>
<p>Actually, I expect some influence for the project comes from way, way back, specifically these two tracks&#8230;</p>
<p>Vangelis: Albedo 0.39<br />
<object width="480" height="360" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 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://www.youtube.com/v/rL1oU6fH25w?version=3&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed width="480" height="360" type="application/x-shockwave-flash" src="http://www.youtube.com/v/rL1oU6fH25w?version=3&amp;hl=en_US&amp;rel=0" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object></p>
<p>Vangelis: Intergalactic Radio Station<br />
<object width="480" height="360" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 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://www.youtube.com/v/Dx3FPiHqG8U?version=3&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed width="480" height="360" type="application/x-shockwave-flash" src="http://www.youtube.com/v/Dx3FPiHqG8U?version=3&amp;hl=en_US&amp;rel=0" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object></p>
<p>&#8230;for those without embeds, here are the links&#8230;</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=rL1oU6fH25w">Vangelis: Albedo 0.39</a></li>
<li><a href="http://www.youtube.com/watch?v=Dx3FPiHqG8U&amp;fmt=18">Vangelis: Intergalactic Radio Station</a></li>
</ul>
<p>&#8230;which I kind of fell in love with when I was a teenager. This idea of future radio, soundscape, spoken word over the top and so on.</p>
<p>So I wanted an evolving soundscape that mutated based on the current headline&#8217;s section, or several soundscapes that I could blend between. But for this I have just the one made up of three layers, all produced by <a href="http://www.native-instruments.com/#/en/products/producer/reaktor-55/?content=553">Native Instruments&#8217; SpaceDrone</a> [<strong>WARNING</strong>: auto plays sound] in REAKTOR.</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Reaktor-5-SpaceDrone.rkplr_.jpg"><img class="aligncenter size-full wp-image-1228" title="Reaktor 5 - SpaceDrone.rkplr" src="http://revdancatt.com/wp-content/uploads/2012/04/Reaktor-5-SpaceDrone.rkplr_.jpg" alt="" width="706" height="243" /></a></p>
<p>SpaceDrone is one of the three factory defaults that ships with the free version of the REAKTOR player (<a href="http://www.native-instruments.com/#/en/products/producer/reaktor-5-player/?page=1592">you can grab it here</a>)</p>
<p>The layers are&#8230;</p>
<dl>
<dt>A background ambient drone, the &#8220;A Planet Called Earth&#8221; Snapshot.</dt>
<dd><object width="100%" height="18" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="src" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44320842&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" /><embed width="100%" height="18" type="application/x-shockwave-flash" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44320842&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" allowscriptaccess="always" wmode="transparent" /> </object></dd>
<dt>The rain/&#8221;white noise&#8221;, unsurprisingly &#8220;PouringRain&#8221; Snapshot.</dt>
<dd><object width="100%" height="18" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="src" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321352&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" /><embed width="100%" height="18" type="application/x-shockwave-flash" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321352&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" allowscriptaccess="always" wmode="transparent" /> </object></dd>
<dt>And bird &#8220;tweets&#8221;, again unsurprisingly &#8220;Birds&#8221; default.</dt>
<dd><object width="100%" height="18" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="src" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321531&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" /><embed width="100%" height="18" type="application/x-shockwave-flash" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321531&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" allowscriptaccess="always" wmode="transparent" /> </object></dd>
</dl>
<p>Just to take the edge of things volume of the rain and birds is controlled by two out of sync stretched sine waves, making them flow in and out of the main ambient sound.</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/soundscape1.jpg"><img class="aligncenter size-full wp-image-1249" title="soundscape1" src="http://revdancatt.com/wp-content/uploads/2012/04/soundscape1.jpg" alt="" width="1020" height="440" /></a></p>
<p>And the code controlling that basically performs a sin calculation based on the number of seconds since the start of 1970 (the birth of time for computers)&#8230;</p>
<pre class="prettyprint linenums:1">setInterval(function() {
var d = new Date();

var v = Math.sin(d.getTime()/32127)/2+0.5;
$('#birds').get(0).volume=v;

v = Math.sin(d.getTime()/25000)/2+0.5;
$('#rain').get(0).volume=v*0.8;
}, 1000);</pre>
<p>The results of a sin give us a value between -1 and 1. Obviously we only want positive numbers, negative volume is no good to us. To shift everything up into positive numbers we dividing by 2 (giving us -0.5 to 0.5) and finally add 0.5 moves everything up.</p>
<p>In the above code I&#8217;m knocking back the rain a bit by multiplying the volume by 0.8</p>
<p>And lastly because the main background ambient sound is being recorded directly from SpaceDrone and is evolving with sweeping pads rather than a simple looping sample I had to make it loop (the rain and birds loop just fine without any work).</p>
<p>Here&#8217;s the waveform of the background as recorded into Ableton Live. As you can see it&#8217;s recorded in stereo and some bits are louder than others. To increase the chances of getting a good loop starting position I recorded until it looked like the volume of each channel roughly matched the starting volume&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Matching-endpoints.jpg"><img class="aligncenter size-full wp-image-1240" title="Matching endpoints" src="http://revdancatt.com/wp-content/uploads/2012/04/Matching-endpoints.jpg" alt="" width="960" height="589" /></a></p>
<p>To make the loop I could have just stuck a reversed copy onto the end, so it&#8217;d play forwards and then backward, which would make the whole thing loop. But I didn&#8217;t want to double the length of the sample or the size of the file.</p>
<p>Instead I took it into Audacity&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Audacity1.jpg"><img class="aligncenter size-full wp-image-1230" title="Audacity1" src="http://revdancatt.com/wp-content/uploads/2012/04/Audacity1.jpg" alt="" width="984" height="642" /></a></p>
<p>&nbsp;</p>
<p>Converted it from Stereo to Mono&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Audacity2.jpg"><img class="aligncenter size-full wp-image-1231" title="Audacity2" src="http://revdancatt.com/wp-content/uploads/2012/04/Audacity2.jpg" alt="" width="984" height="642" /></a></p>
<p>&nbsp;</p>
<p>Duplicated the track and reversed it&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Audacity3.jpg"><img class="aligncenter size-full wp-image-1232" title="Audacity3" src="http://revdancatt.com/wp-content/uploads/2012/04/Audacity3.jpg" alt="" width="984" height="642" /></a></p>
<p>&nbsp;</p>
<p>And then finally mixed it down to a single track that would have a seemless loop, which *is* mirrored, but the original length&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Audacity4.jpg"><img class="aligncenter size-full wp-image-1233" title="Audacity4" src="http://revdancatt.com/wp-content/uploads/2012/04/Audacity4.jpg" alt="" width="984" height="642" /></a></p>
<p>Speaking of loops&#8230;</p>
<h2>OGG v MP3 and seamless loops</h2>
<p>Here are the three soundscape components in &lt;audio&gt; tags on the page.</p>
<pre class="prettyprint linenums:1">&lt;audio id="drone" width="300" height="32" class="player" src="snd/drone.ogg" loop="loop" autoplay="autoplay"&gt;&lt;/audio&gt;
&lt;audio id="rain" width="300" height="32" class="player" src="snd/rain.ogg" loop="loop" autoplay="autoplay"&gt;&lt;/audio&gt;
&lt;audio id="birds" width="300" height="32" class="player" src="snd/birds.ogg" loop="loop" autoplay="autoplay"&gt;&lt;/audio&gt;</pre>
<p>As you can see they are all set to loop &amp; autoplay. I found with MP3s there were gaps in the looping and reading up various bug reports about this suggested three things&#8230;</p>
<ol>
<li>because of the way MP3s are decoded its quite tricky for the browser to seamlessly loop them (although I&#8217;m not clear why this should be).</li>
<li>Write various event checking hacks to try and force a better loop or bounce between two samples, starting one when the other finished.</li>
<li>Use OGG instead.</li>
</ol>
<p>Because I really want to get behind the &lt;audio&gt; &amp; &lt;video&gt; tags and believe that they should (and one day will) just work without any hacks or work arounds I&#8217;ve stubbornly used OGG and nothing else to make sure the user gets a good audio experience.</p>
<p>In my experience the looping <em>is</em> better, but gaps start to appear if you have other things going on the computer or in many other tabs. One day all this will magically just work!</p>
<h2>The last two sound elements</h2>
<p>With all the background sound out of the way there are two more (well three I guess) audio elements.</p>
<p>Because this is supposed to be ambient and just running the the background, your mind isn&#8217;t really paying attention to it. Meaning that when a new headlines arrived if it just launched into speaking you miss most of what was actually said. This isn&#8217;t helped by the Text-to-Speech being pretty hard to understand <em>anyway.</em></p>
<p>I tried to fix this by taking a couple of seconds to fade out the ambient background before speaking the headlines. The fading gives your brain a cue that something is about to happen, as well as making it easier to hear the speaking over the top of the background sound.</p>
<p>Turns out it still wasn&#8217;t enough to prepare you to hear the headline.</p>
<p>So I added two more things. An alert before the headline to let you know one was about to appear, and the Text-To-Speech to start with the section that the headline was coming from, ie. &#8216;Sport &#8211; some footballer just did something&#8217;. Not because I particularly cared for the section, but rather to have one or two words at the start that the brain could throw away while tuning in and it not to matter too much.</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/soundscape2.jpg"><img class="aligncenter size-full wp-image-1250" title="soundscape2" src="http://revdancatt.com/wp-content/uploads/2012/04/soundscape2.jpg" alt="" width="1020" height="519" /></a></p>
<p><em>But</em> because this is supposed to be ambient, the alert wasn&#8217;t to be <em>too</em> alerty, so you could just ignore if (and the headline) if you wanted to. Basically a not very alerting alert.</p>
<p>For no better reason than just to amuse myself I took the three tone xylophone Bing-Dee-Bing noise from the 80s BBC comedy program Hi-De-Hi. This is very much like the Ding-Dong sounds you get before airport and train station announcements, but with more knowing irony.</p>
<p><object width="100%" height="18" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="src" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321800&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" /><embed width="100%" height="18" type="application/x-shockwave-flash" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321800&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" allowscriptaccess="always" wmode="transparent" /> </object></p>
<p>For anyone my age in the UK who wasn&#8217;t allowed to watch ITV because of the adverts the &#8220;Bing-Dee-Bing, Hello Campers&#8221; (<a href="http://youtu.be/ICLzchqt8kg?t=30s">as seen at the start of this YouTube clip right after the credits</a>) represents the age at which our uncomfortable understanding of things that are supposed to be funny being deeply unfunny and yet unable to escape it, begins to develop.</p>
<p>&#8220;Bing-Dee-Bing&#8221; at 30s</p>
<p><object width="480" height="360" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 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://www.youtube.com/v/ICLzchqt8kg?version=3&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed width="480" height="360" type="application/x-shockwave-flash" src="http://www.youtube.com/v/ICLzchqt8kg?version=3&amp;hl=en_US&amp;rel=0" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object></p>
<p>Last but not least, sometimes it can be a long time between headlines. This is the point at which I begin to wonder if something has gone wrong with my code and it has stopped updating or goodness knows what. To put my mind at rest, if after 7 minutes there are no new headlines it plays a little jingle, and gives a &#8220;You&#8217;re listening to Guardian Ambient Headline Radio&#8221; ident.</p>
<p>Instead of the alert, I opted for a &#8220;jingle&#8221; kind of sound, something newsy and more upbeat than the ambient sound. Hopefully it wouldn&#8217;t play too often, because if it did it meant that the Guardian itself was broken :)</p>
<p><object width="100%" height="18" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="src" value="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321955&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" /><embed width="100%" height="18" type="application/x-shockwave-flash" src="https://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44321955&amp;auto_play=false&amp;player_type=tiny&amp;font=Arial&amp;color=ff7700" allowscriptaccess="always" wmode="transparent" /> </object></p>
<p>The ambience fades, the jingle kicks in, ident, and then back to ambience.</p>
<p>I <em>think</em> that&#8217;s all for the sound. Probably need to add a volume control at some point too.</p>
<p>&nbsp;</p>
<h1><a name="text-to-speech"></a>TEXT TO SPEECH</h1>
<p>The text to speech is provided by <a href="http://syntensity.com/static/espeak.html">speak.js</a> which is a javascript implementation of <a href="http://espeak.sourceforge.net/">eSpeak</a> the open source speech synthesizer. The file itself though is 2.3MB, not really something you want to throw at a project just because having some extra functionality would be nice.</p>
<p>In this case it was the main premise for the project so no big deal.</p>
<p>I did have a quick look round at web services that&#8217;d take a chunk of text and turn it into a better quality mp3 file but nothing really took my fancy.</p>
<p>And, in <em>theory</em> I could recompile the speak.js to use a different, slightly more defined voice but following the instructions made my head hurt :)</p>
<p>Anyway, the implementation is really easy and I just had to add one hook to detect when the audio had finished playing (it creates an &lt;audio&gt; tag on the fly, so I just added a line directly afterwards attaching the &#8220;end&#8221; event).</p>
<p>&nbsp;</p>
<h1><a name="graphic-design"></a>GRAPHIC DESIGN</h1>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Guardian-Ambient-Headline-Radio-v0.6.3.jpg"><img class="aligncenter size-full wp-image-1241" title="Guardian Ambient Headline Radio v0.6.3" src="http://revdancatt.com/wp-content/uploads/2012/04/Guardian-Ambient-Headline-Radio-v0.6.3.jpg" alt="" width="1513" height="1136" /></a></p>
<p>I&#8217;ve already covered the design in more detail over here: <a href="http://revdancatt.com/2012/03/31/the-pxl-effect-with-javascript-and-canvas-and-maths/">The pxl effect with javascript and canvas (and maths)</a>, the gist of it though is this&#8230;</p>
<p>Via the Guardian API, without an API key, you only have access to the thumbnails for each story, which are tiny 140x86px. I wanted to do something that could blow-up the image to a full screen in an interesting way, but didn&#8217;t overshadow main objective of the project being about sound.</p>
<p>And so it turns the thumbnail into a somewhat abstract background, which you can still kind of tell what it is, but not always.</p>
<p>Then I figured it could also have a second function of giving you a general idea of how &#8220;fresh&#8221; a headline was, by adding some blur/glow filters over time. If the image is nice and crisp with sharp edges then it&#8217;s new. If it&#8217;s blurred then it&#8217;s been around a while.</p>
<p>Yet another background signal of information, it looks a bit like this&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/blurandfading.jpg"><img class="aligncenter size-full wp-image-1242" title="blurandfading" src="http://revdancatt.com/wp-content/uploads/2012/04/blurandfading.jpg" alt="" width="1358" height="926" /></a></p>
<p>I&#8217;m using the <a href="http://www.pixastic.com/">Pixastic</a> js library for all the heavy blur lifting (or at least until we get it a bit more <a href="http://www.webkitbits.com/post/20911443176/webkit-filter-is-the-new-hotness-and-its-coming">native into webkit</a>)</p>
<p>Once a second after two minutes it applies the following filters. The values are pretty small because otherwise the whole thing goes to mush in less than a minute :)</p>
<pre class="prettyprint linenums:1">ct=$('#targetCanvas')[0];
Pixastic.process(ct, "glow", {amount:0.003,radius:3.0});
ct=$('#targetCanvas')[0];
Pixastic.process(ct, "noise", {mono:true,amount:0.01,strength:0.05});
ct=$('#targetCanvas')[0];
Pixastic.process(ct, "blurfast", {amount:0.04});</pre>
<p>The end result is often very pleasing and a contrast to the original sharp image.</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Guardian-Ambient-Headline-Radio-v0.6.3-7.jpg"><img class="aligncenter size-full wp-image-1243" title="Guardian Ambient Headline Radio v0.6.3-7" src="http://revdancatt.com/wp-content/uploads/2012/04/Guardian-Ambient-Headline-Radio-v0.6.3-7.jpg" alt="" width="1364" height="764" /></a></p>
<p>&nbsp;</p>
<h1><a name="technology"></a>TECHNOLOGY</h1>
<p>And there we have it, background image, ambient audio and text to speech all running on the client in javascript and modern technologies, i.e. HTML5, CSS3 when we get the image filters.</p>
<p>Running in the client is a lot more limiting but at the same time I don&#8217;t need to tie up two laptops constantly running with 100s of pounds worth of software &#8220;broadcasting&#8221; out to the internet 24hours a day.</p>
<p>Although that does have a certain appeal. I&#8217;m going to see if I can get that down to one laptop.</p>
<p>&nbsp;</p>
<h1><a name="things-ive-learnt"></a>THINGS I LEARNT ALONG THE WAY</h1>
<p>The final implimentation turned out to be pretty quick and easy, it&#8217;s just the year thinking about it and hunting out libraries that took the time :)</p>
<p>And during that time I&#8217;ve had a good look around Ableton Live, it no-longer make no-sense-at-all, which is nice. Same for Native Instruments stuff, lots of gorgeous synths I&#8217;ve not had the chance to dig into too much.</p>
<p>I also watched a whole bunch of videos over at MacProVideo, specifically:</p>
<ul>
<li><a href="http://www.macprovideo.com/tutorials/musictheory-application">Music Theory</a></li>
<li><a href="http://www.macprovideo.com/tutorials/Ableton-application">Ableton Live; 101, 102, 202 &amp; 405</a></li>
<li><a href="http://www.macprovideo.com/tutorials/nativeinstruments-application">Native Instruments; 102, 203 &amp; 104</a></li>
</ul>
<p>I grabbed a years subscription, not sure I&#8217;d want to buy each lession individually.</p>
<p><a href="http://en.wikipedia.org/wiki/Open_Sound_Control">Open Sound Control</a> is another fun thing I looked at, along with <a href="http://hexler.net/software/touchosc">TouchOSC</a> and the <a href="http://itunes.apple.com/gb/app/lemur/id481290621?mt=8">Lemur OSC controller</a> mainly because I like the idea of controling stuff with futuristic looking touch surfaces&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/HexlerTouchOSC.png"><img class="aligncenter size-full wp-image-1244" title="HexlerTouchOSC" src="http://revdancatt.com/wp-content/uploads/2012/04/HexlerTouchOSC.png" alt="" width="546" height="412" /></a></p>
<p>Image from <a href="http://hexler.net/">h e x l e r</a></p>
<p><a href="http://processing.org/">Processing</a> + MIDI &amp; OSC, I&#8217;ve used processing for a while now but it was nice to drop in the oscP5 and proMidi libraries to have a quick play at sending messages back and forth. I didn&#8217;t get to use them for this project, but knowing I can make Lemur running on the iPad talk to processing makes me very happy indeed. Now I just have to shoe horn it into a project.</p>
<p>I guess the one thing that I saw a hint of, but didn&#8217;t really dig into was generating the ambient soundscapes with javascript. I&#8217;ve seen some interesting pieces here &amp; there about generating WAVs on the fly (which is how the text-to-speech works), and bits &amp; bobs around the audioData API. So at some point I may try and have a go at doing something with that.</p>
<p>Anyway, The END.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/04/25/guardian-ambient-headline-radio-the-definitive-blogpost/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Chrome Extension of the pxl effect for Flickr &amp; GitHib pages.</title>
		<link>http://revdancatt.com/2012/04/12/a-chrome-extension-of-the-pxl-effect-for-flickr-githib-pages/</link>
		<comments>http://revdancatt.com/2012/04/12/a-chrome-extension-of-the-pxl-effect-for-flickr-githib-pages/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 22:12:32 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[guardian]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1205</guid>
		<description><![CDATA[Ok, so last mention of the pxl effect thing that I posted about a short while back and then we can all move on with the next stage of the Guardian Ambient Headline Radio thing. I decided I quite liked the effect and rather than just applying it to thumbnails of Guardian news stories I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/Flambient.jpg"><img class="aligncenter size-full wp-image-1206" title="Flambient" src="http://revdancatt.com/wp-content/uploads/2012/04/Flambient.jpg" alt="" width="1015" height="638" /></a></p>
<p>Ok, so last mention of the <a title="The pxl effect with javascript and canvas (and maths)" href="http://revdancatt.com/2012/03/31/the-pxl-effect-with-javascript-and-canvas-and-maths/">pxl effect thing that I posted about a short while back</a> and then we can all move on with the next stage of the Guardian Ambient Headline Radio thing.</p>
<p>I decided I quite liked the effect and rather than just applying it to thumbnails of Guardian news stories I rather wanted to add it to any Flickr photo I was looking at. This was a great excuse to combine a few things.</p>
<ol>
<li>Make the code universal for any sized image, rather then the 140px*84px images from the Guardian.</li>
<li>Have a go at creating a <a href="http://revdancatt.github.com/Flambient/">Chrome Extension</a> that would appear on a specific site, in this case Flickr, it&#8217;s <a href="http://revdancatt.github.com/Flambient/">here</a> btw.</li>
<li>Play with the new <a href="https://github.com/blog/1081-instantly-beautiful-project-pages">automatic GitHub pages generator</a>.</li>
</ol>
<h2>Universal Image Size</h2>
<p>First thing I did was remove all the size specific code, and clean up the code a bit making it shorter, tighter and faster, oh and better comments. Probably the best place to find it is over here: <a href="https://github.com/revdancatt/GuardianAmbientHeadlineRadio/blob/master/js/aesthetic.js">github.com/revdancatt/&#8230;/blob/master/js/aesthetic.js</a></p>
<p>Scott took the code, node.js-ified it and used it to process some video, the effect is good [Flash video]&#8230;</p>
<p><object width="640" height="360" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="intl_lang=en-us&amp;photo_secret=77cf783b93&amp;photo_id=6913710228&amp;hd_default=false" /><param name="allowFullScreen" value="true" /><param name="src" value="http://www.flickr.com/apps/video/stewart.swf?v=109786" /><param name="allowfullscreen" value="true" /><embed width="640" height="360" type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=109786" flashvars="intl_lang=en-us&amp;photo_secret=77cf783b93&amp;photo_id=6913710228&amp;hd_default=false" allowFullScreen="true" allowfullscreen="true" /></object></p>
<h2>Chrome Extensions &amp; Accessing the Canvas Object</h2>
<p>Then I turned the whole thing into a Chrome Extension that you can install over here: <a href="http://revdancatt.github.com/Flambient/">http://revdancatt.github.com/Flambient/</a></p>
<p>I kept hearing that Chrome Extensions were easy (like Greasemonkey scripts) and could be pretty full featured, to the extent of full on web Apps that you can download from the Chrome Appstore thingy. But had never really had an excuse to do so.</p>
<p>Turns out that Google&#8217;s documentation is both 100% correct and 100% unhelpful. Maybe how my brain works just doesn&#8217;t grok their way of writing.</p>
<p>Anyhow, I thought it was all going to be easy, you create a bunch of files that are going to be your Extension, some of which &#8220;Content Scripts&#8221; which run in the context of the page you&#8217;re looking at. Brilliant I thought, I&#8217;ll put all my code to grab the image and put it onto the canvas there, that way I won&#8217;t have any trouble with same-domain security policy stuff.</p>
<p>Wrong!</p>
<p>As soon as I copied the photo on the Flickr page to a canvas object I tried to get the pixel data and the security error was thrown. Hummmmmmmm.</p>
<p>With extensions you also have &#8220;background&#8221; html or scripts. A &#8220;background&#8221; html page is basically a hidden page that you can use as a scratch pad. <strong><em>But</em></strong> the background page (and any javascript on it) <em>don&#8217;t</em> have access to the page the extension is running on, Grrrrrrrrrrr.</p>
<p>Finally there&#8217;s a messaging system that allows the <em>content scripts</em> (running in the context of the page) to talk to the <em>background html</em>, and of course the other way. So in the end I had the content script find the URL of the image, pass it to the background html in a message, load it into a canvas object, do the pxl effect there which oddly <em>doesn&#8217;t</em> throw a same domain error (I&#8217;m sure it makes sense why, but you know, whatever). Encode it as base64 and send it back.</p>
<p>Frankly far more effort than I thought it was going to be. But at least once I&#8217;d gotten through it all I ended up with a pretty good understanding and framework for any other projects I foolishly decide to do.</p>
<p>If you&#8217;re interested the code now sits over here: <a href="https://github.com/revdancatt/Flambient/tree/master/source">https://github.com/revdancatt/Flambient/tree/master/source</a></p>
<h2>Automatic GitHub Pages</h2>
<p>And lastly, the actual hosting of the extension.</p>
<p>Luckily for us, and unsurprisingly because GitHub are awesome, they have all the mime types setup on their servers to correctly serve a Chrome Extension (and you can even point the extension&#8217;s update URL to the update file on GitHub which is nice).</p>
<p>I really like GitHub Pages, for hosting project that run purely in HTML5/CSS/javascript they&#8217;re a great way of doing it. It tightly couples the code you&#8217;re writing to how people can view it up and running.</p>
<p>But this project was slightly different as it&#8217;s a <em>thing</em> not a webpage/site, which gave me a chance to try out the Automated Pages Creator. The end result is here&#8230;</p>
<p><a href="http://revdancatt.github.com/Flambient/">http://revdancatt.github.com/Flambient/</a></p>
<p>&#8230;which looks pretty good. You kick off the whole page generator thing, enter a few settings, pick a theme and then click build. It gives you a &#8220;gh-pages&#8221; branch which you then checkout and tweak to your hearts delight.</p>
<p>In this case I chucked in the nice Install Now button and the graphic up in the header.</p>
<h2>Closing Words</h2>
<p>So there we go, code to turn any sized image into a pxl image, a Chrome Extension built and a natty little GitHub pages page, wasn&#8217;t bad for a nights work.</p>
<p>Now however, back to getting the Ambient Headline Radio to actually do all the reading out headlines &amp; sound bit rather than banging on about the graphics :)</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/04/12/a-chrome-extension-of-the-pxl-effect-for-flickr-githib-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I feel that I must now post something&#8230;</title>
		<link>http://revdancatt.com/2012/04/11/i-feel-that-i-must-now-post-something/</link>
		<comments>http://revdancatt.com/2012/04/11/i-feel-that-i-must-now-post-something/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 21:21:18 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1202</guid>
		<description><![CDATA[&#8230;to make that stupid Dell infographic not the most recent thing on my blog :( So there&#8217;s a nice photo I took on my morning commute to London instead. &#160;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/revdancatt/6915743594/in/photostream"><img class="aligncenter size-full wp-image-1203" title="Morning" src="http://revdancatt.com/wp-content/uploads/2012/04/Morning.jpeg" alt="" width="1024" height="683" /></a></p>
<p>&#8230;to make that stupid Dell infographic <strong><em>not</em></strong> the most recent thing on my blog :(</p>
<p>So there&#8217;s a nice photo I took on my morning commute to London instead.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/04/11/i-feel-that-i-must-now-post-something/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The good news about disaster recovery planning – it’s not as hard as it used to be [Infographic]</title>
		<link>http://revdancatt.com/2012/04/11/the-good-news-about-disaster-recovery-planning-its-not-as-hard-as-it-used-to-be-infographic/</link>
		<comments>http://revdancatt.com/2012/04/11/the-good-news-about-disaster-recovery-planning-its-not-as-hard-as-it-used-to-be-infographic/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 21:12:58 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1194</guid>
		<description><![CDATA[Dell Cloud Clinical Archive infoGraphic from Dell:]]></description>
			<content:encoded><![CDATA[<p><a href="http://content.dell.com/us/en/healthcare/d/healthcare/dell-cloud-clinical-archive.aspx">Dell Cloud Clinical Archive</a> infoGraphic from Dell:<br /><img src="http://en.community.dell.com//resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-11/4377.DELL_5F00_DisasterRecovery_5F00_FA.JPG" alt="Dell disaster recovery infographic"/></p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/04/11/the-good-news-about-disaster-recovery-planning-its-not-as-hard-as-it-used-to-be-infographic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The one in which I encompass everything I&#8217;ve ever learnt about Art</title>
		<link>http://revdancatt.com/2012/04/09/in-which-i-encompass-everything-ive-ever-learnt-about-art/</link>
		<comments>http://revdancatt.com/2012/04/09/in-which-i-encompass-everything-ive-ever-learnt-about-art/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 11:41:39 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1182</guid>
		<description><![CDATA[ONE I quite like Bauhaus (both the school/movement and the band) TWO &#8220;To choose order over disorder, or disorder over order, is to accept a trip composed of both the creative and the destructive. But to choose the creative over the destructive is an all-creative trip composed of both order and disorder&#8221; - Malaclypse the Younger, K.S.C. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/revdancatt/6858655619/in/photostream"><img class="size-full wp-image-1183" title="Present at Creation" src="http://revdancatt.com/wp-content/uploads/2012/04/Present-at-Creation.jpg" alt="" width="1024" height="683" /></a></p>
<h2>ONE</h2>
<p>I quite like Bauhaus (both the <a href="http://en.wikipedia.org/wiki/Bauhaus">school/movement</a> and the <a href="http://en.wikipedia.org/wiki/Bauhaus_(band)">band</a>)</p>
<h2>TWO</h2>
<p>&#8220;To choose order over disorder, or disorder over order, is to accept a trip composed of both the creative and the destructive. But to choose the creative over the destructive is an all-creative trip composed of both order and disorder&#8221; - Malaclypse the Younger, K.S.C.</p>
<h2>THREE</h2>
<p>Disregard anything said by anyone older than you, pay attention to those younger.</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/04/09/in-which-i-encompass-everything-ive-ever-learnt-about-art/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why the New Aesthetic isn&#8217;t about 8bit retro, the Robot Readable World, computer vision and pirates</title>
		<link>http://revdancatt.com/2012/04/07/why-the-new-aesthetic-isnt-about-8bit-retro-the-robot-readable-world-computer-vision-and-pirates/</link>
		<comments>http://revdancatt.com/2012/04/07/why-the-new-aesthetic-isnt-about-8bit-retro-the-robot-readable-world-computer-vision-and-pirates/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 21:47:26 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[new aesthetic]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1154</guid>
		<description><![CDATA[I&#8217;ve avoided weighing in on the New Aesthetic thing, being happy just to watch it unfurl from the edges, but since I&#8217;ve seen this come up a couple of times I just can&#8217;t resist. Tom Coates as always poses a good question, although I&#8217;ve seen other people also mention it in comments and so on. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve avoided weighing in on the <a href="http://www.wired.com/beyond_the_beyond/2012/04/an-essay-on-the-new-aesthetic/">New Aesthetic</a> thing, being happy just to watch it unfurl from the edges, but since I&#8217;ve seen this come up a couple of times I just can&#8217;t resist. Tom Coates as always poses a good question, although I&#8217;ve seen other people also mention it in comments and so on.</p>
<p>&nbsp;</p>
<blockquote class="twitter-tweet tw-align-center"><p>The thing about the <a href="https://twitter.com/search/%2523newaesthetic">#newaesthetic</a> I don&#8217;t completely get is why it&#8217;s so heavily influenced by the colors and 8 bit graphics of the 1980s.</p>
<p>— Tom Coates (@tomcoates) <a href="https://twitter.com/tomcoates/status/188392908158795777" data-datetime="2012-04-06T22:29:04+00:00">April 6, 2012</a></p></blockquote>
<blockquote class="twitter-tweet tw-align-center"><p>I mean, things being pixellated &#8211; digital in the real world &#8211; if anything, pixellation is on its way *out* with retina screens et al…</p>
<p>— Tom Coates (@tomcoates) <a href="https://twitter.com/tomcoates/status/188393321054478338" data-datetime="2012-04-06T22:30:42+00:00">April 6, 2012</a></p></blockquote>
<blockquote class="twitter-tweet tw-align-center"><p>Pixellation, tessellation, patterns and artefacting seem to me to be already retro. We&#8217;re going HD, algorithmically generated, retina screen</p>
<p>— Tom Coates (@tomcoates) <a href="https://twitter.com/tomcoates/status/188393736491900930" data-datetime="2012-04-06T22:32:21+00:00">April 6, 2012</a></p></blockquote>
<p>&nbsp;</p>
<p>The answer is this (and I&#8217;ll expand later) images, fashion and so on in the 80s was inspired by the <em>computer graphics</em> of the time, and ideas around what computer graphics <em>would</em> look like. So lots of 8bit stuff, neon and Tron like faff.</p>
<p>The New Aesthetics, or at least the aspect I&#8217;m looking at, is inspired by <em>computer <strong>vision</strong></em>. And computer vision is at the point <em>now</em> that computer graphics <em>was</em> at 30 years ago. The New Aesthetics isn&#8217;t concerned with retro 8bit graphics of the past, but the 8bit graphics designed for machines of the now.</p>
<p>Maybe this image will help, before I go and justify my above statement&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/04/VisionVGraphics.jpg"><img class="aligncenter size-full wp-image-1160" title="VisionVGraphics" src="http://revdancatt.com/wp-content/uploads/2012/04/VisionVGraphics.jpg" alt="" width="500" height="727" /></a></p>
<p>I&#8217;ll come back to Vision vs Graphics in a moment.</p>
<p>But if, for example a fashion designer took inspiration from the motion capture outfits above, and made clothes featuring large 1bit &#8220;pixels&#8221; I&#8217;d count that as New Aesthetic. But how are new pixels different from old pixels?</p>
<h2>The Robot Readable World</h2>
<p>A lot of the New Aesthetic is directly related to (or descended from) the Robot Readable World (RRW). You can read way more about that over at the BERG: <a href="http://berglondon.com/blog/2011/08/03/the-robot-readable-world/">The Robot-Readable World</a>. And even earlier in Matt&#8217;s slides from 2007: <a href="http://www.slideshare.net/blackbeltjones/interesting2007">The Vernacular of the Spectacular &#8211; Playing with Bits of The City</a>, in which you can see obvious precursors to what we&#8217;re now called NA (slides 25, 30, 34 &amp; 45).</p>
<p>See also, <a href="http://www.elasticspace.com/2012/02/robot-readable-world">Robot Readable World</a> - Timo Arnall, <a href="http://bldgblog.blogspot.co.uk/2011/08/new-robot-domesticity.html">THE NEW ROBOT DOMESTICITY</a> - bldgblog and <a href="http://trujillodiego.com/work/withrobots.html">With Robots</a> - Diego Trujillo Pisanty. Here&#8217;s an image from the <strong>With Robots</strong> project&#8230;</p>
<p><a href="http://trujillodiego.com/work/withrobots.html"><img class="size-full wp-image-1161" title="mugsweb" src="http://revdancatt.com/wp-content/uploads/2012/04/mugsweb.jpg" alt="" width="720" height="479" /></a></p>
<p class="wp-caption-text">Image: From With Robots by Diego Trujillo-Pisanty</p>
<p>Because machine/computer vision isn&#8217;t very advanced, to exist with machines in the real world we need to mark up the world to help them see. The above image is imagining how this could work, but below is it occurring in the real world&#8230;</p>
<p><a href="http://www.flickr.com/photos/kellan/6842274579/"><img class="size-full wp-image-1163" title="Robots navigate via a grid of QR codes" src="http://revdancatt.com/wp-content/uploads/2012/04/floor.jpg" alt="" width="765" height="1024" /></a></p>
<p class="wp-caption-text">Robots navigate via a grid of QR codes &#8211; Kellan</p>
<p>&#8230;QR codes (or something somewhat similar) are placed on a factory floor in a grid solely to aid robots, there is nothing here for us humans to use. And yet the passage of the robots create a pattern, tracks from the wheels and circles where the robots turn and turn and turn. This is computer vision spilling out into the real world.</p>
<p>It&#8217;s been there for a while now, bar codes have been around for years, but we can expect to see more of it. The testing and slow introduction of computer driven cars will most likely see special markings on roads &amp; signs giving the cars instructions. All throughout shops, malls, streets and cities markings for machines are appearing.</p>
<p>The first part of NA I&#8217;ve been paying attention to has been the examples of this spilling out, the bits of the city not meant for us. The second part of NA I paid attention to was what happened when artists began to deconstruct and respond to that encroachment, how can designing for robots influence our own design?</p>
<h2>8bit retro computer vision</h2>
<p>So how do I know that computer vision is lagging behind computer graphics? Well firstly I know I can easily buy two consumer grade specifically design graphics cards with GPUs on running in parallel to install in my desktop PC. I don&#8217;t seem to be able to buy specifically design computer <em>vision</em> cards to stick in my machine. In the consumer space one is definitely leading the other.</p>
<p>Secondly, games can create all sorts of worlds, spaceships, fantasy lands, renditions of hell, cities from the 80s and so on with their fancy graphics, reflections, fog, shaders, realistic light sources and particle effects all adding to the effect.</p>
<p>Computer vision can recognise faces (<a href="http://urbanhonking.com/ideasfordozens/2012/01/14/machine-pareidolia-hello-little-fella-meets-facetracker/">badly</a>), blocky Augmented Reality (AR) surfaces and very specifically registered AR surfaces.</p>
<p>Consumer desktops can produce pretty good environments in real-time  (heck the new iPad can) and render photorealistic images given a bit longer. Meanwhile they can <em>see</em> bugger all, unless we&#8217;ve specifically designed it for them.</p>
<p>Here&#8217;s a quick list of the progression of computer game graphics, and a screenshot from Sentinel because I like it&#8230;</p>
<p><a href="http://www.sci-fi-o-rama.com/2012/03/01/the-virtual-art-of-the-80s-game-world/"><img class="size-full wp-image-1171" title="The Sentinel" src="http://revdancatt.com/wp-content/uploads/2012/04/TheSentinel.png" alt="" width="640" height="513" /></a></p>
<p class="wp-caption-text">Sentinel screenshot from sci-fi-o-rama.com</p>
<p>&#8230;actually now&#8217;s a good time to jump over to <a href="http://www.sci-fi-o-rama.com/2012/03/01/the-virtual-art-of-the-80s-game-world/">The Virtual Art of 80′s Game Worlds</a> for a quick read, and then come back.</p>
<p>That list, in sort-of kinda easily disputable chronological order (fit <a href="http://en.wikipedia.org/wiki/Alone_in_the_Dark_(video_game)">Alone in the Dark</a> in where you like)</p>
<ul>
<li>2D graphics</li>
<li>Parallax</li>
<li>Isometric</li>
<li>Wireframe 3D</li>
<li>Solid 3D</li>
<li>Textured 3D/Gradient filled 3D</li>
<li>Particle effects</li>
<li>Voxels</li>
<li>Level of Details 3D models &amp; shaders</li>
<li>Dynamic lighting</li>
<li>Procedurally generated environments</li>
<li>Retina displays/3D displays</li>
<li>Augmented Reality (AR)</li>
<li>Photo realistic realtime AR</li>
</ul>
<p>That seems like a not unreasonable list. And getting back to the tweet posted by Coates above, if New Aesthetics was aping early computer graphics, the 2D, Isometric, Solid 3D, 8Bit colours stuff, then indeed it&#8217;s being retro for no good reason, when it could take its cue from photo realistic AR &amp; retina displays, moving beyond the pixel.</p>
<p>Now a list of computer vision, in similar not-quite but almost correct order&#8230;</p>
<ul>
<li>Motion detection</li>
<li>Edge detection</li>
<li>&#8220;Blob&#8221; detection</li>
<li>Shape detection</li>
<li>Face detection</li>
<li>Depth &amp; Joint detection (XBox Kinetic, motion capture)</li>
<li>Colour detection</li>
<li>Gait detection</li>
<li>Gradient/Shade detection (ie. understanding colour in different lighting conditions)</li>
<li>Recognising humanoid forms against real world backgrounds</li>
<li>Recognising individuals against real world backgrounds</li>
<li>Recognising specific items against real world background</li>
<li>Understanding all nearby items within a real world environment</li>
<li>Skynet</li>
</ul>
<p>3D Wireframes were around 30 years ago, solid &amp; textured 3D shortly after and still all done in software. 20 years ago some of these calculations moved onto GPUs on dedicated 3D graphics cards.</p>
<p>Computer vision it&#8217;s <em>all</em> still done in software, and we&#8217;re roughly up-to depth, joints, colour &amp; shading detection, if the evolution was on par with graphics we&#8217;d start to see the first few dedicated <em>vision</em> cards appearing on the market for consumer use.</p>
<p><strong>Or put another way, current computer <em>vision</em> can probably &#8220;see&#8221; computer <em>graphics</em> from around 20-30 years ago</strong>.</p>
<p>Which in turn means to design for machine eyes we need to be at the level of computer graphics from the 8bit era, and so we have QR codes all over the place.</p>
<p>Chris Heathcote wrote about NA fashion: <a href="http://anti-mega.com/antimega/2012/04/02/a-new-fashion-aesthetic">a new fashion aesthetic</a>&#8230;</p>
<blockquote><p>&#8220;Sometimes it’s just the right colours, or the cut. It’s more gradient fill than pixels. It’s things that couldn’t be made 5 years ago. Supersymmetry and asymmetry. It’s not about the ‘machine vision’ that the New Aesthetic references, but it’s hard to see how that will not be appropriated and re-emerge into fashion as something not necessarily technically correct but aesthetically interesting.&#8221;</p></blockquote>
<p>I&#8217;m going to disagree with the &#8220;not about the ‘machine vision’&#8221; part, and wrap it up with markings for machines spilling out into the real world I mentioned above. If the markings machines can understand are currently at the level of edge detection, outline/shape, depth, joint &amp; colour shading/gradient and that&#8217;s out there in the world, being all odd and not for us, but inspiring and guiding designs, art and designers, then we get the gradient fills, sharp cuts &amp; polygones.</p>
<p>And I can see how that&#8217;s easy to confuse with retro 8bit 80s style, but as I mentioned before NA is about what machines can <em>see</em> now, rather than what they could produce back then, it&#8217;s just that <em>vision</em> is 20-30 years behind creation and so there are many similarities.</p>
<p>New Aesthetic is about the polygones and edges and pixels of now vision, not the polygones and edges and pixels of back then creation.</p>
<h2> A few last words</h2>
<p>I wanted to write this because I&#8217;ve seen a number of occasions where the question &#8220;But isn&#8217;t NA just retro?&#8221; has come up, and I can see why it comes up and where it comes from. I just wanted to explain that the NA pixels do come from some other place, the RRW. It isn&#8217;t all just glitch, but actually a response to new markings appearing in our world.</p>
<p>There are also other angles to the NA that <em>do</em> involve retro 8bit, such as this pixel Whale&#8230;</p>
<p><a href="http://www.flickr.com/photos/mmoorr/5714018337/"><img class="size-full wp-image-1173" title="Whale" src="http://revdancatt.com/wp-content/uploads/2012/04/Whale.jpg" alt="" width="612" height="612" /></a></p>
<p class="wp-caption-text">Whale &#8211; Flickmor</p>
<p>&#8230;which is a representation of pixels in the real world. And as Coates says, as we&#8217;re moving to retina displays, pixels as presentation is something that&#8217;s going away, making this image distinctly about nostalgia and yet still feels like NA.</p>
<p>And then on-top of that there&#8217;s art/design inspired by what&#8217;s been collected together so far, which gives us&#8230;</p>
<ol>
<li>Found art that&#8217;s actually stuff for machines</li>
<li>Art based on found art that&#8217;s actually stuff for machines</li>
<li>Art based on the art that&#8217;s based on found art that&#8217;s actually stuff for machines</li>
</ol>
<p>Number 1 is the markings on the factory floor for robots, number 2 is a lot of the New Aesthetic that&#8217;s been gathered that&#8217;s taken it&#8217;s inspiration from the factory floor markings.</p>
<p>I&#8217;ve partaken of number 3, I <a href="http://revdancatt.com/2012/03/31/the-pxl-effect-with-javascript-and-canvas-and-maths/">wrote some code to turn images into patterns</a>, rather like this&#8230;</p>
<p><a href="http://www.flickr.com/photos/revdancatt/6884093882/in/photostream"><img class="aligncenter size-full wp-image-1175" title="NA" src="http://revdancatt.com/wp-content/uploads/2012/04/NA.jpg" alt="" width="1024" height="683" /></a></p>
<p>I probably wouldn&#8217;t have made these design decisions if I hadn&#8217;t recently been immersed in the thinking about exactly what NA is (*spoiler* I still don&#8217;t really know). The look and feel is supposed to be that <em>of</em> NA, but I&#8217;m not sure this makes what I&#8217;ve done NA.</p>
<p>But what I&#8217;ve done here is no longer about machine vision and looks far closers to a variation on pixels and so reinforcing the retro confusion. It&#8217;s supposed to be modern not retro.</p>
<p><em>New pixels</em>, not <em>old pixels</em>.</p>
<h2>Drones</h2>
<p>I should probably mention drones, abet quickly, and my understanding of drones.</p>
<p>When I think of a drone I think of an autonomous agent, not something that&#8217;s being controlled remotely by people in a bunker with laptops (or whatever). Something with GPS, altimeter, navigation, satellite images, vision.</p>
<p>Something that left to its own devices can operate itself, sensing, watching, reacting. It is machine vision actualised.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/04/07/why-the-new-aesthetic-isnt-about-8bit-retro-the-robot-readable-world-computer-vision-and-pirates/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>The pxl effect with javascript and canvas (and maths)</title>
		<link>http://revdancatt.com/2012/03/31/the-pxl-effect-with-javascript-and-canvas-and-maths/</link>
		<comments>http://revdancatt.com/2012/03/31/the-pxl-effect-with-javascript-and-canvas-and-maths/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 22:44:00 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[guardian]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1136</guid>
		<description><![CDATA[As part of a bigger project I wanted to generate an abstract background image/texture. There&#8217;s obviously a huge number of ways to do this but due to a few constraints I put on myself the method I ended up with (described below) seemed like a good solution. First the constraints&#8230; 1) The project involves grabbing [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/revdancatt/6884093882"><img class="aligncenter" title="Yeah, so I pxl-ed all the screens" src="http://farm8.staticflickr.com/7212/6884093882_44d41c5115_b.jpg" alt="" width="1024" height="683" /></a></p>
<p>As part of a bigger project I wanted to generate an abstract background image/texture. There&#8217;s obviously a huge number of ways to do this but due to a few constraints I put on myself the method I ended up with (described below) seemed like a good solution. First the constraints&#8230;</p>
<p>1) The project involves grabbing the latest news headline from the Guardian API, and because I want to run this in javascript from a <a href="http://revdancatt.github.com/GuardianAmbientHeadlineRadio/">github hosted page</a> I don&#8217;t want to use an API key that everyone will be able see. Which in turn means I don&#8217;t have access to any of the images (you need an API key to get the media assets related to a story) other than the thumbnail.</p>
<p>2) The thumbnail is tiny 140px x 84px.</p>
<p>3) Telling the browser to scale up the image without smoothing (see snippet below) gives it a nice mosaic effect, but the iPad ignores that and makes it look all blurred and shit anyway.</p>
<pre class="prettyprint lang-css linenums:1">{
image-rendering:-moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering:-webkit-optimize-contrast;
-ms-interpolation-mode:nearest-neighbor;
}</pre>
<p>4) It has to be done in javascript, so no server-side image processing (although as you&#8217;ll see later it does involve a small amount of server side stuff, but for a totally different reason).</p>
<p>Recently the <a href="http://sobadsogood.com/2012/03/07/pxl-app-create-startling-abstract-art-in-your-hand-by-rainer-kohlberger/">pxl app</a> for iPhone has filtered through my friends. It allows you to apply a variety of abstract compositions to your photos, a popular one turns an image into a collection of triangles, rather like this&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/03/pxlkx.jpg"><img class="aligncenter size-full wp-image-1147" title="pxlkx" src="http://revdancatt.com/wp-content/uploads/2012/03/pxlkx.jpg" alt="" width="960" height="640" /></a></p>
<p>&#8230;a general effect that should work well, and allow us to create a large background image out of a relatively small source image.</p>
<p>This seemed like a good solution, by doing something very similar I can now turn a thumbnail that actually relates to the latest headline (which is the thing we&#8217;re actually after) into a fairly abstract and pleasing, but not too distracting background. All I needed to do was chop it up into triangles.</p>
<h2>Method</h2>
<p>No idea if this was intentional, but the thumbnail from the guardian is divisible by 7 in both width &amp; height, giving us a grid of 20 x 12 tiles, each tile 7 x7 pixels.</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/03/gridded.jpg"><img class="aligncenter size-full wp-image-1145" title="gridded" src="http://revdancatt.com/wp-content/uploads/2012/03/gridded.jpg" alt="" width="865" height="430" /></a></p>
<p>The next step was to look at each &#8220;tile&#8221;, work out which way to split the tile, diagonally from top-left to bottom-right or top-right to bottom-left and the colours to use for each split.</p>
<p>I decided the best way to do this was to divide the square up into quarters, top, left, right and bottom. Average the rgb values in each quarter and then work out if the top quarter was closer in colour to either the left or right quarter. If it was closer to the one on the left we&#8217;d split the tile that way, combining the top average colour with the left one, and the opposite if it was closer to the right quarter. A picture will probably explain it better.</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/03/splitting.jpg"><img class="aligncenter size-full wp-image-1148" title="splitting" src="http://revdancatt.com/wp-content/uploads/2012/03/splitting.jpg" alt="" width="600" height="450" /></a></p>
<p>You can see that each quarter contains 9 pixels, I didn&#8217;t bother counting the pixels on the diagonals. So anyway, averaging the rgb values of the 9 pixels in each quarter, and then comparing them is what I did. In the above example the green is closer to the blue than the red (and the yellow is closer to the red than the blue) so we&#8217;d split top-left to bottom-right.</p>
<p>The code: <a href="https://github.com/revdancatt/GuardianAmbientHeadlineRadio">which is here on GitHub</a>, is a little bit specific to the 140 x 84 pixel size, and grabs the pixel values long-hand. At some point I&#8217;ll probably make it generic so that it can work with any sized image divided down into any number of tiles. But just to get it working it seemed easier to hardcode some of the values.</p>
<p>The end result is something like this&#8230;</p>
<p><a href="http://revdancatt.com/wp-content/uploads/2012/03/endresult.jpg"><img class="aligncenter size-full wp-image-1149" title="endresult" src="http://revdancatt.com/wp-content/uploads/2012/03/endresult.jpg" alt="" width="899" height="407" /></a></p>
<p>You can see the whole thing running over on GitHub&#8230;</p>
<p><a href="http://revdancatt.github.com/GuardianAmbientHeadlineRadio/">http://revdancatt.github.com/GuardianAmbientHeadlineRadio/</a></p>
<p>I also dropped in some meta-tags to make the whole thing work a bit better on the iPad/iPhone and GoogleTV, just because I wanted some nice abstract art in my living room :)</p>
<pre class="prettyprint lang-html linenums:1">&lt;meta name="gtv-autozoom" content="off" /&gt;
&lt;meta name=apple-mobile-web-app-capable content=yes /&gt;
&lt;meta name=apple-mobile-web-app-status-bar-style content=black-translucent /&gt;
&lt;meta name =viewport content=initial-scale=1.0 /&gt;
&lt;meta name=viewport content=width=device-width /&gt;
&lt;meta name=viewport content=user-scalable=no /&gt;</pre>
<p>Weirdly the project is really supposed to be about text-to-speech and music, with the image background as just an extra bit of colourfulness. But now it&#8217;s here I may fork the code to keep the image part as a snapshot for other things, or at least so it doesn&#8217;t get bogged down in all the other stuff.</p>
<h2>Notes about loading images into canvas from remote servers</h2>
<p>Again, if I was running this on something other than GitHub hosted pages I could do a bunch of this stuff on the server side and not worry about it, but instead I have to deal with loading an image from a remote server.</p>
<p>In an ideal world the guardian would be using <a href="http://www.w3.org/TR/cors/">CORS</a> and allow canvas to access the image data from the image, but boo, not yet. And so a proxy server of sorts has to be used to deliver the image to javascript. We can&#8217;t put anything on GitHub to pull the image to the server so we still have to use something on a remote server.</p>
<p>I put this up on Google AppEngine (which is my general weapon of choice and experimented with python 2.7 on there at the same time)&#8230;</p>
<pre class="prettyprint lang-python linenums">import json
import urllib2
import cStringIO
import base64
import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):

        remote = urllib2.urlopen(urllib2.unquote('http://static.guim.co.uk/sys-images/%s') % self.request.get('img'))
        img = cStringIO.StringIO(remote.read())
        rtnimg = base64.b64encode(img.getvalue())
        type_prefix = "data:image/jpg;base64,"
        data = {
                            "data": type_prefix + rtnimg
                        }

        self.response.headers['Content-Type'] = 'application/json'
        if 'callback' in self.request.arguments():
                data = '%s(%s)' % (self.request.get('callback'), json.dumps(data))
                self.response.out.write(data)
        else:
                self.response.out.write(json.dumps(data))

app = webapp2.WSGIApplication([('/img_to_json', MainPage)], debug=True)</pre>
<p>&#8230;which  reads in an image from the guardian, converts it to base64 and chucks it out in a json response.</p>
<p>Meanwhile, on the client side, jquery calls the endpoint passing over the second half of the image URL, gets the json back and sets the source of an image to the data:image/jpg;base64 value. Which now doesn&#8217;t suffer from cross-domain security and we can get access to the image data for shoving onto a canvas object.</p>
<p>It&#8217;s a bit of a hack, abet a fun one, but hopefully greater implementation of CORS will remove the need for any server side stuff, at which point I can get rid of that part out of the code altogether.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/03/31/the-pxl-effect-with-javascript-and-canvas-and-maths/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Guardian GoogleTV project, innovation &amp; hacking.</title>
		<link>http://revdancatt.com/2012/03/21/the-guardian-googletv-project-innovation-hacking/</link>
		<comments>http://revdancatt.com/2012/03/21/the-guardian-googletv-project-innovation-hacking/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 23:06:57 +0000</pubDate>
		<dc:creator>Reverend Dan Catt</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[guardian]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://revdancatt.com/?p=1120</guid>
		<description><![CDATA[Yay, I got to launch the Guardian GoogleTV project that I&#8217;ve been tinkering with over the last few months. I&#8217;ve already written about it over on the Guardian Developers Blog and there&#8217;s a more general overview on Inside Guardian so there&#8217;s not much point repeating that here. But I did want to tie it in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://revdancatt.com/wp-content/uploads/2012/03/prototype.jpg"><img class="aligncenter size-full wp-image-1127" title="Guardian Google TV prototype" src="http://revdancatt.com/wp-content/uploads/2012/03/prototype.jpg" alt="" width="1024" height="683" /></a></p>
<p>Yay, I got to launch the Guardian GoogleTV project that I&#8217;ve been tinkering with over the last few months. I&#8217;ve already written about it over on the <a href="http://www.guardian.co.uk/info/developer-blog/2012/mar/21/developing-google-tv-app">Guardian Developers Blog</a> and there&#8217;s a more general overview on <a href="http://www.guardian.co.uk/help/insideguardian/2012/mar/21/guardian-app-google-tv">Inside Guardian</a> so there&#8217;s not much point repeating that here.</p>
<p>But I did want to tie it in with a couple of things bouncing around in my head, let&#8217;s start with&#8230;</p>
<p>&nbsp;</p>
<blockquote class="twitter-tweet tw-align-center"><p>Every so often I have a mild panic attack on behalf of journalism in the face of speed of innovation elsewhere. Like now <a href="https://twitter.com/search/%2523sxswi">#sxswi</a></p>
<p>— emily bell (@emilybell) <a href="https://twitter.com/emilybell/status/179277893153726467" data-datetime="2012-03-12T18:49:15+00:00">March 12, 2012</a></p></blockquote>
<p>&nbsp;</p>
<p>And the <a href="http://www.randsinrepose.com/archives/2012/03/13/hacking_is_important.html">Hacking is Important</a> post from Michael, which I shall now quote extensively from&#8230;</p>
<blockquote><p>&#8216;[Facebook is worried about] the growth paradox, which goes something like this: The end result of successful hacking is product, and that product needs to grow by building more things. The more you grow, the more things you have, and the more you need people whose job is simply to coordinate the increasingly interdependent building activities. These people, called managers, don’t create product, they create process.</p>
<p>&nbsp;</p>
<p>&#8216;Hackers are allergic to process not because they don’t understand the value; they’re allergic to it because it violates their core values. These values are well documented in Zuckerberg’s letter: “Done is better than perfect”, “Code wins arguments”, and that “Hacker culture is extremely open and meritocratic”. The folks who create process care about control, and they use politics to shape that control and to influence communications, and if there is ever a sentence that would cause a hacker to stand up and throw his or her keyboard at the screen, it’s the first half of this one.</p>
<p>&nbsp;</p>
<p>&#8216;The growth paradox is that the chaotic means by which you found success might become distasteful to those you hire to maintain and build on that success. Once they’ve established themselves, they will point at the hacking and ask important sounding questions like, “What is it they are building?” or “How does this poorly defined thing fit into our overall strategy?” They will label these hackers “disruptors” and they are 100% correct.</p>
<p>&nbsp;</p>
<p>&#8216;Hacking is disruptive, and whether you code software, write books, or film movies, I believe bringing anything new into the world is a disruptive act. By being novel and compelling, the new is likely to replace something else and that something else isn’t being replaced without a fight.&#8217;</p></blockquote>
<p>Fortunately the Guardian (as has facebook) found ways to work around the growth paradox. For the Guardian the growth in this case isn&#8217;t your sudden start-up to internet infrastructure over 6 years growth, but the been-around-for-a-very-long-time growth.</p>
<p>The 1st way was to build the <a href="http://www.guardian.co.uk/open-platform">Guardian Open Platform &amp; Content API</a>. At a time when other news organisations are putting up paywalls, the Guardian sticks all its content into APIs for developers to build on and incorporate into tools.</p>
<p>The 2nd is to actually use its own Content API on a daily basis to quickly prototype projects, hold internal &amp; external hack-days and then giving developers enough rope with which to hang themselves :)</p>
<p>Obviously I&#8217;m coming at this from the developer angle and this is a technology project rather than the journalism that&#8217;s giving Emily mild panic attacks. Which is why we also have <a href="http://www.guardian.co.uk/media/open-journalism">Open Journalism</a> (and <a href="https://twitter.com/#!/search/%23opennews">#OpenNews</a>) and ways of linking these two together internally.</p>
<p>With those two prongs performing a pincer movement on &#8220;Open&#8221;, along with the API and internal support for &#8220;hackers&#8221; we have a pretty good ecosystem for moving quickly(ish) on the digital. We don&#8217;t have an R&amp;D &#8220;lab&#8221; (unless it&#8217;s very will hidden under Guardian Towers) but I&#8217;m slightly wary of shuffling off innovation into a separate unit anyway, it should just be core to business as normal. From which fertile ground sprung forth the GoogleTV project.</p>
<h2>Back to the TV</h2>
<p>Anyway, as mentioned in the <a href="http://www.guardian.co.uk/info/developer-blog/2012/mar/21/developing-google-tv-app">Dev Blog post</a>, this project started as a &#8220;what if?&#8221;, in this case, &#8220;we&#8217;re looking at desktop, tablets &amp; mobile a lot, what if ConnectedTVs really start take off?&#8221;</p>
<p>There are just over 300 million people in the USA, and around 270 million TVs, there&#8217;s actually more TVs per household than people (2.7 TVs vs 2.5 people). You couldn&#8217;t move for ConnectedTVs at CES this year, although no-one can quite tell me exactly what a Connected TV is. In years past the invention of the radio was going to kill newspapers and then video was going to kill the radio, the internet in turn was set to finish off the television and all of them had it in for books. Instead what happened is that nothing really died but stole ideas and characteristics from the newer shiny toy. Books can now be ebooks with links to twitter, newspapers now have podcasts which are like the radio but on the internet, the internet has TV programs on it and the telly can now show webpages.</p>
<p>Clay Shirky in his book <a href="http://www.amazon.co.uk/gp/product/1594202532/ref=as_li_ss_tl?ie=UTF8&amp;tag=geobloggers-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=1594202532">Cognative Surplus</a> attempted to quantify &#8220;spare time&#8221;, the premise being that we no longer work all our waking hours and have some time left over and that time is often spent sat infront of the television. A trillionly billionty hours, and if we did something with that &#8220;surplus&#8221; time great things could be achieved.</p>
<p>The measure he ended up with was this: if everyone spent just one advert break per week updating Wikipedia, we could have a new Wikipedias every few weeks. Admittedly they&#8217;d most likely be terrible, terrible Wikipedias but I think the point still stands. As much as some people claim that other people spend too long on the internet, as a society it&#8217;s nothing compared to that spent infront of the TV.</p>
<blockquote><p>&#8220;We can do a back-of-the-envelope calculation, for example, using Wikipedia, to see how far we still have to go. All the articles, edits, and arguments about articles and edits represent around 100 million hours of human labor. That’s a lot of time. But remember: Americans watch about 200 billion hours of TV every year.&#8221;</p>
<p>- <a href="http://www.wired.com/magazine/2010/05/ff_pink_shirky/all/1">Clay Shirky, Wired: Cognitive Surplus: The Great Spare-Time Revolution</a>.</p></blockquote>
<p>There&#8217;s all sorts of things we could take away from this. But for me, at the moment it&#8217;s this&#8230; people spend a fuck load of time infront of the TV.</p>
<p>And now, TV manufactures want people to interact with the TV, various brands have their own web browsers and services built in, Apple have their Apple TV &#8220;puck&#8221; that you can attach and Google have GoogleTV that comes either built in or as a unit you can plug in.</p>
<p>It seems reasonable that we (the Guardian) would want our news, and images and video and podcasts, on all those millions of devices.</p>
<h2>One Million GoogleTVs</h2>
<p>Of course it&#8217;s still very early in the ConnectedTVs world, there&#8217;s currently only around 1 million GoogleTVs out there in the wild, but then there aren&#8217;t that many of the other breeds of &#8220;connected&#8221; TVs either, Apple has no browser on their puck, some gaming consoles have browsers but of different abilities and so on. But you have to start somewhere and if you want to quickly sketch out an idea then GoogleTV is a pretty good place to start.</p>
<p>It&#8217;s basically Chrome with HTML5 and CSS3-ish, and that right there should tell you that you already have all the tools you need to knock something together that&#8217;ll work on a TV.</p>
<p>Our plan was to quickly sketch out ideas, throw them onto the TV to see what worked and the big screen and what didn&#8217;t. It also meant that we could iterate quickly and push changes as often as we liked, which is nice.</p>
<p>That all new TVs in a couple of years will have internet browsers and access is all but inevitable, and as they get into more and more homes you suddenly have a new audience, people who like to just sit down and be informed/entertained by the nice, bright, large screen in the corner (or mounted on the wall). And now seemed like a better time to start thinking about that than trying to play catchup later.</p>
<p>So this experiment isn&#8217;t so much about the <em>now</em> but rather what <em>may</em> be in a couple of years time.</p>
<p>Well that and an excuse to buy a new big telly ;)</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://revdancatt.com/2012/03/21/the-guardian-googletv-project-innovation-hacking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.628 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-08 16:23:06 -->
<!-- Compression = gzip -->
