<?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>Barryvan &#187; Processing</title>
	<atom:link href="http://www.barryvan.com.au/category/programming/processing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barryvan.com.au</link>
	<description>Music, Programming, Design</description>
	<lastBuildDate>Mon, 23 Aug 2010 04:12:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Canvas Swarms</title>
		<link>http://www.barryvan.com.au/2010/03/canvas-swarms/</link>
		<comments>http://www.barryvan.com.au/2010/03/canvas-swarms/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 00:27:18 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://www.barryvan.com.au/?p=440</guid>
		<description><![CDATA[I&#8217;ve been meaning to start playing with the HTML5 &#60;canvas&#62; element for a while now, and yesterday I took the opportunity. I translated a Processing sketch I made a while ago into JavaScript (with a few minor enhancements). View it live Essentially, 1 to 3 swarms of particles move around the canvas, reproducing when the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to start playing with the HTML5 &lt;canvas&gt; element for a while now, and yesterday I took the opportunity. I translated a Processing sketch I made a while ago into JavaScript (with a few minor enhancements).</p>
<div class="screenshots">
<a href="/demos/swarms/swarms.html"><br />
<img class="aligncenter size-full" src="/demos/swarms/swarms.png" alt="Swarms Screenshot"/><br />
View it live<br />
</a>
</div>
<p>Essentially, 1 to 3 swarms of particles move around the canvas, reproducing when the conditions are just right, and dying of old age. Quite simple, but the patterns produced can be really quite pretty.</p>
<p>One interesting thing that I discovered whilst doing this is that you can&#8217;t pass around a canvas&#8217; context at the instantiation of a MooTools class &#8212; it complains about wrapped natives. That&#8217;s why, if you like in the source JavaScript, you&#8217;ll see me pass the actual context around to various functions. I&#8217;d be interested in hearing if anyone has a workaround for this, because this is, well, a bit clunky.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2010/03/canvas-swarms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mobile phone drum machine</title>
		<link>http://www.barryvan.com.au/2009/01/mobile-phone-drum-machine/</link>
		<comments>http://www.barryvan.com.au/2009/01/mobile-phone-drum-machine/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:50:32 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Free music downloads]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=29</guid>
		<description><![CDATA[This is my first project using Mobile Processing. It&#8217;s essentially a MIDI drum machine, with five preset drums: kick, snare, open/closed hihat, and cowbell. Each row represents a &#8216;tick&#8217;, and when you press play, each tick is played in turn. It has been tested on a Sony Ericsson K800i. Note that at the moment, you [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first project using Mobile Processing. It&#8217;s essentially a MIDI drum machine, with five preset drums: kick, snare, open/closed hihat, and cowbell. Each row represents a &#8216;tick&#8217;, and when you press play, each tick is played in turn. It has been tested on a Sony Ericsson K800i.</p>
<p>Note that at the moment, you can&#8217;t change the tempo, can&#8217;t load or save patterns, can&#8217;t have more than one pattern, and can&#8217;t choose which drums to use. I might include those features in a later release. For the moment, though, it&#8217;s a fun way to waste a few minutes.</p>
<p><a href="/processing/DrumMachine/index.html"><img src="/files/DrumMachine.png" alt="" width="238" height="299" /></a></p>
<p><a href="/processing/DrumMachine/index.html">View the applet in your browser (and source)</a></p>
<p><a href="/processing/DrumMachine/DrumMachine.jar">Download the applet for your phone</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/mobile-phone-drum-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grass</title>
		<link>http://www.barryvan.com.au/2009/01/grass/</link>
		<comments>http://www.barryvan.com.au/2009/01/grass/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:50:05 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=27</guid>
		<description><![CDATA[This is based on the leaves from &#8220;Droplets&#8221;. Essentially, the leaves are turned on their sides, and become blades of grass, pushed (or, if you&#8217;re poetic, &#8216;caressed&#8217;) by the wind. Each blade is made up of up to 17 particles: a root particle, which anchors the entire blade, and then a series of particle pairs [...]]]></description>
			<content:encoded><![CDATA[<p>This is based on the leaves from &#8220;Droplets&#8221;. Essentially, the leaves are turned on their sides, and become blades of grass, pushed (or, if you&#8217;re poetic, &#8216;caressed&#8217;) by the wind. Each blade is made up of up to 17 particles: a root particle, which anchors the entire blade, and then a series of particle pairs describing its position. Each pair has a fixed particle which is the &#8216;preferred&#8217; point for that node, and a flexible particle, which can move freely. These pairs are connected with springs, and each flexible particle is also connected to the flexible particle before it with a spring. This keeps everything together but moving fairly organically.</p>
<p><a href="/processing/Grass/index.html"><img src="/files/Grass.png" alt="" width="430" height="230" /></a></p>
<p><a href=/processing/Grass/index.html">View the applet (and source)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/grass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Droplets</title>
		<link>http://www.barryvan.com.au/2009/01/droplets/</link>
		<comments>http://www.barryvan.com.au/2009/01/droplets/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:49:45 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=25</guid>
		<description><![CDATA[This was an attempt at getting to grips with the Traer Physics library. Basically, droplets of water fall from the top of the screen, land on a couple of leaves, join up to form larger droplets, and then, when they&#8217;re too heavy, fall off again. The collision detection used isn&#8217;t fantastic, so you&#8217;ll notice some [...]]]></description>
			<content:encoded><![CDATA[<p>This was an attempt at getting to grips with the Traer Physics library. Basically, droplets of water fall from the top of the screen, land on a couple of leaves, join up to form larger droplets, and then, when they&#8217;re too heavy, fall off again. The collision detection used isn&#8217;t fantastic, so you&#8217;ll notice some strange droplet behaviour every now and then.</p>
<p><a href="/processing/Droplets/index.html"><img src="/files/Droplets.png" alt="" width="430" height="230" /></a></p>
<p><a href="/processing/Droplets/index.html">View the applet (and source)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/droplets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Energy</title>
		<link>http://www.barryvan.com.au/2009/01/energy/</link>
		<comments>http://www.barryvan.com.au/2009/01/energy/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:48:47 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Free music downloads]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ambient]]></category>
		<category><![CDATA[computational music]]></category>
		<category><![CDATA[experimental]]></category>
		<category><![CDATA[generative music]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=23</guid>
		<description><![CDATA[A musical project. The first thing you&#8217;ll notice is that this is atonal. I did initially work with a fixed key (E minor, in fact), and experimented with a variety of other keys, too; everything from simple triads to pentatonics, seventeen tone equal temperaments, and even a completely random set of frequencies, but overall, I [...]]]></description>
			<content:encoded><![CDATA[<p>A musical project.</p>
<p>The first thing you&#8217;ll notice is that this is atonal. I did initially work with a fixed key (E minor, in fact), and experimented with a variety of other keys, too; everything from simple triads to pentatonics, seventeen tone equal temperaments, and even a completely random set of frequencies, but overall, I think that a three octave span of twelve tone equal temperament frequencies is the most effective.</p>
<p>The sounds are generated on-the-fly; they are simple sine waves with a decay. Internally, the x-coordinates of the particles are broken into a series of &#8216;frequency bars&#8217;. Particles move along, building up energy, and eventually release this energy as a musical tone; the frequency is determined by the bar they are in. The frequencies are randomised.</p>
<p>Left clicking will create a &#8216;beat-particle&#8217; for the frequency bar under the cursor. These particles will emit a tone every 2, 4, or 8 quantisations. Right clicking creates a &#8216;pulse-particle&#8217;, which emits a tone every x quantisations, where x is randomly determined.</p>
<p>Also in the code, but not enabled in the applet, are &#8216;orbit particles&#8217; &#8211; these are the same as normal particles, but they choose a normal particle to follow as quickly as their current energy level will allow them to. They have a 5% chance of changing their target every tick.</p>
<p>If you run the applet, you will probably notice that the audio and the visuals are not perfectly in sync; unfortunately, this is a drawback of the Java sound API in conjunction with all of the maths and rendering going on every drawing cycle (at around 60 frames per second).</p>
<p><a href="/music/energy/b/index.html"><img src="/files/Energy.png" alt="" /></a></p>
<p><a href="/music/Energy.mp3">Download a post-processed MP3 created using this applet</a></p>
<p><a href="/processing/Energy/index.html">View the minimal atonal applet (and source)</a></p>
<p><a href="/music/energy/b/index.html">View the full applet (in E minor, no source)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/energy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Swarms</title>
		<link>http://www.barryvan.com.au/2009/01/swarms/</link>
		<comments>http://www.barryvan.com.au/2009/01/swarms/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:48:19 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=21</guid>
		<description><![CDATA[A swarm of particles that move around together. Particles are of two sexes, and can reproduce when two particles of opposite sex touch. Particles grow old and die; the younger they are, the faster they can move. View applet (and source)]]></description>
			<content:encoded><![CDATA[<p>A swarm of particles that move around together. Particles are of two sexes, and can reproduce when two particles of opposite sex touch. Particles grow old and die; the younger they are, the faster they can move.</p>
<p><a href="/processing/swarms/index.html"><img src="/files/Swarms.png" alt="" width="430" height="230" /></a></p>
<p><a href="/processing/swarms/index.html">View applet (and source)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/swarms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Particle Swarm Optimisation</title>
		<link>http://www.barryvan.com.au/2009/01/particle-swarm-optimisation/</link>
		<comments>http://www.barryvan.com.au/2009/01/particle-swarm-optimisation/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:47:54 +0000</pubDate>
		<dc:creator>Barry van Oudtshoorn</dc:creator>
				<category><![CDATA[Processing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[computational intelligence]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://barryvan.com.au/wp/?p=19</guid>
		<description><![CDATA[A simple visualisation of Particle Swarm Optimisation in a 2D plane. View applet (and source)]]></description>
			<content:encoded><![CDATA[<p>A simple visualisation of Particle Swarm Optimisation in a 2D plane.</p>
<p><a href="/processing/PSO/index.html"><img src="/files/PSO.png" alt="" width="430" height="230" /></a></p>
<p><a href="/processing/PSO/index.html">View applet (and source)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.barryvan.com.au/2009/01/particle-swarm-optimisation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
