<?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>PixelBoob &#187; Creations</title>
	<atom:link href="http://pixelboob.com/category/creations/feed/" rel="self" type="application/rss+xml" />
	<link>http://pixelboob.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 29 Dec 2008 19:14:29 +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>Audio Effects in Flash 10</title>
		<link>http://pixelboob.com/2008/12/audio-effects-in-flash-10/</link>
		<comments>http://pixelboob.com/2008/12/audio-effects-in-flash-10/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 19:12:46 +0000</pubDate>
		<dc:creator>mikej</dc:creator>
				<category><![CDATA[Creations]]></category>
		<category><![CDATA[FSynth]]></category>
		<category><![CDATA[Nycto]]></category>

		<guid isPermaLink="false">http://pixelboob.com/?p=66</guid>
		<description><![CDATA[As part of Nycto, I&#8217;ve built a fairly nice collection of audio effects and oscillators, mainly ported from C++ and Pascal sources over at http://www.musicdsp.org. This is a simple test to show off some of the things you can do with it thus far &#8211; the reverb (based on the reverb in ChucK) and EQ [...]]]></description>
			<content:encoded><![CDATA[<p>As part of Nycto, I&#8217;ve built a fairly nice collection of audio effects and oscillators, mainly ported from C++ and Pascal sources over at <a href="http://www.musicdsp.org" onclick="pageTracker._trackPageview('/outgoing/www.musicdsp.org?referer=');">http://www.musicdsp.org</a>. <a href="http://pixelboob.com/tests/fsynth1.swf">This</a> is a simple test to show off some of the things you can do with it thus far &#8211; the reverb (based on the reverb in <a href="http://chuck.cs.princeton.edu/" onclick="pageTracker._trackPageview('/outgoing/chuck.cs.princeton.edu/?referer=');">ChucK</a>) and EQ are particularly useful.</p>
<p>Source for the whole thing is in Google Code <a href="http://code.google.com/p/fsynth/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/fsynth/?referer=');">here</a> &#8211; it currently converts everything from stereo->mono, but I&#8217;ll be working on getting it all working in stereo soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://pixelboob.com/2008/12/audio-effects-in-flash-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game Engine Test #1</title>
		<link>http://pixelboob.com/2008/12/engine-test-1-2/</link>
		<comments>http://pixelboob.com/2008/12/engine-test-1-2/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 02:06:30 +0000</pubDate>
		<dc:creator>mikej</dc:creator>
				<category><![CDATA[Creations]]></category>
		<category><![CDATA[Nycto]]></category>

		<guid isPermaLink="false">http://pixelboob.com/?p=46</guid>
		<description><![CDATA[A first (quite simple) test of the Nycto engine is up on YouTube. This shows off some collision detection, a few different synth noises (the &#8216;thud&#8217; noise is done using EQ filtered white noise, and the others use the FM synth), and the initial lighting code.
To try out the game so far, head here, press [...]]]></description>
			<content:encoded><![CDATA[<p>A first (quite simple) test of the Nycto engine is up on <a href="http://uk.youtube.com/watch?v=aXGfPrsT8YY" onclick="pageTracker._trackPageview('/outgoing/uk.youtube.com/watch?v=aXGfPrsT8YY&amp;referer=');">YouTube</a>. This shows off some collision detection, a few different synth noises (the &#8216;thud&#8217; noise is done using EQ filtered white noise, and the others use the FM synth), and the initial lighting code.</p>
<p>To try out the game so far, head <a href="http://pixelboob.com/tests/engine1.swf">here</a>, press 1 to start the game, and use A and D for left/right, W for jump, and space for sonar (requires Flash 10!).</p>
]]></content:encoded>
			<wfw:commentRss>http://pixelboob.com/2008/12/engine-test-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Emission</title>
		<link>http://pixelboob.com/2008/12/code-emission/</link>
		<comments>http://pixelboob.com/2008/12/code-emission/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 18:19:06 +0000</pubDate>
		<dc:creator>mikej</dc:creator>
				<category><![CDATA[Creations]]></category>
		<category><![CDATA[Nycto]]></category>

		<guid isPermaLink="false">http://pixelboob.com/?p=42</guid>
		<description><![CDATA[The codebase for Nycto is now on Google Code for those who&#8217;d like to have a poke at it. The synth packages (com.pixelboob.synth) are probably the most intriguing thus far, with a number of filters (reverb, delay, waveshaper, decimator), oscillators (sine, triangle, sawtooth, square), and a handy point envelope for ASDR, etc. 
AudioEngine is probably [...]]]></description>
			<content:encoded><![CDATA[<p>The codebase for Nycto is now on <a href="http://code.google.com/p/nycto/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/nycto/?referer=');">Google Code</a> for those who&#8217;d like to have a poke at it. The synth packages (com.pixelboob.synth) are probably the most intriguing thus far, with a number of filters (reverb, delay, waveshaper, decimator), oscillators (sine, triangle, sawtooth, square), and a handy point envelope for ASDR, etc. </p>
<p><a href="http://code.google.com/p/nycto/source/browse/trunk/src/com/pixelboob/synth/AudioEngine.as" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/nycto/source/browse/trunk/src/com/pixelboob/synth/AudioEngine.as?referer=');">AudioEngine</a> is probably the key class to look at, as it handles the various oscillators and filter stacks. All sound is created prior to the game beginning at present, but the classes should still be useful for realtime effects! </p>
]]></content:encoded>
			<wfw:commentRss>http://pixelboob.com/2008/12/code-emission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing Sound</title>
		<link>http://pixelboob.com/2008/12/storing-sound/</link>
		<comments>http://pixelboob.com/2008/12/storing-sound/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 00:20:07 +0000</pubDate>
		<dc:creator>mikej</dc:creator>
				<category><![CDATA[Creations]]></category>
		<category><![CDATA[Nycto]]></category>

		<guid isPermaLink="false">http://pixelboob.com/?p=30</guid>
		<description><![CDATA[While most applications that use synthesized audio produce it on the fly, I wanted the opposite for Nycto. As the game environment is constant every time around (at least within reason) the sounds that entities make shouldn&#8217;t change too much. Plus, this means the audio can be pregenerated before the game begins and unnecessary calculations [...]]]></description>
			<content:encoded><![CDATA[<p>While most applications that use synthesized audio produce it on the fly, I wanted the opposite for Nycto. As the game environment is constant every time around (at least within reason) the sounds that entities make shouldn&#8217;t change too much. Plus, this means the audio can be pregenerated before the game begins and unnecessary calculations can be avoided.</p>
<p>For this to work, there are a couple of functions. First, one that generates the sound &#8211; a sine wave here:</p>
<pre>public function generateSound():ByteArray
{
	var sound:ByteArray = new ByteArray();

	for(var i:int=0; i&lt;16000; i++)
	{
		var sample:Number = Math.sin((Number(i)/Math.PI/2))*0.25;
		sound.writeFloat(sample);
		sound.writeFloat(sample);
	}

	return sound;
}</pre>
<p>Then a segment in the game entity to prepare and play the sound, given the ByteArray as soundData:</p>
<pre>var sound:Sound = new Sound();
sound.addEventListener(SampleDataEvent.SAMPLE_DATA, this.handleSampleData);
this.soundData.position = 0;
this.soundChannel = sound.play();</pre>
<p>And finally, a SAMPLE_DATA listener to play back the sample:</p>
<pre>private function handleSampleData(event : SampleDataEvent) : void
{
	for(var i:int=0; i&lt;4096*2; i++)
	{
		if(this.soundData.bytesAvailable)
		{
			event.data.writeFloat(this.soundData.readFloat());
		}
	}
}</pre>
<p>This provides 4096 samples per channel &#8211; 8192 in stereo, which is the maximum we can provide. Once the end of the data is reached and the number of samples goes below 512, the sound will stop automatically.</p>
]]></content:encoded>
			<wfw:commentRss>http://pixelboob.com/2008/12/storing-sound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Engine Test #1</title>
		<link>http://pixelboob.com/2008/12/engine-test-1/</link>
		<comments>http://pixelboob.com/2008/12/engine-test-1/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 10:54:46 +0000</pubDate>
		<dc:creator>mikej</dc:creator>
				<category><![CDATA[Creations]]></category>
		<category><![CDATA[Nycto]]></category>

		<guid isPermaLink="false">http://pixelboob.com/?p=20</guid>
		<description><![CDATA[After much fiddling, here&#8217;s a little demo of how sound will impact my 32k game. It&#8217;s pitch black to begin, and you&#8217;ll need the following keys:

1: Trigger alarm
2, 3, 4: Trigger ceiling lights
a, d: Move left and right (note that there&#8217;s no collision detection, gravity, etc, in here yet)
space: Fire off sonar burst.

Obviously the final [...]]]></description>
			<content:encoded><![CDATA[<p>After much fiddling, here&#8217;s a little demo of how sound will impact my 32k game. It&#8217;s pitch black to begin, and you&#8217;ll need the following keys:</p>
<ul>
<li>1: Trigger alarm</li>
<li>2, 3, 4: Trigger ceiling lights</li>
<li>a, d: Move left and right (note that there&#8217;s no collision detection, gravity, etc, in here yet)</li>
<li>space: Fire off sonar burst.</li>
</ul>
<p>Obviously the final game will look very different, and not have such huge sounds <img src='http://pixelboob.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://pixelboob.com/tests/test1.swf" target="_blank">Click here to launch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pixelboob.com/2008/12/engine-test-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trimming the Fat</title>
		<link>http://pixelboob.com/2008/12/trimming-the-fat/</link>
		<comments>http://pixelboob.com/2008/12/trimming-the-fat/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 10:14:36 +0000</pubDate>
		<dc:creator>mikej</dc:creator>
				<category><![CDATA[Creations]]></category>
		<category><![CDATA[Nycto]]></category>

		<guid isPermaLink="false">http://pixelboob.com/?p=8</guid>
		<description><![CDATA[A few ways to shed the bytes:
var a:Number = 1/2 // 566 bytes
vs
var a:Number = 1*0.5 // 570 bytes

// 585 bytes
var b:Number = 1*0.5*2;
var c:Number = 1*0.5*3;
var d:Number = 1*0.5*4;
vs
// 589 bytes
var a:Number = 1*0.5;
var b:Number = a*2;
var c:Number = a*3;
var d:Number = a*4;


for(var i:int=0; i]]></description>
			<content:encoded><![CDATA[<p>A few ways to shed the bytes:</p>
<p><code>var a:Number = 1/2 // 566 bytes</code><br />
vs<br />
<code>var a:Number = 1*0.5 // 570 bytes</code></p>
<p><code><br />
// 585 bytes<br />
var b:Number = 1*0.5*2;<br />
var c:Number = 1*0.5*3;<br />
var d:Number = 1*0.5*4;<br />
</code>vs<code><br />
// 589 bytes<br />
var a:Number = 1*0.5;<br />
var b:Number = a*2;<br />
var c:Number = a*3;<br />
var d:Number = a*4;<br />
</code></p>
<p><code><br />
for(var i:int=0; i<10; i++) // 578 bytes<br />
</code>vs<code><br />
for(var i:uint=0; i<10; i++) // 582 bytes<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://pixelboob.com/2008/12/trimming-the-fat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
