<?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>zero point nine</title>
	<atom:link href="http://www.zeropointnine.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zeropointnine.com/blog</link>
	<description>lee felarca - personal work and findings</description>
	<lastBuildDate>Fri, 04 Nov 2011 13:19:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>FPO Image Generator</title>
		<link>http://www.zeropointnine.com/blog/fpo-image-generator/</link>
		<comments>http://www.zeropointnine.com/blog/fpo-image-generator/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 15:07:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[sourcecode]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=1018</guid>
		<description><![CDATA[Is it not the norm for the agency developer of whatever flavor to be asked make more progress than what&#8217;s reasonable based on the current status of a given project at any given point in time? Thus, we continuously look for ways to make more progress with less information, even while increasing the risk of [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph1">
<div class="imageright"><a href="/blog/assets/FpoImageGenerator_screenshot.jpg" target="_blank"><img border="0" src="/blog/assets/FpoImageGenerator_thumb.jpg" alt="Thumbnail" /></a></div>
<p>Is it not the norm for the agency developer of whatever flavor to be asked make more progress than what&#8217;s reasonable based on the current status of a given project at any given point in time?</p>
<p>Thus, we continuously look for ways to make more progress with less information, even while increasing the risk of wasted work and unseemly displays of developer angst. At the very least, such experiences make a person receptive to finding a few tricks that might shave off a few extra minutes in one&#8217;s pursuit to meet the latest unreasonable deadline. </p>
<p>That having been said, the potential utility of this little tool should require no further explanation.</p>
<p>It has its origins in this capricious <a href="http://twitter.com/#!/zeropointnine/status/27805279504568320" target="_blank">tweet</a> from some time last winter.</p>
<p>- <a href="/blog/assets/FpoImageGenerator_20111103.air"><strong>Download</strong></a> (uses Adobe AIR)</p>
<p>- <a href="/blog/assets_code/FpoImageGenerator_source_09.zip"><strong>Source</strong></a> (Flex project)
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/fpo-image-generator/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>MAQET 3D Gallery App for Android</title>
		<link>http://www.zeropointnine.com/blog/maqet-3d-gallery-app-for-android/</link>
		<comments>http://www.zeropointnine.com/blog/maqet-3d-gallery-app-for-android/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 22:03:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[opengl es]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=999</guid>
		<description><![CDATA[I just completed an Android app which is a simple 3D gallery of user-created designs for maqet.com. It was fun to be able to apply previous work &#8211; the MAQET configurator component done in Flash &#8211; to a completely separate development environment (native Android). Happily, I was able to use min3D for the OpenGL action, [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph1">
<div class="imageright"><a href="https://market.android.com/details?id=com.maqet.gallery" target="_blank"><img border="0" src="/blog/assets/maqetgallery.jpg" alt="Thumbnail" /></a></div>
<p>I just completed an Android app which is a simple 3D gallery of user-created designs for <a href="http://www.maqet.com">maqet.com</a>.</p>
<p>It was fun to be able to apply previous work &#8211; the MAQET <a href="/blog/3d-character-configurator-maqet-com/">configurator component</a> done in Flash &#8211; to a completely separate development environment (native Android). </p>
<p>Happily, I was able to use <a href="http://code.google.com/p/min3d/">min3D</a> for the OpenGL action, which allows me the opportunity to mention that min3D has been nominated for Packt Publishing&#8217;s <a href="http://www.packtpub.com/open-source-awards-home" target="_blank">2011 Open Source Awards</a>.<br />
<br/><br />
- <strong><a href="https://market.android.com/details?id=com.maqet.gallery"target="_blank">Android Market link</a></strong>
</div>
<p><br/><br />
<br/><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/maqet-3d-gallery-app-for-android/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Maze + Camera Visualizer Toy (iPad)</title>
		<link>http://www.zeropointnine.com/blog/mazecamviztoy-ipad/</link>
		<comments>http://www.zeropointnine.com/blog/mazecamviztoy-ipad/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 01:27:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[objective c (iOS)]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=977</guid>
		<description><![CDATA[This is my &#8220;Hello World&#8221; for iOS. OK, that&#8217;s a lie. First I did some trace-to-the-console stuff, then I did the obligatory &#8220;paint with your finger&#8221; type deal, and then spent a relatively short but intensive period on this as a more finished piece. It was meant as an exercise in learning some iOS API, [...]]]></description>
			<content:encoded><![CDATA[<p>This is my &#8220;Hello World&#8221; for iOS.</p>
<p>OK, that&#8217;s a lie. First I did some trace-to-the-console stuff, then I did the obligatory &#8220;paint with your finger&#8221; type deal, and then spent a relatively short but intensive period on this as a more finished piece. It was meant as an exercise in learning some iOS API, coding patterns and idioms. I also had to learn how to use a Mac seriously for the first time, which apparently I&#8217;m not ashamed to admit saying on the record.</p>
<iframe src='http://player.vimeo.com/video/26353475?title=1&amp;byline=1&amp;portrait=1' width='560' height='444' frameborder='0'></iframe>
<p>I recycled the maze algorithm <a href="/blog/maze-generation-algorithm/">posted previously</a>, and kept that part in C++. Then I combined it with live camera input, which I guess is my habit. I got the sense early on that the end result wouldn&#8217;t necessarily be spectacular but forged ahead anyway for the reasons mentioned above, and tried to make it as finished as possible.</p>
<p>I haven&#8217;t submitted this little toy to the App Store™ for various reasons, some of which are arguably irrational, and it&#8217;s possible I should reconsider. Should that come to pass, I will be sure to post an update.</p>
<p><strong>A few more details&#8230;</strong><span id="more-977"></span></p>
<p>User-selectable parameters determine which pixels get erased from the image. This can be based on brightness, or by the apparent red-ness, green-ness, or blue-ness of the image. The calculations for the latter look like this, which I think worked out quite well. If we&#8217;re testing for the &#8220;redness&#8221; of a pixel&#8230;<br />
<code><br />
    int redness = (redChannel - greenChannel)  +  (redChannel - blueChannel);<br />
    if (redness < someThresholdValue) eraseMyPixel();<br />
</code>	</p>
<p>Redness can be a good criteria for filtering for exposed skin, depending on skin tone. Greenness can be a good filter for typical indoor settings because it tends to show up less often as red or blue (unless the walls were painted green, which would in any case lead to another interesting use case (green screen...)). You can see in the video where I'm waving around a green folder how well the green gets isolated. </p>
<p>So anyway, the image is scaled to the same dimensions of the maze so a 1-to-1 comparison can be made between the pixels and the squares of the maze. Blocks of the maze are removed based on whether their corresponding pixels have been erased, and the adjacent vertical or horizontal segment/s are filled in for aesthetic effect. At that point, the maze is, unfortunately, no longer solvable.</p>
<p>And the video feed can also be switched between the front and rear cameras of the iPad 2 at runtime, so that's fun. </p>
<p>Capturing of camera data in iOS is done on a different thread, so concurrency issues turned out to be a big deal, particularly since the program runs in a continuous loop. I tried to do as much of the image processing as possible on that secondary thread to take advantage of the dual core-ness of the iPad 2, but could never quite make it work out. In the end, I had to hand off the imagedata off to the UI thread to do the rest of the work, but at least learned the value of the NSObject method <code>performSelectorOnMainThread</code>..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/mazecamviztoy-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kinect Point Cloud Visualizer</title>
		<link>http://www.zeropointnine.com/blog/kinect-pcv/</link>
		<comments>http://www.zeropointnine.com/blog/kinect-pcv/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 03:44:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[openFrameworks]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=954</guid>
		<description><![CDATA[The underlying idea here is something along the lines of a realtime VJ-like performance tool. This is a work in progress. Using openFrameworks, Kinect point-cloud data is collected in a sequence of frames that can be saved to disk and played back on demand. Points beyond a specified depth are filtered out, and a bounding [...]]]></description>
			<content:encoded><![CDATA[<p>The underlying idea here is something along the lines of a realtime VJ-like performance tool. This is a work in progress. Using openFrameworks, Kinect point-cloud data is collected in a sequence of frames that can be saved to disk and played back on demand. Points beyond a specified depth are filtered out, and a bounding box is calculated to form the basis of some simple dynamic interactions. </p>
<iframe src='http://player.vimeo.com/video/25114327?title=1&amp;byline=1&amp;portrait=1' width='560' height='444' frameborder='0'></iframe>
<p>Various effects with variations can be triggered and combined in real time on both saved and live video: </p>
<iframe src='http://player.vimeo.com/video/25113362?title=1&amp;byline=1&amp;portrait=1' width='560' height='444' frameborder='0'></iframe>
<p>An ostentatious particle emitter effect:</p>
<iframe src='http://player.vimeo.com/video/25113065?title=1&amp;byline=1&amp;portrait=1' width='560' height='444' frameborder='0'></iframe>
<p>Explosions which can be triggered on demand or based on sudden changes to the bounding box:</p>
<iframe src='http://player.vimeo.com/video/25113304?title=1&amp;byline=1&amp;portrait=1' width='560' height='444' frameborder='0'></iframe>
<p>&#8220;Alpha trails&#8221; (with more hands)&#8230;</p>
<iframe src='http://player.vimeo.com/video/25113836?title=1&amp;byline=1&amp;portrait=1' width='560' height='420' frameborder='0'></iframe>
<p>Strobe, with quick time shifting effect:</p>
<iframe src='http://player.vimeo.com/video/25113753?title=1&amp;byline=1&amp;portrait=1' width='560' height='438' frameborder='0'></iframe>
<p>The priority for this has been to develop my up-til-now shallow knowledge of C++, focusing on code design and performance, rather than the exploration of novel uses of the Kinect as an input device (or so I tell myself).</p>
<p>Given more time, I&#8217;d like to do more with the visual effects, look into shaders, write a polygon-based renderer (rather than simple points), and find excuses to do more with multi-threading (currently the loading routine runs on a separate thread, and the &#8216;video capture&#8217; routine runs on three). And find a clever use for OpenCV to do more than what I&#8217;m doing now with just a bounding box. And play with MIDI to trigger video clips, and map various parameters DAW-style. And then maybe work on a real user interface, possibly broken out in a separate window, using Flash or what have you.</p>
<p>I believe the core recording and playback system and my implementation of a &#8220;Point Cloud Video&#8221; file format are logical candidates for a public post on GitHub, but will entail some rationalization and massaging of code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/kinect-pcv/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Updated FLV Encoder, 3.5x faster with Alchemy</title>
		<link>http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/</link>
		<comments>http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 14:32:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[sourcecode]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=898</guid>
		<description><![CDATA[Demo: Record and encode FLV&#8217;s from webcam in realtime, using AlchemyOr, download AIR desktop version This is an update to FLV Encoder which adds an optional Alchemy routine that&#8217;s about 3.5x faster, as well as FileStream support for writing directly to a local file using AIR. The library has been architected in such a way [...]]]></description>
			<content:encoded><![CDATA[<div class="vimeoBox" style="padding-left:20px; padding-bottom:10px; width:200px;"><img src="/blog/assets/WebcamRealTimeFlvEncoder_thumb.jpg" onclick="javascript:showBox('WebcamRealTimeFlvEncoder',340,440,'e5e5e5',this);" alt="Thumbnail - Click me" style="cursor: pointer" />
<div style="padding-top:12px;"><em>Demo: Record and encode FLV&#8217;s from webcam in realtime, using Alchemy<br/><br/>Or, <a href="/blog/assets/WebcamRealtimeFlvEncoder.air">download AIR desktop version</a></em></div>
</div>
<p>This is an update to FLV Encoder which adds an optional Alchemy routine that&#8217;s about 3.5x faster, as well as FileStream support for writing directly to a local file using AIR. The library has been architected in such a way that you can use the package while targeting either the browser (no FileStream support) or AIR, and either Flash 9 (no Alchemy support) or Flash 10 &#8211; without getting class dependency compiler errors. </p>
<p>I&#8217;ve put the package on <a href="https://github.com/zeropointnine/leelib" target="_blank">Github</a>, along with a couple examples (including the one from the <a href="http://www.zeropointnine.com/blog/flv-encoder-with-audio/">last post</a>). The API has changed a little so be sure to also see the example code below. A method <code>updateDurationMetadata()</code> has been added so the video duration does not have to be declared before the video has been created. Also, a bug where the top-most line of pixels was not being written has been fixed.</p>
<p><strong>Realtime encoding demo:</strong></p>
<p>Because of the increased speed of the Alchemy version, it is now viable to encode FLV&#8217;s in realtime as the audio and video is being captured, at least within certain limits. Click on the thumbnail above for an online demo that encodes webcam video and audio to a file at 320&#215;240 in real time. If your system is fast enough, you can keep the framerate set to 15FPS with minimal hiccups. The browser-based version must store the entire FLV in memory before saving to disk, but the <a href="/blog/assets/WebcamRealtimeFlvEncoder.air">equivalent AIR version</a> can save its contents directly to a file so that the only limiting factor is disk space. I&#8217;m using a dynamic timing and queuing system to keep video and audio in sync which could be the topic of another post.</p>
<p><strong>Updated usage examples:</strong></p>
<p><span id="more-898"></span></p>
<p>[A] To encode an FLV to a ByteArray, start by instantiating <code>ByteArrayFlvEncoder</code>. The rest is similar to the last version, but you can now call <code>updateDurationMetadata()</code> when you&#8217;re done to update the duration property in the metadata. Finally, call <code>kill()</code> to prepare the object for garbage collection:</p>
<p>[as3]<br />
var baFlvEncoder:ByteArrayFlvEncoder = new ByteArrayFlvEncoder(myFrameRate);</p>
<p>baFlvEncoder.setVideoProperties(myWidth, myHeight, VideoPayloadMakerAlchemy);<br />
// (Omit the 3rd argument to NOT use Alchemy if you&#8217;re targeting Flash 9)<br />
baFlvEncoder.setAudioProperties(BaseFlvEncoder.SAMPLERATE_44KHZ, true, false, true);</p>
<p>baFlvEncoder.start();</p>
<p>baFlvEncoder.addFrame(myBitmapData, myAudioByteArray);<br />
baFlvEncoder.addFrame(myBitmapData, myAudioByteArray); // etc.</p>
<p>baFlvEncoder.updateDurationMetadata();</p>
<p>saveOutMyFileUsingFileReference( baFlvEncoder.byteArray );</p>
<p>baFlvEncoder.kill(); // for garbage collection<br />
[/as3]</p>
<p>[B] To encode an FLV directly to a local file (in AIR), instantiate <code>FileStreamFlvEncoder</code> with a <code>File</code> reference, and open up the exposed <code>FileStream</code>, and then close it when you&#8217;re all done:</p>
<p>[as3]<br />
var myFile:File = File.documentsDirectory.resolvePath(&#8220;video.flv&#8221;);<br />
var fsFlvEncoder:FileStreamFlvEncoder = new FileStreamFlvEncoder(myFile, myFrameRate);<br />
fsFlvEncoder.fileStream.openAsync(myFile, FileMode.UPDATE);</p>
<p>fsFlvEncoder.setVideoProperties(myWidth, myHeight, VideoPayloadMakerAlchemy);<br />
fsFlvEncoder.setAudioProperties(BaseFlvEncoder.SAMPLERATE_44KHZ, true, false, true);</p>
<p>fsFlvEncoder.start();</p>
<p>fsFlvEncoder.addFrame(myBitmapData, myAudioByteArray);<br />
fsFlvEncoder.addFrame(myBitmapData, myAudioByteArray); // etc.</p>
<p>fsFlvEncoder.updateDurationMetadata();</p>
<p>fsFlvEncoder.fileStream.close();</p>
<p>fsFlvEncoder.kill();<br />
[/as3]</p>
<p>A new instance of FlvEncoder should be created for every new FLV to be generated. </p>
<p>If you&#8217;re using the Alchemy version, the SWC lives in <code>leelib/util/flvEncoder/alchemy</code>, so be sure add that folder to your project library path. The C++ code is there as well.</p>
<p>Note that the current Alchemy video encoding routine is being done synchronously, which means that although it&#8217;s much faster than the regular AS3 version, the main Flash thread must still wait for the Alchemy encoding to be done before continuing. An asynchronous version would allow for a real-time encoding scenario that is more flexible and probably with less &#8216;dropouts&#8217;, and would probably prompt the need an internal queuing system. Anyway, this warrants further development.</p>
<p><strong>- <a href="https://github.com/zeropointnine/leelib" target="_blank">Source code</a></strong> (Github)</p>
<p class="creacom">Licensed under a <a href="http://creativecommons.org/licenses/by/3.0/" rel="license" target="_blank">Creative Commons Attribution 3.0 License</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
		<item>
		<title>FLV Encoder with Audio</title>
		<link>http://www.zeropointnine.com/blog/flv-encoder-with-audio/</link>
		<comments>http://www.zeropointnine.com/blog/flv-encoder-with-audio/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 03:51:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=848</guid>
		<description><![CDATA[FlvEncoder demo implementation: Records webcam video and audio to a local file ! Update: See updated FLV Encoder post + code here A prospective client recently approached me about the possibility of adding audio support to SimpleFlvEncoder. They ultimately decided to go a different direction and so didn&#8217;t commission me for that work, but not [...]]]></description>
			<content:encoded><![CDATA[<div class="vimeoBox" style="padding-left:20px; padding-bottom:20px; width:200px;"><img src="/blog/assets/FlvEncoderRedux_thumb.jpg" onclick="javascript:showBox('FlvEncoderRedux',340,290,'e5e5e5',this);" alt="Thumbnail - Click me" style="cursor: pointer" />
<div><em>FlvEncoder demo implementation: Records webcam video and audio to a local file</em></div>
</div>
<p><span style="font-style:italic;"><a href="http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/">! Update: See updated FLV Encoder post + code here</a></span></p>
<p>A prospective client recently approached me about the possibility of adding audio support to <a href="">SimpleFlvEncoder</a>. They ultimately decided to go a different direction and so didn&#8217;t commission me for that work, but not before my curiosity had already gotten the better of me&#8230; </p>
<p>This class makes it possible to create FLV&#8217;s in AS3 that contain both video and audio, all on the client-side using the regular browser-based Flash Player. Like with the old version from 2007 (!), video is uncompressed (or rather, just zlib-compressed on a per-frame basis). Audio must be supplied in uncompressed PCM format with either 8 or 16 bits per sample, mono or stereo, and at 11, 22, or 44 KHz. It can also create FLV&#8217;s that contain only audio or only video.</p>
<p>Here is a quick-and-hand-wavey example of using the class (Please see the comments in the source for more detail.).<span id="more-848"></span></p>
<pre><code>
var flvEncoder:FlvEncoder = new FlvEncoder(_fps, _duration);
flvEncoder.setVideoProperties(_videoWidth, _videoHeight);
flvEncoder.setAudioProperties(FlvEncoder.SAMPLERATE_44KHZ, _is16Bit, _isStereo);
flvEncoder.begin();

for (var i:int = 0; i < _numFrames; i++)
{
	flvEncoder.addFrame(_myBitmaps[i], _myChunksOfAudio[i]);
}

saveOutMyFile( flvEncoder.byteArray );

</code></pre>
<p>The old "SimpleFlvEncoder" class, which dealt only with video, was stupidly simple to use. Having to deal with audio ends up being a little more involved. As I said, you have to supply the audio data in PCM format, which basically just means raw, uncompressed audio. You give it the audio data in the <code><b>addFrame()</b></code> method. You might gather that data using <code>Sound.extract()</code> or <code>SampleDataEvent</code>, or by dynamically generating your own. Use <code><b>audioFrameSize</b></code> to determine how much audio data in bytes is expected per frame. </p>
<p>Supplying too little or too much audio per frame is I believe "legal" per the FLV spec, so the class will take whatever size ByteArray is given to it for audio. An incorrect amount may result either in an unexpected framerate on playback or choppiness in the audio depending on the FLV playback implementation of the client program.</p>
<p>It's beyond the scope of this post to provide a tutorial-like explanation of playing with audio data in Flash, but let me describe what I think are the three most likely use-cases for this class when it comes to audio. </p>
<p>One is where the audio is static (e.g., a soundtrack that accompanies the video). In this case, you could load/embed an uncompressed WAV file into a ByteArray and basically just feed the correct number of bytes from that ByteArray to the addFrame() method without much drama (Uncompressed WAV files are just raw PCM audio data with some metadata at the beginning; you would start copying the bytes from after the end of the <a href="https://ccrma.stanford.edu/courses/422/projects/WaveFormat/" target="_blank">metadata</a>). Alternatively, you could use <code>Sound.extract()</code> on an MP3, etc.</p>
<p>Another is where the audio comes from the webcam, which is what I'm doing in the sample implementation above. I'm using a modified version of Thibault Imbert's <a href="http://www.bytearray.org/?p=1858">MicRecorder</a> class to collect the audio data into one big audio ByteArray and then chunking out the pieces of it to FlvEncoder in a loop at the very end, which basically amounts to the same thing as the first scenario.</p>
<p>The last is where the audio is dynamic, presumably accompanying video which is equally dynamic, like for a game or other interactive experience. Unfortunately, it's impossible to record the global sound output from Flash using <code>SampleDataEvent</code> or anything else (though I'd be happy to be proven wrong). Just for the hell of it I tried using <code>SoundMixer.computeSpectrum()</code> on a really quick interval for the task, and was able to get something approximating what was needed, but it was predictably... way not good enough. Anyway, this means you would need to create something like a sound mixing engine, or possibly use some extant AS3 sound compositing library. </p>
<p>The last thing to say on this for the time being is that I tried my hand at Alchemy for the first time and made a version of the encoder that runs about 3x faster, but as a C++ and Alchemy noob, couldn't get rid of a memory leak and then gave up on it for the time being. If you're well versed at this sort of thing please let me know and I will happily send you the code. Otherwise, I will hopefully return to it at some point and post an update.</p>
<p>If the encoder is quick enough and the CPU demands of the dynamically generated video content are low enough, the FLV could be created in real time as the content is being produced, rather than storing all the bitmaps and audio data in memory and doing it all at the end; this might be viable under some limited use cases (i.e., low enough CPU use by Flash + low enough frame rate + small enough video size + fast enough computer).</p>
<p>Last last thing: I've always thought one of the coolest open source AS3 projects would be to use Alchemy with the <a href="http://www.xvid.org" target="_blank">Xvid</a> or <a href="http://www.videolan.org/developers/x264.html" target="_blank">x264</a> C library to do client-side all-Flash Xvid or h264 video encoding (An "easier" solution would be AIR w/ NativeProcess + ffmpeg, but that kind of ruins the fun.). Anyway, just putting it out there...</p>
<p>-  <a href="/blog/assets_code/FlvEncoder_v0.9" style="text-decoration:line-through;"">Source code for FlvEncoder</a><br />
- <strong><a href="http://github.com/zeropointnine/leelib/tree/master/src">Updated version on Github</a></strong></p>
<p class="creacom">Licensed under a <a href="http://creativecommons.org/licenses/by/3.0/" rel="license" target="_blank">Creative Commons Attribution 3.0 License</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/flv-encoder-with-audio/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Maze Generation Algorithm</title>
		<link>http://www.zeropointnine.com/blog/maze-generation-algorithm/</link>
		<comments>http://www.zeropointnine.com/blog/maze-generation-algorithm/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 09:03:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[openFrameworks]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[sourcecode]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=788</guid>
		<description><![CDATA[A couple months ago, while I was still a full-time student, which did not last very long, but that&#8217;s another story, I created a maze generator as a way to learn some C++, now posted here just for the fun of it. I started with a description of the algorithm found on Wikipedia, worked it [...]]]></description>
			<content:encoded><![CDATA[<p>A couple months ago, while I was still a full-time student, which did not last very long, but that&#8217;s another story, I created a maze generator as a way to learn some C++, now posted here just for the fun of it.</p>
<p>I started with a description of the algorithm found on <a href="http://en.wikipedia.org/wiki/Maze_generation_algorithm" target="_blank">Wikipedia</a>, worked it out in Processing (with 2D, 3D, and isometric views added as a bonus), and then ported it to C++ using openFrameworks for the basic display action.</p>
<p>Presumably it could be used as the start of a game-like concept, if so inclined.</p>
<p>- <a href="http://www.zeropointnine.com/blog/assets_code/MazeGenProcessing.zip">Processing</a> (source + Win/Mac executables)<br />
- <a href="http://www.zeropointnine.com/blog/assets_code/MazeGenCpp.zip">C++/oF</a> (source + Windows executable)<br />
<br/></p>
<iframe src='http://player.vimeo.com/video/15280326?title=1&amp;byline=1&amp;portrait=1' width='560' height='560' frameborder='0'></iframe><br />
<br/><br />
<iframe src='http://player.vimeo.com/video/15681233?title=1&amp;byline=1&amp;portrait=1' width='560' height='560' frameborder='0'></iframe>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/maze-generation-algorithm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3D Character Configurator (maqet.com)</title>
		<link>http://www.zeropointnine.com/blog/3d-character-configurator-maqet-com/</link>
		<comments>http://www.zeropointnine.com/blog/3d-character-configurator-maqet-com/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 19:20:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=765</guid>
		<description><![CDATA[Easily the most interesting and innovative commercial project I&#8217;ve been involved with over the last period of time has been maqet.com, which is created and run by artist Keith Cottingham. I&#8217;ve been responsible for the site&#8217;s configurator component, which allows the user to create customized maquettes by changing their poses and skin. The &#8220;maqet&#8221; is [...]]]></description>
			<content:encoded><![CDATA[<p>Easily the most interesting and innovative commercial project I&#8217;ve been involved with over the last period of time has been <a href="http://www.maqet.com" target="_blank">maqet.com</a>, which is created and run by artist <a href="http://www.kcott.com" target="_blank">Keith Cottingham</a>. </p>
<p>I&#8217;ve been responsible for the site&#8217;s configurator component, which allows the user to create customized maquettes by changing their poses and skin. The &#8220;maqet&#8221; is then created in physical form through a 3D-printing process and delivered to the user. </p>
<p>Most recently, I&#8217;ve been working on the drawing tools that allow the user to paint on a two-dimensional canvas that updates the texture of the 3D model in real-time. Soon to be added is a freehand drawing-to-bezier curve tool.  </p>
<iframe src='http://player.vimeo.com/video/19503190?title=1&amp;byline=1&amp;portrait=1' width='560' height='336' frameborder='0'></iframe>
<p>This is a quick-and-dirty video capture of the configurator in action. But mostly, please feel encouraged to <a href="http://www.maqet.com" target="blank">visit the site</a> and try it for yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/3d-character-configurator-maqet-com/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Parsons MFA Design + Technology</title>
		<link>http://www.zeropointnine.com/blog/parsons-mfa-design-technology/</link>
		<comments>http://www.zeropointnine.com/blog/parsons-mfa-design-technology/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 16:42:56 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[other]]></category>
		<category><![CDATA[mfadt]]></category>
		<category><![CDATA[parsons]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=705</guid>
		<description><![CDATA[I just wanted to mention that at the end of the month I&#8217;ll be taking a happily anticipated break from the commercial grind and going back to school, to the Parsons MFA Design &#038; Technology program. I&#8217;m looking forward to posting new and hopefully interesting things here as I progress through the program, the time [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to mention that at the end of the month I&#8217;ll be taking a happily anticipated break from the commercial grind and going back to school, to the Parsons MFA Design &#038; Technology program. </p>
<p>I&#8217;m looking forward to posting new and hopefully interesting things here as I progress through the program, the time during which I aim to broaden the scope of my personal sandbox and make experimentation a full-time vocation. But hopefully without losing any of the snark.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/parsons-mfa-design-technology/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>homescreen 3D &#8211; an OpenGL Android program launcher</title>
		<link>http://www.zeropointnine.com/blog/homescreen-3d-an-opengl-android-program-launcher/</link>
		<comments>http://www.zeropointnine.com/blog/homescreen-3d-an-opengl-android-program-launcher/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 05:50:07 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[opengl es]]></category>

		<guid isPermaLink="false">http://www.zeropointnine.com/blog/?p=631</guid>
		<description><![CDATA[Video demonstrating my first &#8220;experiment&#8221; with the Android Market. An answer to a question nobody asked&#8211; &#8220;What if you made an Android program launcher in 3D?&#8221; Video updated with most recent version running on Honeycomb, 6/2011 It was, to be frank, a gigantic pain in the ass coding the motion for this, since there seems [...]]]></description>
			<content:encoded><![CDATA[<p>Video demonstrating my first &#8220;experiment&#8221; with the Android Market. An answer to a question nobody asked&#8211; &#8220;What if you made an Android program launcher in 3D?&#8221;</p>
<div style="text-align:center; padding-top:11px; padding-bottom:5px;"><iframe src='http://player.vimeo.com/video/13795092?title=1&amp;byline=1&amp;portrait=1' width='560' height='510' frameborder='0'></iframe></div>
<p><em>Video updated with most recent version running on Honeycomb, 6/2011</em></p>
<p>It was, to be frank, a gigantic pain in the ass coding the motion for this, since there seems to be no Tweener-like class written in Java (Java, not processing&#8230;). Anyone know of one?</p>
<p>Built using <a href="/blog/a-3d-framework-for-android-min3d/">min3D</a>.</p>
<table border="0" style="margin-left:auto;text-align:right;">
<tr>
<td>
&nbsp;<a href="market://search?q=pname:com.zeropointnine.homeScreen3d">free version</a><br />
<img src="/blog/assets/qr_homescreen3dFree.png" border="0" /><br/>&nbsp;
</td>
<td width="30"></td>
<td>
&nbsp;<a href="market://search?q=pname:com.zeropointnine.homeScreen3dFull">almost-free version</a><br />
<img src="/blog/assets/qr_homescreen3dFull.png" border="0" /><br/>:T
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.zeropointnine.com/blog/homescreen-3d-an-opengl-android-program-launcher/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

