<?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>Raintone &#187; code</title>
	<atom:link href="http://www.raintone.com/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raintone.com</link>
	<description>Electronic Music, Audio + Visual Code, and 3D Graphics</description>
	<lastBuildDate>Wed, 02 Sep 2009 22:55:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sketch &#8211; may12a</title>
		<link>http://www.raintone.com/2009/05/spikey-growth-lines/</link>
		<comments>http://www.raintone.com/2009/05/spikey-growth-lines/#comments</comments>
		<pubDate>Wed, 13 May 2009 21:25:27 +0000</pubDate>
		<dc:creator>J.D. Northrup</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://www.raintone.com/?p=132</guid>
		<description><![CDATA[The beauty of Processing is that this was basically a doodle &#8212; it took only about 10 sustantial lines of code to write.
You can run the sketch in your browser by clicking the image below.

]]></description>
			<content:encoded><![CDATA[<p>The beauty of Processing is that this was basically a doodle &#8212; it took only about 10 sustantial lines of code to write.</p>
<p><strong>You can run the sketch in your browser by clicking the image below</strong>.</p>
<p><a href="http://www.raintone.com/code/processing/sketch_may12a/"></a><a href="http://www.raintone.com/code/processing/sketch_may12a/"><img class="alignnone size-thumbnail wp-image-135" title="sketch_may12a" src="http://www.raintone.com/wp-content/uploads/2009/05/sketch_may12a-150x150.jpg" alt="sketch_may12a" width="213" height="213" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raintone.com/2009/05/spikey-growth-lines/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FractalWavetables v2: Stereo &amp; Morphing</title>
		<link>http://www.raintone.com/2009/03/fractalwavetables-v2/</link>
		<comments>http://www.raintone.com/2009/03/fractalwavetables-v2/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 01:30:38 +0000</pubDate>
		<dc:creator>J.D. Northrup</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://www.raintone.com/?p=106</guid>
		<description><![CDATA[Updated version of the FractalWavetables sketch with lots of new goodies, including a stereo mode and the ability to morph between fractals.  Click the image below to run in your browser (requires Java):

Get the downloadable application versions here (so you can save out audio files):
Mac OS X version
Windows version
Linux version
The public git repository for this [...]]]></description>
			<content:encoded><![CDATA[<p>Updated version of the FractalWavetables sketch with lots of new goodies, including a stereo mode and the ability to morph between fractals.  Click the image below to run in your browser (requires Java):</p>
<p><a href="http://www.raintone.com/code/processing/FractalWavetables2/"><img class="alignnone size-medium wp-image-105" title="fractalwavetables2" src="http://www.raintone.com/wp-content/uploads/2009/03/fractalwavetables2-300x233.png" alt="fractalwavetables2" width="300" height="233" /></a></p>
<p>Get the downloadable application versions here (so you can save out audio files):<br />
<a href="http://www.raintone.com/code/processing/FractalWavetables2/application.macosx.zip">Mac OS X version<br />
</a><a href="http://www.raintone.com/code/processing/FractalWavetables2/application.windows.zip">Windows version<br />
</a><a href="http://www.raintone.com/code/processing/FractalWavetables2/application.linux.zip">Linux version</a></p>
<p>The public git repository for this project lives at:<br />
<a href="http://wiki.github.com/jdnorthrup/fractalwavetablesketch">http://wiki.github.com/jdnorthrup/fractalwavetablesketch</a></p>
<p>Lesson learned: Processing is a beast to work with for complex modal UI&#8217;s &#8212; unless you really do your homework and design your own framework beforehand (I didn&#8217;t).</p>
<p>Sorry if the code&#8217;s a bit complex/ugly at parts (in case you&#8217;re looking).</p>
<p>Interestingly, the sounds produced from this can sound spectacular through deep reverbs and other processing.  They&#8217;re almost the same amplitude at all frequencies in their range, quite unlike natural harmonic spectra.  Try running a steep resonant bandpass across some of the more complex sounds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raintone.com/2009/03/fractalwavetables-v2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fractal Audio Wavetables in Processing</title>
		<link>http://www.raintone.com/2009/03/fractalwavetables-processing/</link>
		<comments>http://www.raintone.com/2009/03/fractalwavetables-processing/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 06:23:25 +0000</pubDate>
		<dc:creator>J.D. Northrup</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://www.raintone.com/?p=71</guid>
		<description><![CDATA[
This is a Processing implementation of the fractal wavetable algorithm I mentioned in previous posts.
The Processing framework itself is really nice &#8212; very easy to get into and start hacking out ideas.  I&#8217;m using the Ess sound library to handle audio playback.
Here&#8217;s a link to the sketch. This should play in most Java-equipped web [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.raintone.com/code/processing/FractalWavetables/"><img class="alignnone size-full wp-image-70" title="floatfract" src="http://www.raintone.com/wp-content/uploads/2009/03/floatfract.png" alt="floatfract" width="480" height="159" /></a></p>
<p>This is a <a href="http://processing.org/">Processing</a> implementation of the fractal wavetable algorithm I mentioned in previous posts.</p>
<p>The Processing framework itself is really nice &#8212; very easy to get into and start hacking out ideas.  I&#8217;m using the <a href="http://www.tree-axis.com/Ess/">Ess sound library</a> to handle audio playback.</p>
<p>Here&#8217;s a link to the sketch. This should play in most Java-equipped web browsers:</p>
<p><strong>Update: See <a href="2009/03/fractalwavetables-v2">FractalWavetables v2</a> for new options.</strong></p>
<p><a href="http://www.raintone.com/code/processing/FractalWavetables/"><img class="alignnone size-full wp-image-102" title="fracwave" src="http://www.raintone.com/wp-content/uploads/2009/03/fracwave.png" alt="fracwave" width="200" height="115" /></a><br />
<a href="http://www.raintone.com/code/processing/FractalWavetables/">FractalWavetables (+source)</a></p>
<p>If you download and run this locally, you can write .aif files to disk:</p>
<p><a href="http://www.raintone.com/code/processing/FractalWavetables/application.macosx.zip">Mac OS X version</a><br />
<a href="http://www.raintone.com/code/processing/FractalWavetables/application.windows.zip">Windows version</a><br />
<a href="http://www.raintone.com/code/processing/FractalWavetables/application.linux.zip">Linux version</a></p>
<p>Enjoy<br />
-jd</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raintone.com/2009/03/fractalwavetables-processing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fractal Audio Wavetables</title>
		<link>http://www.raintone.com/2009/03/fractal-wavetable-audio/</link>
		<comments>http://www.raintone.com/2009/03/fractal-wavetable-audio/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 11:02:55 +0000</pubDate>
		<dc:creator>J.D. Northrup</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://www.raintone.com/?p=48</guid>
		<description><![CDATA[
I&#8217;ve taken the idea of binary fractals for audio, and generalized the system to accept floating point numbers.
In essence, you give the program a wavetable &#8220;seed&#8221; which is subdivided &#8212; each sample is replaced by a copy of the wavetable, multiplied by the old sample value.  This subdivision recurses until the desired length audio buffer [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.raintone.com/wp-content/uploads/2009/03/1_05_1.png"><img class="alignnone size-full wp-image-54" title="1_05_1" src="http://www.raintone.com/wp-content/uploads/2009/03/1_05_1.png" alt="1_05_1" width="496" height="219" /></a></p>
<p>I&#8217;ve taken the idea of binary fractals for audio, and generalized the system to accept floating point numbers.</p>
<p>In essence, you give the program a wavetable &#8220;seed&#8221; which is subdivided &#8212; each sample is replaced by a copy of the wavetable, multiplied by the old sample value.  This subdivision recurses until the desired length audio buffer has been generated. The initial value always begins at &#8220;1&#8243;.  For a seed of &#8220;1 0.5 1&#8243;, you get the following as the first three steps:</p>
<p>1 -&gt; 1 0.5 1 -&gt; 1 0.5 1 0.5 0.25 0.5 1 0.5 1 -&gt; 1 0.5 1 0.5 0.25 0.5 1 0.5 1 0.5 0.25 0.5 0.25 0.125 0.25 0.5 0.25 0.5 1 0.5 1 0.5 0.25 0.5 1 0.5 1</p>
<p>As you can imagine, you get some pretty complicated waveforms quickly.</p>
<p>Since these are fractals, the timbre, rhythm, and structure of the loops are all self-similar &#8212; as explained in Terran Olson’s <a href="http://rainrecording.com/pro/experimental/audio-fractals/">awesome article</a> that inspired my work on this.</p>
<p>Here&#8217;s a quick song I threw together in Ableton Live using only unedited, un-effected loops straight out of the program:</p>
<div>Here&#8217;s a link to the source code:</div>
<div><a href="code/floatfract/floatfract.zip">floatfract.zip</a></div>
<div>I&#8217;m working on a way of generating morphs between input tables, so you can have a fractal evolution from one sound to another.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.raintone.com/2009/03/fractal-wavetable-audio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fractal Sequences As Sound</title>
		<link>http://www.raintone.com/2009/03/fractal-sequences-as-sound/</link>
		<comments>http://www.raintone.com/2009/03/fractal-sequences-as-sound/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 19:58:39 +0000</pubDate>
		<dc:creator>J.D. Northrup</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://raintone.com/?p=13</guid>
		<description><![CDATA[Inspired by this article on CDM, and Terran Olson’s work in particular, I dug into creating a more general version of the fractal set synthesis outlined in this article.
I’ve posted the code, and some example .wav files, linked below.  It’s a simple, cross-platform C++ command line utility that takes a binary seed for the sequence, [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_19" class="wp-caption alignnone" style="width: 290px"><a href="http://raintone.com/wp-content/uploads/2009/03/droppedimage-filtered.jpg"><img class="size-full wp-image-19 " title="droppedimage-filtered" src="http://raintone.com/wp-content/uploads/2009/03/droppedimage-filtered.jpg" alt="droppedimage-filtered" width="280" height="252" /></a><p class="wp-caption-text">Audacity&#39;s &quot;pitch&quot; view of a fractal .wav file</p></div>
<p>Inspired by <a href="http://createdigitalmusic.com/2009/03/03/making-music-with-fractals/"><span>this article on CDM</span></a>, and Terran Olson’s work in particular, I dug into creating a more general version of the fractal set synthesis outlined in <a href="http://rainrecording.com/pro/experimental/audio-fractals/"><span>this article</span></a>.</p>
<p>I’ve posted the code, and some example .wav files, linked below.  It’s a simple, cross-platform C++ command line utility that takes a binary seed for the sequence, and two recurrence relations (the first specifies what replaces a &#8216;1&#8242;, the second replaces &#8216;0&#8217;s).</p>
<p>For example, the arguments ‘1 101 000&#8242; yield the Cantor Set:</p>
<p>1<br />
101<br />
101000101<br />
10101010001010101<br />
… and so on</p>
<p>This sequence is iterated enough times to end up with enough samples to generate 10 seconds of audio &#8212; which is dumped to a .wav file. &#8216;0101&#8242; repeated would become a 22.05kHz square wave, for example.  In fact, all the output from this program will be square waves of varying wavelength and pulse width.</p>
<p>Here&#8217;s an audio clip of what &#8216;1 101101 00000&#8242; produces (careful, these are loud):</p>
<p><a href="http://raintone.com/wp-content/uploads/2009/03/101101_00000.wav">101101_00000</a> (.wav file)</p>
<p>You can provide any binary pattern you want, and it expands into a recursive fractal sound.</p>
<p>Here&#8217;s the link:  <a href="http://www.raintone.com/code/genfractal/genfractal.zip">genfractal.zip</a> (cross-platform C++ source code, and examples)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raintone.com/2009/03/fractal-sequences-as-sound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://raintone.com/wp-content/uploads/2009/03/101101_00000.wav" length="882044" type="audio/x-wav" />
<enclosure url="http://www.raintone.com/wp-content/uploads/2009/03/101101_00000.wav" length="882044" type="audio/x-wav" />
		</item>
		<item>
		<title>Dancing Spirals Screensaver</title>
		<link>http://www.raintone.com/2007/01/dancing-spirals-screensaver/</link>
		<comments>http://www.raintone.com/2007/01/dancing-spirals-screensaver/#comments</comments>
		<pubDate>Wed, 03 Jan 2007 21:48:59 +0000</pubDate>
		<dc:creator>J.D. Northrup</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[screensaver]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://raintone.com/?p=23</guid>
		<description><![CDATA[
This is 3D OpenGL eye-candy for Mac OS X, complete with customizable settings, and full source code.
The implementation might be interesting – the options interface is build using Interface Builder, Objective-C and Cocoa, yet the actual drawing code all happens in C++ using OpenGL.
Props to the folks at Cocoa Dev Central for posting a pair [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://raintone.com/wp-content/uploads/2009/03/shapeimage_3.jpg"><img class="size-medium wp-image-24 alignnone" title="shapeimage_3" src="http://raintone.com/wp-content/uploads/2009/03/shapeimage_3-300x154.jpg" alt="shapeimage_3" width="300" height="154" /></a></p>
<p>This is 3D OpenGL eye-candy for Mac OS X, complete with customizable settings, and full source code.</p>
<p>The implementation might be interesting – the options interface is build using Interface Builder, Objective-C and Cocoa, yet the actual drawing code all happens in C++ using OpenGL.</p>
<p>Props to the folks at <a href="http://cocoadevcentral.com/"><span>Cocoa Dev Central</span></a> for posting a pair of tutorials that got me started with building screensavers in Xcode.</p>
<p>Download: <a href="http://www.raintone.com/downloads/DancingSpirals.saver.zip">DancingSpirals.saver.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raintone.com/2007/01/dancing-spirals-screensaver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
