<?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>Zach Archer Blog &#187; Flash</title> <atom:link href="http://blog.zacharcher.com/category/flash/feed/" rel="self" type="application/rss+xml" /><link>http://blog.zacharcher.com</link> <description>Friend to analog and digital alike</description> <lastBuildDate>Tue, 10 Jan 2012 06:24:29 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Synthetic Speech in Flash: the Source Code</title><link>http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/</link> <comments>http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/#comments</comments> <pubDate>Tue, 10 Jan 2012 05:49:27 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[as3]]></category> <category><![CDATA[code]]></category> <category><![CDATA[robots]]></category> <category><![CDATA[source]]></category> <category><![CDATA[speech]]></category> <category><![CDATA[synthetic]]></category> <category><![CDATA[talking]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=326</guid> <description><![CDATA[Remember the Flash synthetic speech demo, which turned into a talking robot app? Here's the source code: Download it! Please note: This code comes with no warranty, nor support, whatsoever. None. Zip. Nada. If your talking robots become self-aware and enslave humanity, then I will not be held responsible. But if you're in the mood [...]]]></description> <content:encoded><![CDATA[<p>Remember the <a
href="http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/">Flash synthetic speech demo</a>, which turned into a <a
href="http://blog.zacharcher.com/2010/01/03/here-comes-the-metal-mouth/">talking robot app</a>? Here's the source code: <strong><a
href="http://zacharcher.com/lab/20120109_as3_speech/as3_speech.zip">Download it</a></strong>!</p><p><img
class="aligncenter" src="http://zacharcher.com/lab/20120109_as3_speech/supercali.png" alt="SUPERCALIFRAGILISTICEXPEALIDOSHUS" width="380" height="328" /></p><p>Please note: This code comes with no warranty, nor support, whatsoever. None. Zip. Nada. If your talking robots become self-aware and enslave humanity, then I will not be held responsible. But if you're in the mood for tinkering, here's how it's strung together:</p><ul><li>The sound is generating using <a
href="http://en.wikipedia.org/wiki/Linear_predictive_coding">Linear Predictive Coding</a> ("LPC").</li><li>First, some Python code: The <em>analyze_lpc.py</em> script analyzes <em>phonemes.dat</em> (which is just a headerless version of <em>phonemes.aif</em>). Individual phonemes are separated by moments of silence, so the script splits the sound file on those. Each phoneme is converted to LPC data, using code that I ported from <a
href="http://soundlab.cs.princeton.edu/software/rt_lpc/">the rt_lpc project</a>. I felt like I understood the mathematics 3 years ago, but I doubt I could explain it today.</li><li>Now, in Flash: Launch the <em>DictCompressor</em> application, and watch the trace messages. Click the screen to open the browser window, then select your <em>cmudict___.txt</em> pronouncing dictionary. (You can obtain the latest CMUdict <a
href="http://www.speech.cs.cmu.edu/cgi-bin/cmudict">here</a>.) Flash will convert this to a (smaller) <em>cmudict.dat</em> file, which is what <em>LPCsynth.swf</em> loads.</li><li><em>LPCsynth</em> is the application that talks. The <em>LPCSynthHarness.sayItNow()</em> method creates an array of <em>LPCFrames</em>, which are "spoken" in the <em>sampleData()</em> method.  This was never intended for public distribution, so the code is not exactly stellar (the talking bit should be extracted into its own class).</li></ul><p>Is this interesting? Did your Flash Player become self-aware after hearing its own voice? Let me know!</p><p>It's funny, originally this was intended for the <a
href="http://controlzinc.com/">controlzinc.com</a> website. The robot voice would sing as you clicked, crooning about your mousing habits. I still can't decide if that idea was brilliant, or terrible.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/&amp;title=Synthetic Speech in Flash: the Source Code' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Synthetic Speech in Flash: the Source Code+http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Synthetic Speech in Flash: the Source Code&amp;uri=http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Son of Strange Attractors</title><link>http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/</link> <comments>http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/#comments</comments> <pubDate>Sun, 17 Apr 2011 07:33:40 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Graphics]]></category> <category><![CDATA[attractors]]></category> <category><![CDATA[strange]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=306</guid> <description><![CDATA[I rewrote my strange attractor generator, in Flash: Try it. Click to generate new attractors. The attractor coefficients are still chosen randomly. But now, attractors that explode/collapse are rejected. Also, attractors that create "boring" shapes (by drawing the same pixels repeatedly) are discarded. It's a little slow, but I'm sure the speed could be improved using [...]]]></description> <content:encoded><![CDATA[<p>I rewrote my strange attractor generator, in Flash:</p><p
style="text-align: center;"><a
href="http://zacharcher.com/lab/20110416_attractor/attractor.swf"><img
class="aligncenter" title="Strange Attractor" src="http://zacharcher.com/lab/20110416_attractor/attractor_thumb.png" alt="" width="327" height="335" /></a></p><p
style="text-align: left;"><a
href="http://zacharcher.com/lab/20110416_attractor/attractor.swf">Try it</a>. Click to generate new attractors.</p><p
style="text-align: left;">The attractor coefficients are still chosen randomly. But now, attractors that explode/collapse are rejected. Also, attractors that create "boring" shapes (by drawing the same pixels repeatedly) are discarded. It's a little slow, but I'm sure the speed could be improved using Pixel Bender.</p><p
style="text-align: left;">Also, <a
href="http://zacharcher.com/lab/20110416_attractor/attractor_source.zip">here's the source code</a>. (Compile with Flash CS5.)</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/&amp;title=Son of Strange Attractors' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Son of Strange Attractors+http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Son of Strange Attractors&amp;uri=http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2011/04/16/son-of-strange-attractors/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Video Reel 2011</title><link>http://blog.zacharcher.com/2011/04/15/video_reel_2011/</link> <comments>http://blog.zacharcher.com/2011/04/15/video_reel_2011/#comments</comments> <pubDate>Sat, 16 Apr 2011 07:04:44 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Games]]></category> <category><![CDATA[Graphics]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[iPhone]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[interactive]]></category> <category><![CDATA[moths]]></category> <category><![CDATA[reel]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=291</guid> <description><![CDATA[Yes indeed, I created my own showreel! Watch: regular, or HD version. (Vimeo, 4:00) The clips have a bias towards art and animation, because: 1). It shows well in a video, 2). This reel was created for an application to an artist's colony. (More on that later.) The intro &#38; outro animations (the flying moths) [...]]]></description> <content:encoded><![CDATA[<p>Yes indeed, I created my own showreel!</p><p
style="text-align: center;"><a
href="http://vimeo.com/22465804"><img
class="aligncenter" title="A few moths" src="http://zacharcher.com/blog_pics/2011/moth_animation_thumb.jpg" alt="" width="368" height="275" /></a></p><p>Watch: <a
href="http://vimeo.com/22308668">regular</a>, or <a
href="http://vimeo.com/22465804">HD version</a>. (Vimeo, 4:00)</p><p>The clips have a bias towards art and animation, because: 1). It shows well in a video, 2). This reel was created for an application to an artist's colony. (More on that later.)</p><p><span
id="more-291"></span>The intro &amp; outro animations (the flying moths) were created specifically for the reel. They're my favorite clips, yet they took less than a day to assemble. The moths were left-over from an old project (you'll see an experimental <a
href="http://soundcloud.com/2mm">Too Many Moths</a> interface within the video), and I felt the convergence motion was a strong opener.</p><p>The moths were composited in Flash. They were arranged semi-randomly, then the image was "baked" onto their wings &amp; body. I flew them backwards, and recorded their positions on each frame. Then I reset the moths and flew them forward, again tracking their flight paths.</p><p>Actually, this was done in memory, so it was very quick. My laptop needed 3 seconds to arrange, bake, &amp; move 120 moths. Then the harness presented me with the frozen frame, so I could evaluate how well the moths covered the images. If the coverage was bad, I hit a key to build new moths from scratch.</p><p>When I found a nice arrangement, I hit another key which stepped through the animation, and rendered each frame at a ridiculously high resolution (2160x1440, to cope with scaling problems in Adobe Premiere, unfortunately). The frames were <a
href="https://github.com/mikechambers/as3corelib">encoded as .PNG's</a> and <a
href="http://labs.findsubstance.com/2008/04/03/as3-upload-encode-images/">uploaded to a PHP script running on localhost</a>, which saved the 200+ images to disk. The intro took about 20 minutes to render &amp; export. The outro, being more complicated, took over an hour.</p><p>Looking at the reel, I'm happy to present so many types of work — animation, audio programming, visual design, interactives, games, kiosks, websites. These four years have been amazing.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2011/04/15/video_reel_2011/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2011/04/15/video_reel_2011/&amp;title=Video Reel 2011' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Video Reel 2011+http://blog.zacharcher.com/2011/04/15/video_reel_2011/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Video Reel 2011&amp;uri=http://blog.zacharcher.com/2011/04/15/video_reel_2011/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2011/04/15/video_reel_2011/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2011/04/15/video_reel_2011/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>A Formant Sequencer in Flash</title><link>http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/</link> <comments>http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/#comments</comments> <pubDate>Tue, 15 Mar 2011 01:12:10 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Hardware]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[editor]]></category> <category><![CDATA[formant]]></category> <category><![CDATA[fs1r]]></category> <category><![CDATA[synthesis]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=284</guid> <description><![CDATA[I started an open source project: fseq-flash is a formant sequence editor. Current features include: Import AIFF files Audition and edit formant sequences in real time Export .syx files for the Yamaha FS1R Click to launch. Press the space bar to play the sound. You can push your formant sequence to the Yamaha FS1R, using [...]]]></description> <content:encoded><![CDATA[<p>I started an open source project: <a
href="http://code.google.com/p/fseq-flash/">fseq-flash</a> is a formant sequence editor. Current features include:</p><ul><li>Import AIFF files</li><li>Audition and edit formant sequences in real time</li><li>Export .syx files for the <a
href="http://blog.zacharcher.com/2009/01/05/synth-review-the-head-exploding-fs1r/">Yamaha FS1R</a></li></ul><p
style="text-align: center;"><a
title="fseq-flash" href="http://zacharcher.com/lab/fseq/fseq-flash.html"><img
class=" aligncenter" title="Import an AIFF, convert to Formant Sequence" src="http://zacharcher.com/lab/fseq/screenshots/fseq_import.png" alt="" width="408" height="341" /></a></p><p><a
title="fseq-flash" href="http://zacharcher.com/lab/fseq/fseq-flash.html">Click to launch. Press the space bar to play the sound.</a></p><p>You can push your formant sequence to the Yamaha FS1R, using software such as <a
href="http://synth-voice.sakura.ne.jp/fs1r_editor_english.html">K_Take's FS1R Editor</a>. Click the "Save .syx" button, and follow the instructions in K_Take's documentation. This is a lot of fun, and breathes new life into the FS1R.</p><p>This project became much deeper than anticipated! The code includes FFT analysis (thanks <a
href="http://gerrybeauregard.wordpress.com/2010/08/03/an-fft-in-as3/">Gerry Beauregard</a>), pitch detection, a formant detection algorithm, and an AIFF parser to read AIFF files. The interface was a challenge to design and implement, and there are still many unfinished features (see the <a
href="http://code.google.com/p/fseq-flash/issues/list">issues list</a>).</p><p>My energy is shifting to other work, so I'll enhance fseq-flash when time permits.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/&amp;title=A Formant Sequencer in Flash' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=A Formant Sequencer in Flash+http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=A Formant Sequencer in Flash&amp;uri=http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2011/03/14/a-formant-sequence-editor-in-flash/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Filtered Noise Sequencer</title><link>http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/</link> <comments>http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/#comments</comments> <pubDate>Fri, 31 Dec 2010 01:46:26 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[wordpress]]></category> <category><![CDATA[bandpass]]></category> <category><![CDATA[filtered]]></category> <category><![CDATA[noise]]></category> <category><![CDATA[sequencer]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=255</guid> <description><![CDATA[Here's something fun -- I made a 16-step sequencer in Flash, that plays filtered noise (or sine waves, when the filter is narrow): Filtered Noise Sequencer Drag and resize the blue blocks to change the filter frequency and width. This sequencer is not using expensive bandpass filters. The oscillators are sine waves, which are frequency [...]]]></description> <content:encoded><![CDATA[<p>Here's something fun -- I made a 16-step sequencer in Flash, that plays filtered noise (or sine waves, when the filter is narrow):</p><p
style="text-align: center;"><a
href="http://zacharcher.com/lab/20101230_noise_seq/noise_seq.html"><img
class="aligncenter" title="Filtered Noise Sequencer!" src="http://zacharcher.com/lab/20101230_noise_seq/noise_seq_thumb.png" alt="" width="324" height="255" /></a><br
/> <a
href="http://zacharcher.com/lab/20101230_noise_seq/noise_seq.html">Filtered Noise Sequencer</a></p><p
style="text-align: left;">Drag and resize the blue blocks to change the filter frequency and width.</p><p
style="text-align: left;">This sequencer is not using expensive bandpass filters. The oscillators are sine waves, which are <a
href="http://en.wikipedia.org/wiki/Frequency_modulation_synthesis">frequency modulated</a> with white noise. It may not sound inherently musical, but you can produce great hihats, bass thuds, and airy pitched noises.</p><p
style="text-align: left;">Here's the <a
href="http://zacharcher.com/lab/20101230_noise_seq/noise_seq.zip">source code</a>. (Requires Flash CS5 to compile.) Have fun!</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/&amp;title=Filtered Noise Sequencer' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Filtered Noise Sequencer+http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Filtered Noise Sequencer&amp;uri=http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2010/12/30/filtered-noise-sequencer/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Twang&#8230; in Flash?!</title><link>http://blog.zacharcher.com/2010/09/27/twang-in-flash/</link> <comments>http://blog.zacharcher.com/2010/09/27/twang-in-flash/#comments</comments> <pubDate>Mon, 27 Sep 2010 22:02:32 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[iPhone]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[twang]]></category> <category><![CDATA[twang player]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=241</guid> <description><![CDATA[Yep, this is a "Twang Player" prototype, built in Flash. There's only one embedded song, a groggy rendition of the ditty from the first video: (click to launch) The next version of Twang will record &#38; save songs (this is done), and share them in some capacity (a bit more complicated). So that's where the [...]]]></description> <content:encoded><![CDATA[<p>Yep, this is a "Twang Player" prototype, built in Flash. There's only one embedded song, a groggy rendition of the ditty from the <a
href="http://www.youtube.com/watch?v=jnCMg6MAu8E">first video</a>:</p><p
style="text-align: center;"><a
href="http://zacharcher.com/lab/twang/flash/twang_player.swf"><img
class="aligncenter" title="Twang Player Screenshot" src="http://zacharcher.com/lab/twang/flash/twang_player_screenshot.jpg" alt="" width="460" height="300" /></a>(<a
href="http://zacharcher.com/lab/twang/flash/twang_player.swf">click to launch</a>)</p><p
style="text-align: left;">The next version of Twang will record &amp; save songs (this is done), and share them in some capacity (a bit more complicated). So that's where the Twang Player comes in. The Flash version looks like it wants to be touched &amp; strummed. I need to revisit the design and convey that Twang Player is just a music box, you can't compose anything in the browser! ...Yet.</p><p
style="text-align: left;">There are performance issues on some of my machines, too. This version uses Vector.&lt;Number&gt; objects to handle data, but it looks like <a
href="http://www.derschmale.com/2009/07/23/some-flash-pixel-bender-performance-tips-benchmarks/">ByteArray or even BitmapData structures are the way to go</a>.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2010/09/27/twang-in-flash/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2010/09/27/twang-in-flash/&amp;title=Twang&#8230; in Flash?!' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Twang&#8230; in Flash?!+http://blog.zacharcher.com/2010/09/27/twang-in-flash/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Twang&#8230; in Flash?!&amp;uri=http://blog.zacharcher.com/2010/09/27/twang-in-flash/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2010/09/27/twang-in-flash/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2010/09/27/twang-in-flash/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Aquatic Sound Generator in Flash</title><link>http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/</link> <comments>http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/#comments</comments> <pubDate>Wed, 16 Jun 2010 18:07:48 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Music]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[aquasound]]></category> <category><![CDATA[audio]]></category> <category><![CDATA[formant]]></category> <category><![CDATA[fs1r]]></category> <category><![CDATA[generative]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=219</guid> <description><![CDATA[Here's something from the vaults. Aquasound was built with these requirements in mind: Generate sounds that aquatic animals might make Sounds can be "combined" somehow Sounds can emote This was never used in production. I wonder if I could turn this into something? Like a paid iPhone app? ;) Double-click the envelopes to add/remove control [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://zacharcher.com/lab/aquasound/aquasound.swf"><img
class="aligncenter" title="Aquasound" src="http://zacharcher.com/lab/aquasound/aquasound_pic.png" alt="" width="432" height="405" /></a></p><p>Here's something from the vaults. Aquasound was built with these requirements in mind:</p><ul><li>Generate sounds that aquatic animals might make</li><li>Sounds can be "combined" somehow</li><li>Sounds can emote</li></ul><p>This was never used in production. I wonder if I could turn this into something? Like a paid iPhone app? ;)</p><p>Double-click the envelopes to add/remove control points. Drag lines up &amp; down to change their curviture. The best feature is the "Combine With" dropdown, which splices the current sound with your selection. Also the "Emote" menu will play sounds with different expression.</p><p>The audio algorithm is reverse-engineered from <a
href="http://blog.zacharcher.com/2009/01/05/synth-review-the-head-exploding-fs1r/">my beloved FS1R</a>. I generated formants in two ways (toggle the "Tonal" checkbox to hear both), the "atonal" version is closer to ring modulation than actual formants. It's more fun if you don't understand what the controls are doing, but if you insist: Pitch controls the overall pitch of the sound. Freq controls the center frequency of the formant (like a bandpass filter). LFOFreq and LFOWeight control a low-frequency sine wave, which can be applied to other controls via their "___LFOAmt" curves. Amp is amplitude, Width is formant width (think: width of the bandpass filter), Skirt adds distortion. Each voice has two formant generators, check "Formant Active" to enable them.</p><p>May all your bloops and crackles be happy ones!</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/&amp;title=Aquatic Sound Generator in Flash' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Aquatic Sound Generator in Flash+http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Aquatic Sound Generator in Flash&amp;uri=http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2010/06/16/aquatic-sound-generator/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Strange Attractors in Flash</title><link>http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/</link> <comments>http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/#comments</comments> <pubDate>Sun, 13 Dec 2009 00:10:16 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Graphics]]></category> <category><![CDATA[fractal]]></category> <category><![CDATA[strange attractor]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=184</guid> <description><![CDATA[Have you seen (or played) the demo for Polynomial, the space shooter? Quick! Watch the video: I spent a couple hours generating strange attractors in Flash, just a simple 2D version for now. Click to play: Click the black region to generate new polynomial coefficients and redraw. You will have to click many times to [...]]]></description> <content:encoded><![CDATA[<p>Have you seen (or played) the demo for <a
href="http://dmytry.pandromeda.com/games/index.html">Polynomial</a>, the space shooter? Quick! Watch the video:</p><p><object
width="560" height="340"><param
name="movie" value="http://www.youtube.com/v/2Q6RaOgmanc&#038;hl=en_US&#038;fs=1&#038;"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/2Q6RaOgmanc&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p><p>I spent a couple hours generating strange attractors in Flash, just a simple 2D version for now. Click to play:<br
/> <a
href="http://zacharcher.com/lab/20091212_strange_attractor/StrangeAttractor.html"><br
/> <img
src="http://zacharcher.com/lab/20091212_strange_attractor/attractor_image.png" alt="Here Be Strange Attractors" /></a></p><p>Click the black region to generate new polynomial coefficients and redraw. <strong>You will have to click many times to generate something interesting</strong>. That's the nature of fractals, I'm afraid. Some coefficients are automatically thrown out if the drawing exceeds a certain size. Unfortunately, the inverse is not true: the code isn't smart enough to trash any drawings that shrink to microscopic size.</p><p>I believe that you can stabilize any coefficients by scaling the values of each coefficient, gradually nudging them larger/smaller until the drawing is stable. I'll try this when I get more time. I've been gung-ho on my first proper iPhone app, trying to finish it before Christmas! Stay tuned...</p><p>Also, <a
href="http://zacharcher.com/lab/20091212_strange_attractor/strange_attractor.zip">here's the source code for the strange attractor harness</a>! Enjoy.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/&amp;title=Strange Attractors in Flash' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Strange Attractors in Flash+http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Strange Attractors in Flash&amp;uri=http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/12/12/strange-attractors-in-flash/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Flash 3D: A change of heart?</title><link>http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/</link> <comments>http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/#comments</comments> <pubDate>Fri, 04 Sep 2009 10:31:40 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Games]]></category> <category><![CDATA[3d]]></category> <category><![CDATA[away3d]]></category> <category><![CDATA[game]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=173</guid> <description><![CDATA[Yesterday, I posted a damning critique of Flash's native 3D. Today I noticed that if you right-click on yesterday's SWF and show the redraw regions, you can see that it's redrawing the contents of the entire stage, even though I put the scene in a scrollRect. Is it seriously rendering a scene that's thousands of [...]]]></description> <content:encoded><![CDATA[<p>Yesterday, I posted <a
href="http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/">a damning critique of Flash's native 3D</a>.</p><p>Today I noticed that if you right-click on <a
href="http://zacharcher.com/lab/20090831_3d/09b_touch_to_glow.swf">yesterday's SWF</a> and show the redraw regions, you can see that it's redrawing the contents of the entire stage, even though I put the scene in a scrollRect. Is it seriously rendering a scene that's thousands of pixels wide before displaying it ?!?!?!? Oh, no. No they DIDN'T.</p><p>Today I ported the scene to the <a
href="http://away3d.com/">Away3D</a> rendering engine. Here's the result:</p><p
style="text-align: center;"><a
href="http://zacharcher.com/lab/20090831_3d/10_away3d_follow.swf"><img
class="aligncenter" title="Away3D screenshot" src="http://zacharcher.com/lab/20090831_3d/p/10_screenshot.png" alt="" width="453" height="339" /></a></p><p>It's beautiful, and provides access to low-level drawing routines, light sources, normal maps, ... It was speedy at first, then slowed down considerably when I added the glowing floors. (Each glow is 16+ triangles right now, for various reasons including: I can't render objects in my own custom order.) This makes <a
href="http://zacharcher.com/lab/20090831_3d/09test.html">yesterday's version look performant</a>, I'm reluctant to admit.</p><p>Possible next steps:</p><ul><li>Reduce the native 3D rendering area, see if performance improves?</li><li>Grow beyond Flash, embrace the future and try <a
href="http://unity3d.com/">Unity 3D</a>?</li><li>Dump this project, finish that iPhone game I started, make a million dollars in 2 weeks?</li></ul><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/&amp;title=Flash 3D: A change of heart?' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Flash 3D: A change of heart?+http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Flash 3D: A change of heart?&amp;uri=http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/09/04/flash-3d-a-change-of-heart/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Flash 3D makes me sad</title><link>http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/</link> <comments>http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/#comments</comments> <pubDate>Thu, 03 Sep 2009 11:43:05 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Games]]></category> <category><![CDATA[3d]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=164</guid> <description><![CDATA[I've been dabbling with Flash 10's native 3D support. Try my engine: Click to set the focus. Use the arrow keys to move. Touch blocks to illuminate. I'm disappointed with two things: 1). How much time is required to create a 3D engine, even a grid-based one like mine. I've been wrestling this project for [...]]]></description> <content:encoded><![CDATA[<p>I've been dabbling with Flash 10's native 3D support. Try my engine:</p><p><a
href="http://zacharcher.com/lab/20090831_3d/09b_touch_to_glow.swf"><img
class="aligncenter" title="Blue LEDs" src="http://zacharcher.com/lab/20090831_3d/p/09_screenshot.png" alt="" width="428" height="324" /></a></p><p>Click to set the focus. Use the arrow keys to move. Touch blocks to illuminate.</p><p>I'm disappointed with two things:</p><p>1). How much time is required to create a 3D engine, even a grid-based one like mine. I've been wrestling this project for 4+ hours every day, for a week. I feel like I must be lagging behind, but there are ten thousand things that will go wrong when developing in 3D. The paradigm is uniquely punishing, there are always edge cases where some polygons aren't drawn correctly. This project hasn't been a joy.</p><p>Also:</p><p>2). <strong>Flash's native 3D is not suited for a high-performance application like this one.</strong> It would be fine if I was only spinning a few DisplayObjects in space. However, the scene above displays up to 125 Bitmaps simultaneously. (Light all 25 bulbs (3 Bitmaps each), stand in the corner facing them, and the 25-segment walls.) 125 Bitmaps would be child's play in OpenGL. But after you light a few blocks, Flash Player chokes pretty hard.</p><p><a
href="http://zacharcher.com/lab/20090831_3d/09c_glow_blendmode.swf">Here's another version that uses a BlendMode on the lightbulbs</a>. It looks great, but its performance is even less acceptable.</p><p><a
href="http://zacharcher.com/lab/20090831_3d/02.swf">Here's an early version that uses my own 3D computations, and the Graphics API</a>. Also it has a limited field of view, which I widened for the latest builds. The performance is surprisingly high. I abandoned my custom 3D <a
href="http://zacharcher.com/lab/20090831_3d/04.swf">when I reached this point</a>; drawing lines around each cube face was expensive, so I switched to Bitmaps, and the native 3D.</p><p>The cube faces are set to width &amp; height of 100. However, the bitmaps are higher resolution, a 200x200 region is shown. They're being downsampled at 100x100 before they're rendered, not by my choice.</p><p>At runtime, I get periodic warnings like these:</p><blockquote><p>Warning: 3D DisplayObject will not render.  Its dimensions (8238, 1628) are too large to be drawn.</p></blockquote><p>What?! How is this happening? I swear that any blocks behind the camera are being removed from the Stage. (Actually, this is difficult to verify. If I shrink the scene, Flash magically applies the 3D perspective with a weird projection, and distorts everything in Lovecraftian dimensions.) Please, Adobe, tell me that you're not rendering the scene at 8000 pixels wide, then scaling it down to my 700x400 window, frame after frame?</p><p>Also note that you, the developer, are responsible for drawing the DisplayObjects in the correct depth order (farthest to nearest), Flash doesn't handle it automatically. This is known as "<a
href="http://en.wikipedia.org/wiki/2.5D">2.5D</a>", and it's wildly inconvenient.</p><p>So, I'm pretty disappointed with Flash 10's native 3D. Even with my limited 3D experience, I dislike how it renders the scene (<a
href="http://summitprojectsflashblog.wordpress.com/2009/05/19/flash-10-cs4-native-3d-blurry/">I'm not alone in this</a>) and the performance is obviously sub-par. This technology will not bring 3D games to the web, it <em>cannot</em>.</p><p>I need to decide whether to endure its shortcomings for 4 more weeks, or if I should abandon this project altogether. There are moments when you realize you've outgrown something you used to love, and this may be one of mine.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/&amp;title=Flash 3D makes me sad' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Flash 3D makes me sad+http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Flash 3D makes me sad&amp;uri=http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/09/03/flash-3d-makes-me-sad/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Synthetic Speech in Flash</title><link>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/</link> <comments>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/#comments</comments> <pubDate>Thu, 27 Aug 2009 10:46:44 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Synth]]></category> <category><![CDATA[audio]]></category> <category><![CDATA[linear predictive coding]]></category> <category><![CDATA[lpc]]></category> <category><![CDATA[speech]]></category> <category><![CDATA[synthesis]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=161</guid> <description><![CDATA[Recently, I learned about Linear Predictive Coding ("LPC"). This technique is used in classic arcade games (such as Gauntlet) and the Speak &#38; Spell to synthesize speech. Here's my first attempt at LPC speech in Flash: (click &#38; explore) It's great, except for one tiny problem: It sounds horrific. Can you feel the cold, robotic [...]]]></description> <content:encoded><![CDATA[<p>Recently, I learned about <a
href="http://en.wikipedia.org/wiki/Linear_predictive_coding">Linear Predictive Coding ("LPC")</a>. This technique is used in classic arcade games (such as <em>Gauntlet</em>) and the <em>Speak &amp; Spell</em> to synthesize speech.</p><p>Here's my first attempt at LPC speech in Flash: (click &amp; explore)</p><p><a
href="http://zacharcher.com/lab/20090827_lpc_speech/LPCsynth.swf"><img
class="aligncenter" title="LPC harness" src="http://zacharcher.com/lab/20090827_lpc_speech/lpc_harness.png" alt="" width="236" height="254" /></a></p><p>It's great, except for one tiny problem: It sounds horrific. Can you feel the cold, robotic love? This voice will stalk your nightmares.</p><p>The phonemes were derived from an unrehearsed recording of my voice. I'm confident that it can be improved. Note that direct LPC encodings of my voice, <a
href="http://zacharcher.com/lab/20090827_lpc_speech/zach_voice_test.mp3">such as this one</a>, sound more acceptable.</p><p><em><strong>EDIT:</strong> I made an iPhone version, "Metal Mouth", with lots of features. Here it is on <a
href="http://www.youtube.com/watch?v=g2NwVMjrY2o">YouTube</a> and the <a
href="http://itunes.apple.com/us/app/metal-mouth/id348741365?mt=8">iTunes Store</a>!</em></p><p><em><strong>EDIT #2:</strong> <a
href="http://blog.zacharcher.com/2012/01/09/synthetic-speech-in-flash-the-source-code/">The source code is available here</a>.</em></p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;title=Synthetic Speech in Flash' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Synthetic Speech in Flash+http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Synthetic Speech in Flash&amp;uri=http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/08/27/synthetic-speech-in-flash/feed/</wfw:commentRss> <slash:comments>7</slash:comments> <enclosure
url="http://zacharcher.com/lab/20090827_lpc_speech/zach_voice_test.mp3" length="264600" type="audio/mpeg" /> </item> <item><title>Toaster Bro alpha: 10 days later</title><link>http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/</link> <comments>http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/#comments</comments> <pubDate>Fri, 20 Mar 2009 08:23:54 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Games]]></category> <category><![CDATA[gamedev]]></category> <category><![CDATA[nes]]></category> <category><![CDATA[process]]></category> <category><![CDATA[schedule]]></category> <category><![CDATA[toaster bro]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=148</guid> <description><![CDATA[Did I mention my new game, "Toaster Bro"? Play Toaster Bro alpha version 1! (You will need Flash Player 10.) Ten days have elapsed since I shared this version with friends (who are unwittingly being used as play testers). It's time for a "wrap-up" meeting, because I want to examine what went wrong/right, and instead [...]]]></description> <content:encoded><![CDATA[<p>Did I mention my new game, "Toaster Bro"? <a
href="http://zacharcher.com/lab/toaster_bro/20090309_alpha_1/ToasterBro_0.1alpha.swf">Play Toaster Bro alpha version 1!</a></p><p><a
href="http://zacharcher.com/lab/toaster_bro/20090309_alpha_1/ToasterBro_0.1alpha.swf"><img
src="http://zacharcher.com/lab/toaster_bro/20090309_alpha_1/p/instructions.png" alt="" /></a></p><p>(You will need Flash Player 10.)</p><p>Ten days have elapsed since I shared this version with friends (who are unwittingly being used as play testers). It's time for a "wrap-up" meeting, because I want to examine what went wrong/right, and instead of a meeting it's a blog post:</p><p><span
id="more-148"></span>The <a
href="http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/">tile engine has existed for half a year</a>. Toaster Bro began its life as "Roomhack", one of the pet projects <a
href="http://blog.sixsided.org/">Miles</a> and I dreamed up -- could we create a game that was <a
href="http://en.wikipedia.org/wiki/Turing_complete">Turing complete</a>? In the tradition of <a
href="http://en.wikipedia.org/wiki/Robot_Odyssey">Robot Odyssey</a>, we wanted to create an experience that was both programmable and entertaining.</p><p>During the development of <a
href="http://jayisgames.com/archives/2008/01/space_kitteh.php">Space Kitty</a>, we used its script engine to change the rules of the game at runtime. Once, we configured a cat to act as an "attack cat", which chased (and kicked) the player. We discovered new modes of gameplay -- how long can you say aloft? Can you slingshot yourself around a dense star? (Ultimately, we ran out of time before we could make the Kitty-verse bigger. We're currently discussing a Space Kitty sequel.)</p><p>The script engine whet our appetite -- what if the player could modify the rules of <em>the game itself</em>? What happens to the gameplay? Can it remain challenging and fun? We talked about this for days, weeks... Hashing out ideas for an "ultimate" hacker game. I think we're still talking about it.</p><p>I imagined such a game would resemble a dark, apocalyptic 3/4 view basement crawl, reminiscent of:</p><p><img
src="http://i232.photobucket.com/albums/ee231/PapillonReel/Link%20to%20the%20Past%20Part%207/LegendofZelda-ALinktothePast149.png" alt="" /></p><p>So I built the tile engine. The plot &amp; aesthetic of the game were still unknown. Tavvv challenged me to invent a "missing" console from the NES-SNES era, devise hardware specs for it, and develop the game in accordance to the hardware specs. Constraints fuel creativity, right? I settled on SNES-era hardware, with a custom color engine, and improved sound. Television artifacts &amp; blur could be exaggerated to make the game creepier; bosses would have extra blur and distortions, so you couldn't get a clear image of them. <em>The lurking horror.</em> This concept was eventually dropped, once I realized that I'm not ready to develop a Turing-complete game... <em>yet</em>. I'll come back to this project in the future, I'm sure.</p><p>"The tile game" evolved into a shooter, much like Smash TV but with a heavy-handed political bent. That still didn't feel right, even with "a spider-tank with Richard Nixon's head" in tow. In the middle of this confusion, we realized that putting hackable terminals in a tile-based game detracted from the appeal of both. Is there a way to allow hacking, within the context of a tile engine? From this fray emerged the Toaster Bro mechanic. I rolled a quick proof-of-concept. It seemed like we were on to something.</p><p>Then the game sat in stasis for a few months, while I worked and tended to life. I wanted to finish one solid level, and I imagined a 4-week timeline:</p><ul><li><strong>Week 1: Engine Malarky.</strong> Moving between rooms, easier wire drawing, electricity &amp; fire shouldn't hurt you, remove crufty code.</li><li><strong>Week 2: Levels &amp; Art.</strong>. Finalize the plot &amp; characters, somewhat. Replace stand-in art with "real" art. On-screen text. Create a bunch of rooms.</li><li><strong>Week 3: Audio, splash screen, boss fight, begin testing.</strong></li><li><strong>Week 4: Music, ???</strong></li></ul><p>This seemed like a good plan. Work began, but here's how things really went down:</p><p><strong>Week 1:</strong> Plugged lots of holes in the engine, but a single week wasn't enough to tackle everything. There are major structural implications when you modify your game's core. Still no way to change blocks at runtime, yet. I need a scripting engine, but I want one with <a
href="http://en.wikipedia.org/wiki/Infix_notation">infix notation</a> (Space Kitty used various <a
href="http://en.wikipedia.org/wiki/Reverse_Polish_notation">postfix notation</a> languages, before Miles settled on an implementation of the <a
href="http://en.wikipedia.org/wiki/PostScript">PostScript language</a> I think? It made my brain bleed.) I didn't allot time for creating a scripting engine, but clearly there was a need for it.</p><p><strong>Week 2:</strong> I'm not sure how the 8-bit NES aesthetic won out, but I liked it because it entailed <em>fewer artistic decisions</em>. The aesthetic had an entire era of gaming backing it. This seemed like a wise choice, because I'm not an accomplished artist, nor designer. I'm partially colorblind, in fact. Could I still cobble together pixel art?</p><p>I bought a Wacom tablet and books on animation, hoping to produce an acceptable look &amp; feel. By the way, nearly every graphic in the game has been redrawn at least once. You should have seen the original sideways animation for Toaster Bro, it took a few tries to make him look non-crippled.</p><p>So I had a decent lead on the art, but bugs kept popping up. Fundamental pieces of the puzzle were still missing (no scripting engine, no on-screen text, player can't die).</p><p><strong>Week 3:</strong> I caught a bad cold, so I spent most of this week supine on the couch. I forced the "game" on a few people, and collected their feedback. All the responses were valuable, and people raised issues that I hadn't considered. One tester said he couldn't view the entire window, he was on a MacBook with its standard (small) screen. Oops! Sorry about that... I reduced the console's "pixel" size.</p><p>The upshot of being sick was having lots of quiet time, during which I (slowly, groggily) puzzled out the scripting engine. Here's what the scripting language looks like now, this is extracted from the first room on the Dark Chocolate level:</p><pre><code>function clubDoor_electricity {
	i.isDoorOpen = true;
	call o.setBlock '__' 7 4; // empty space
	call o.setBlock '__' 7 5;
	call o.playSound 'doorOpen';
	call o.emotePlayer 'happy' 75;
}
function clubDoor_stop {
	if(i.isDoorOpen == true) {
		i.isDoorOpen = false;
		call o.setBlock '$L' 7 4; // lock
		call o.setBlock '$L' 7 5;
		call o.playSound 'doorClose';
		call o.emotePlayer 'sad' 75;
	}
}</code></pre><p>The interpreter supports a large syntax, including: loops, switch/case statements, tons of operators, enterFrame yields, userInput yields, recursion ... You get the idea. Variables are always referenced through a few specific objects, right now these are: <strong>t</strong>hread, <strong>i</strong>nterpreter, <strong>o</strong>wner (this is the Room that created the Interpreter instance), <strong>l</strong>evel, and <strong>g</strong>lobal (or <strong>g</strong>ame). (These are all dynamic objects except for <strong>o</strong>wner.) The script engine is decoupled from the code, I wrote a harness for it.</p><p>Also the <a
href="http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/">8-bit NTSC artifacts</a> happened during week 3, somehow.</p><p>At this point, the game had a mere 3 rooms, all unsightly geometric slogs used for testing. Uh oh.</p><p><strong>Week 4:</strong> Still a bit sick, and my real-world work schedule poked its head in, and needed some attention. The list of bugs &amp; issues was huge; 30 items, including toughies like art and program flow.</p><p>I forced myself to draw the dreaded sprite animations. Infrequently, this was relaxing and zen-like. But in the wrong state of mind, it was taxing and disheartening. I'm using the <a
href="http://blog.zacharcher.com/2007/10/13/understanding-colormatrixfilter/">palette swap trick</a> from Space Kitty, so I stared at grotesque red, green and blue images all day, and felt sorry for myself. Definitely out of my league.</p><p>Also I hacked together a level editor using Flex components, accessible through a magic keystroke. It's buggy and non-intuitive, but it's better than editing the room layouts as raw ascii! Here's how the final room in Mom's Kitchen is stored:</p><pre><code>[P,d [P,d [P,d [P,d [P,d [f,d ..,d ..,d ..,d ..,d [d,d [P,d [P,d [P,d [P,d [P,d
[P,d [P,d [P,d [P,d [P,d [f,d ..,d ..,a ..,a ..,d [d,d [P,d [P,d [P,d [P,d [P,d
[j,d [P,d [P,d [P,d [P,d [F,d ..,d ..,a ..,a ..,d [D,d [P,d [P,d [P,d [P,d [k,d
[J,d [h,d [h,d [h,d [h,d [i,d ..,d ..,d ..,d ..,d [g,d [h,d [h,d [h,d [h,d [K,d
[f,d ..;n ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;p [d,d
[f,d ..;q ..,d ..,d ..,d ..,d ..,d ..,d ..,d ..,d ..,d ..,d ..,d ..,d ..;q [d,d
[f,d ..;q ..,d ..,a ..,a ..,a #a,a #a,a #a,a #a,a ..,a ..,a ..,a ..,d ..;q [d,d
[f,d ..;q ..,d ..,a ..,a ..,a #a,a #a,a #t,a #a,a ..,a ..,a ..,a ..,d ..;q [d,d
[f,d ..;q ..,d ..,a ..,a ..,a __,a ..,a ..,a ..,a ..,a ..,a ..,a ..,d ..;q [d,d
[F,d ..;q __,d __,d __,d __,d ..,d ..,d ..,d ..,d ..,d ..,d ..,d __,d ..;q [D,d
[i,d ..;r ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;o ..;s [g,d</code></pre><p>I resolved to ride my bike every day, to avoid getting sick again. So far so good, but now I ride to coffee shops and spend a metric crapload of money dining out of the house. The hidden price of wellness...</p><p><strong>Week 5:</strong> The list grew even longer. Lots of bugs, lots of missing features that I didn't consider -- the heart containers, the health bar. Dark Chocolate's level was half done. The entity behaviors were unstable; the damage system was finicky, every Entity required too much configuration to properly interact with others. This needed an overhaul. I'd started thinking about unit testing, which I'd never tried before.</p><p>I drew Dark Chocolate, but with no behavioral code, he didn't move. Fun fact: I saw his animation in a dream.</p><p><strong>Week 6:</strong> Dark Chocolate's level was finished, mostly. The boss fight took a day and a half to get right. You still couldn't "win" a level. I always joked that the goal was to plug in a toaster. Hmmmmm...</p><p><strong>Weeks 7-9:</strong> Sound design, on-screen text, Mom's kitchen (the training level), giant toasters. Redrawing sprites. Bigger croissants (the laser-guards). Spotlights. Refactoring lots of code. The scripting engine is versatile, but not easy to use. In week 7, it was much clunkier than the syntax listed above. There were no <code>switch</code> statements, you had to write a list of consecutive <code>if</code> statements instead.</p><p>Days passed. The spit 'n polish phase took <em>forever</em>. I sympathize with whoever said, "your code is always 85% done". It sure felt that way.</p><p>Also I finally implemented unit testing. I tried <a
href="http://www.asunit.org/">ASUnit</a> first, but it's not very Flash-like; I believe it's a direct port of JUnit (as evidenced by the Java code in its comments). If I'd realized <a
href="http://opensource.adobe.com/wiki/display/flexunit/FlexUnit">FlexUnit</a> was still in development, then I would have jumped on it, but... Long story short: I wanted to display failed tests on the stage, and ASUnit made that difficult. So I threw out the ASUnit code, kept my custom TestCase subclasses, and wrote my own Flash-centric versions of a TestRunner and TestCase (they both extend Sprite).</p><p>I can compile Toaster Bro in two ways: I have a Main.as class which will compile in the Flash IDE. But there's also a Roomhack.mxml wrapper which creates a "developer" build, integrating the testing framework and level editor. When the developer build is launched, it runs every TestCase. If a TestCase fails, and if it has added children, then it's displayed on the stage, with diagnostic messages &amp; an execution trace. Failed TestCases can be dismissed with a click. I'm not "in love" with unit testing yet, perhaps because writing the tests <em>after</em> the code was tedious. I'm sure it will save my butt in the future, tho.</p><p><strong>Week 10:</strong> Toaster Bro alpha is unleashed on the world!</p><p>Overall, feedback has been positive. Like Space Kitty, most people want the game to be longer. The negative feedback has been very helpful, pointing out specific problems which aren't obvious to me, since I view the application as a whole now.</p><p>So, after writing this gigantic treatise, I figured I'd have some insights on how to improve the process. And you know what? <em>I don't</em>.</p><p>Gamasutra had <a
href="http://www.gamasutra.com/features/20051026/gabler_pfv.htm">an excellent article on rapid prototyping</a>, and their process echoes what we experienced on Toaster Bro and Space Kitty: Creativity can't be scheduled, and you'll spend a huge chunk of time germinating the idea in your head. We had 2 months to develop Space Kitty; we spent almost exactly 1 month dreaming up the idea. After that, the initial prototype took a day or two, and we were rolling.</p><p>With Toaster Bro, nearly half of the "serious" development time went towards polishing the game and making it presentable. This was a surprise, even though most of my interactive work has followed this pattern, too. The functional code is fairly easy to develop, but then you must meet the clients' standards, and hammer the UI to find the rough spots.</p><p>Sound effects gave Toaster Bro an air of legitimacy. The difference was like night and day. Without sound effects, it was a shaky graphics demo; with sound effects, it felt <em>alive</em>. Hard to explain unless you've witnessed it.</p><p>Testers will comment on all the broken windows they find. I still hear about the missing sound effects in Toaster Bro (and yes, there are plenty!) But that's okay, their feedback is always valuable. Occasionally they'll have solid ideas on how best to <em>fix</em> a broken window, too.</p><p>What happens now? I have to produce more levels, art, and script. I'd like to believe that my productivity will ramp up, with so much of the infrastructure and assets completed. Sadly, I don't think it works that way. I have big ideas for the remaining Toaster Bro levels, and these involve intense scripting. The second room of Mom's Kitchen (where Toaster Bro learns how to use a wire, via 4 simple dialogs) is 131 lines of script, and it's still not done -- Mom should rush in and cheer after you activate the toaster, right? I can only imagine the length of the equivalent code in AS3. I want big effects &amp; easter eggs. It will be difficult to develop and test these.</p><p>Whatever skills you have, I recommend bringing these into your projects, and emphasizing them, even leaning on them. I produce groovy electronic music, so <a
href="http://zacharcher.com/lab/toaster_bro/chiptunes_test/">I made a bunch of chiptunes</a> early on, to help center my thinking. Some aren't useable for Toaster Bro, they're too active -- they have the pace of Mega Man, rather than Zelda. It was good to realize that, it helped shape my thinking.</p><p>More to come?...</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/&amp;title=Toaster Bro alpha: 10 days later' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Toaster Bro alpha: 10 days later+http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Toaster Bro alpha: 10 days later&amp;uri=http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/03/20/toaster-bro-alpha-10-days-later/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>8-bit NTSC artifacts using Pixel Bender</title><link>http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/</link> <comments>http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/#comments</comments> <pubDate>Mon, 16 Mar 2009 03:27:05 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Games]]></category> <category><![CDATA[Graphics]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=139</guid> <description><![CDATA[By request, here's a quick 'n dirty test harness, and sample code, for NTSC artifacts in the style of the 8-bit Nintendo Entertainment System (NES): Click the animation to change scale &#38; scroll speed. Source code &#38; .fla: nes_ntsc.zip The .pbk code is not optimized yet. The code is fairly explicit, I tried to explain [...]]]></description> <content:encoded><![CDATA[<p>By request, here's a quick 'n dirty test harness, and sample code, for NTSC artifacts in the style of the 8-bit Nintendo Entertainment System (NES):</p><p><a
href="http://zacharcher.com/lab/20090315_nes_ntsc/nes_ntsc_harness.swf"><img
class="alignnone" title="NES NTSC screencap" src="http://zacharcher.com/lab/20090315_nes_ntsc/nes_ntsc_screencap.png" alt="" width="301" height="249" /></a></p><p>Click the animation to change scale &amp; scroll speed.</p><p>Source code &amp; .fla: <a
href="http://zacharcher.com/lab/20090315_nes_ntsc/20090315_nes_ntsc.zip">nes_ntsc.zip</a></p><p>The .pbk code is not optimized yet. The code is fairly explicit, I tried to explain how it works in the comments. <a
href="http://slack.net/~ant/libs/ntsc.html">Blargg's pages</a> have better explanations tho.</p><p>The test harness lets you select two flavors of the effect. The numbers 8 and 12 denote the width of the lowpass window used for applying crosstalk. 12 is more processor-intensive, but will look "smoother", which may not be what you want. The mathematics can be reduced to a few (long) lines, which should reduce processor overhead; I want to do this in the future. <a
href="http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/#comments">unic0rn left some nice comments</a> suggesting more routes to optimization.</p><p>The filter still needs some tuning. Areas of solid (non-black) color have diagonal stripes in them. I believe that normalizing the strengths of the filters will fix this.</p><p>To be continued...</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/&amp;title=8-bit NTSC artifacts using Pixel Bender' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=8-bit NTSC artifacts using Pixel Bender+http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=8-bit NTSC artifacts using Pixel Bender&amp;uri=http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/03/15/8-bit-ntsc-artifacts-using-pixel-bender/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Tweetcoding: Round 1 Winners</title><link>http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/</link> <comments>http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/#comments</comments> <pubDate>Sat, 14 Mar 2009 00:43:21 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[obfuscation]]></category> <category><![CDATA[tweetcoding]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=135</guid> <description><![CDATA[Hooray, I'm a runner-up in the first Tweetcoding contest. My entry "Ghost Marquee" placed in the top 4. The code extracts certain bits from a string of jibberish, 6 bits at a time; when arranged on a grid, the bits form a message. Also I had 2 notable mentions with Sea Sphere and 3D Sketch. [...]]]></description> <content:encoded><![CDATA[<p>Hooray, <a
href="http://www.gskinner.com/playpen/tweetcoding_0/">I'm a runner-up in the first Tweetcoding contest</a>. My entry "<a
href="http://www.gskinner.com/playpen/tweetcoding_0/tc_1263383494.swf">Ghost Marquee</a>" placed in the top 4. The code extracts certain bits from a string of jibberish, 6 bits at a time; when arranged on a grid, the bits form a message.</p><p>Also I had 2 notable mentions with <a
href="http://www.gskinner.com/playpen/tweetcoding_0/tc_1264481820.swf">Sea Sphere</a> and <a
href="http://www.gskinner.com/playpen/tweetcoding_0/tc_1257410301.swf">3D Sketch</a>. I figured my entry <a
href="http://tweetcoding.machine501.com/tc_1260723981.swf">The w00t Quilt</a> would have placed, but perhaps I'm just easily hypnotized...</p><p>I think the strongest entry was <a
href="http://www.gskinner.com/playpen/tweetcoding_0/tc_1267109791.swf">Diagonal Snake</a> by <a
href="http://twitter.com/tomee6">@tomee6</a>, which is (not coincidentally) also one of the winners. Move the mouse to attract the snake; you lose when the snake crosses itself or touches you. There's even a death animation. Amazing.</p><p>Here's looking forward to round 2...</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/&amp;title=Tweetcoding: Round 1 Winners' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Tweetcoding: Round 1 Winners+http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Tweetcoding: Round 1 Winners&amp;uri=http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/03/13/tweetcoding-round-1-winners/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Tweetcoding!</title><link>http://blog.zacharcher.com/2009/03/02/tweetcoding/</link> <comments>http://blog.zacharcher.com/2009/03/02/tweetcoding/#comments</comments> <pubDate>Tue, 03 Mar 2009 05:46:55 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[optimization]]></category> <category><![CDATA[tweetcoding]]></category> <category><![CDATA[twitter]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=111</guid> <description><![CDATA[The challenge was steep: Build something interesting in Flash, using 140 characters or less. Check out the rules, and the results. Oh man, I was hooked. I admit, I'm suspicious of Twitter's usefulness in the grand scheme of things. You're allowed 140 characters, eh? You can only communicate the big picture; blipverts. Twitter is addictive [...]]]></description> <content:encoded><![CDATA[<p>The challenge was steep: Build something interesting in Flash, using 140 characters or less.</p><p>Check out <a
href="http://gskinner.com/playpen/tweetcoding.html">the rules</a>, and <a
href="http://tweetcoding.machine501.com/">the results</a>. Oh man, I was hooked.<br
/> <span
id="more-111"></span><br
/> I admit, I'm suspicious of Twitter's usefulness in the grand scheme of things. You're allowed 140 characters, eh? You can only communicate the big picture; <a
href="http://en.wikipedia.org/wiki/Blipvert">blipverts</a>. Twitter is addictive because it doesn't require any commitment -- it takes 10 seconds to "tweet". You can tweet like mad. You can tweet at any moment of the day, even from your phone. You can abuse the Twitter API, and post non-human-readable text (such as tweetcode), which will drive your friends crazy.</p><p>Having said that... It was stunning to watch everyone create beauty in the face of the 140-character limit. Constraints fuel creativity. Here's what I came up with:</p><ul><li><a
href="http://tweetcoding.machine501.com/tc_1260723981.swf">The w00t Quilt</a></li><li><a
href="http://tweetcoding.machine501.com/tc_1257410301.swf">3D Sketch</a></li><li><a
href="http://tweetcoding.machine501.com/tc_1263383494.swf">Ghost Marquee</a></li><li><a
href="http://tweetcoding.machine501.com/tc_1264481820.swf">Sea Sphere</a></li><li><a
href="http://tweetcoding.machine501.com/tc_1268469008.swf">Sound Effects</a>. Move the mouse for FM synthesis. (Caution: kinda loud.)</li></ul><p>Many people posted entries that blew my mind. Some favorites:</p><ul><li><a
href="http://twitter.com/oskitar">@oskitar</a>: <a
href="http://tweetcoding.machine501.com/tc_1250258414.swf">The Day The Earth Stood Still</a></li><li><a
href="http://twitter.com/og2t">@og2t</a>:<a
href="http://tweetcoding.machine501.com/tc_1258007768.swf">My 1st Tweetcode</a></li><li><a
href="http://twitter.com/flashpadawan">@flashpadawan</a>: <a
href="http://tweetcoding.machine501.com/tc_1263655966.swf">3D Particle Emitter</a>. Custom 3D rendering!</li><li><a
href="http://twitter.com/kalisnik">@kalisnik</a>: <a
href="http://tweetcoding.machine501.com/tc_1262904228.swf">Grass in the Wind</a></li><li><a
href="http://twitter.com/piXelero">@piXelero</a>: <a
href="http://tweetcoding.machine501.com/tc_1238049748.swf">Inversemapping</a>, and <a
href="http://tweetcoding.machine501.com/tc_1250044251.swf">Tweetcoding With Recursion</a> (probably my favorite examples of beautiful recursion)</li><li><a
href="http://twitter.com/pantaa">@pantaa</a>: <a
href="http://tweetcoding.machine501.com/tc_1236586119.swf">Alien Lifeform</a></li><li><a
href="http://twitter.com/rmdesign">@rmdesign</a>: <a
href="http://tweetcoding.machine501.com/tc_1239657440.swf">Jellycube</a></li><li><a
href="http://twitter.com/Quasimondo">@Quasimondo</a>: <a
href="http://tweetcoding.machine501.com/tc_1227966320.swf">Hyperdrive</a></li></ul><p>Who am I kidding, I have too many favorites to list. The most interesting aspect was watching  personalities emerge, as people submitted multiple entries.</p><p>I'm sure I could have crammed more features in my code; I remembered the comma operator late in the game, which lets you shorten</p><pre><code>if(condition){doThis;doThat}</code></pre><p>into</p><pre><code>if(condition)doThis,doThat</code></pre><p>You just saved two whole characters!! Epic savings, there. Now I find myself tightening up my "real" code: using multiple assignment, and increment/decrement operators within expressions. Back when I studied Perl, I feared this: You can cram an entire script onto one line, how clever!.. "Clever" code doesn't seem smart later, when you have to maintain it.</p><p>Cheers to <a
href="http://www.gskinner.com/blog/">Grant Skinner</a> for developing the contest, and to all the judges who are about to wade through hundreds of entries -- we salute you. Here's looking forward to Tweetcoding: The Sequel!</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2009/03/02/tweetcoding/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2009/03/02/tweetcoding/&amp;title=Tweetcoding!' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Tweetcoding!+http://blog.zacharcher.com/2009/03/02/tweetcoding/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Tweetcoding!&amp;uri=http://blog.zacharcher.com/2009/03/02/tweetcoding/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2009/03/02/tweetcoding/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2009/03/02/tweetcoding/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Fractal Transform, made with Pixel Bender</title><link>http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/</link> <comments>http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/#comments</comments> <pubDate>Mon, 29 Dec 2008 09:06:11 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Graphics]]></category> <category><![CDATA[fractal]]></category> <category><![CDATA[julia]]></category> <category><![CDATA[pixel bender]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=79</guid> <description><![CDATA[I made a Pixel Bender filter that performs Julia Set transformations on images. It looks great when it animates, the colors morph and twist like mathematical slime. Try it (Flash Player 10 required): JuliaTile.swf Source code: julia_tile_src.zip. Pixel Bender code is in src/shader/. The default image is Seattle's Space Needle. You can upload custom images. [...]]]></description> <content:encoded><![CDATA[<p>I made a Pixel Bender filter that performs Julia Set transformations on images. It looks great when it animates, the colors morph and twist like mathematical slime. Try it (Flash Player 10 required): <a
href="http://zacharcher.com/lab/20081229_julia_filter/JuliaTile.swf">JuliaTile.swf<br
/> </a></p><p><a
href="http://zacharcher.com/lab/20081229_julia_filter/JuliaTile.swf"><img
class="alignnone" title="Julia Set sample" src="http://zacharcher.com/lab/20081229_julia_filter/julia_sample.png" alt="" width="357" height="393" /></a></p><p>Source code: <a
href="http://zacharcher.com/lab/20081229_julia_filter/julia_tile_src.zip">julia_tile_src.zip</a>. Pixel Bender code is in <code>src/shader/</code>.<a
href="http://zacharcher.com/lab/20081229_julia_filter/julia_tile_src.zip"><br
/> </a></p><p>The default image is Seattle's Space Needle. You can upload custom images. Very large images may set your processor on fire.</p><p><span
id="more-79"></span>Parameters: <strong>Iterations</strong> sets how many times the Julia formula is applied per pixel. The iteration increments appear smooth, not stepped, because the code tweens across the destination coordinates of the two nearest iterations. <strong>Complex X&amp;Y</strong> are the real &amp; imaginary values of the transform constant. <strong>Bias X&amp;Y</strong> is something I hacked in, it skews the coordinates in a linear way, becoming more intense with each iteration.</p><p>The <strong>Fill Types</strong> are as follows:</p><ul><li>0: Pixels out of range are transparent; no fill.</li><li>1: Repeats the nearest edge pixel.</li><li>2: Repeats the source image, mirroring every other copy to create a smooth transition.</li><li>3: Repeats the source image without mirroring.</li></ul><p>The filter needs more features before it's "done", hopefully it's still enjoyable. The Pixel Bender code took about 30 minutes to write; the Flex wrapper took much longer.</p><p>Despite its limited feature set, Pixel Bender is pretty cool. My only misgiving is that Pixel Bender's runtime performance is never as good as I hope. I have another filter in the works that mimics NTSC television artifacts, but the performance is abysmal. The code can still be optimized; stay tuned.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/&amp;title=Fractal Transform, made with Pixel Bender' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Fractal Transform, made with Pixel Bender+http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Fractal Transform, made with Pixel Bender&amp;uri=http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2008/12/29/fractal-transform-in-pixel-bender/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Tile engine is go!</title><link>http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/</link> <comments>http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/#comments</comments> <pubDate>Sat, 12 Jul 2008 10:11:10 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[Games]]></category> <category><![CDATA[roomhack]]></category> <category><![CDATA[tile]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=21</guid> <description><![CDATA[Homemade tile engine! Click to play. Move: Arrow keys, or WASD Shoot: Mouse button, or IJKL Make sure you grab a weapon in room #2, so you can shoot the orcs. Currently, there are 9 rooms for romping. Not one pixel of the art should be considered "final". Most sprites &#38; tiles have a ColorMatrixFilter [...]]]></description> <content:encoded><![CDATA[<p>Homemade tile engine!<a
href="http://zacharcher.com/lab/20080711_roomhack/RoomHack.swf"><br
/> </a></p><p><a
href="http://zacharcher.com/lab/20080711_roomhack/RoomHack.swf"><img
src="http://zacharcher.com/lab/20080711_roomhack/roomhack_screenshot.png" alt="screenshot" width="324" height="324" /></a></p><p><a
href="http://zacharcher.com/lab/20080711_roomhack/RoomHack.swf">Click to play</a>.</p><ul><li>Move: Arrow keys, or WASD</li><li>Shoot: Mouse button, or IJKL</li></ul><p>Make sure you grab a weapon in room #2, so you can shoot the orcs. Currently, there are 9 rooms for romping.</p><p>Not one pixel of the art should be considered "final". Most sprites &amp; tiles have a ColorMatrixFilter that "skins" them with four particular colors (see <a
href="http://blog.zacharcher.com/2007/10/13/understanding-colormatrixfilter/">my post detailing this technique</a>). In some respects, this is wonderful, as the colors can be randomized, and it's easy to change the palette of an entire room. Unfortunately, to maintain retro look &amp; feel, I chose the <a
href="http://en.wikipedia.org/wiki/List_of_videogame_consoles_palettes#Atari_2600">Atari 2600 palette</a>. The dark colors are over-saturated, the pastels are unexciting, and the hue distribution is completely wrong (nearly half the colors could be considered "green"). This will be dealt with.</p><p>An <a
href="http://blog.zacharcher.com/2008/05/24/flash-10-is-go/">earlier screenshot</a> shows some vector art. Unfortunately, the vectors currently require Flash 10. I've disabled this feature... <em>for now</em>.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/&amp;title=Tile engine is go!' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Tile engine is go!+http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Tile engine is go!&amp;uri=http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2008/07/12/tile-engine-is-go/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Horacio without glitch effects</title><link>http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/</link> <comments>http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/#comments</comments> <pubDate>Mon, 16 Jun 2008 00:40:13 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[glitch]]></category> <category><![CDATA[Horacio Salinas]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/?p=19</guid> <description><![CDATA[Due to factors beyond our control, FashionBuddha and myself have removed the "glitch" effects from horaciosalinas.net. It's sad, but these things do happen. It's still a great site. You can see the glitch-enabled version here: http://www.fashionbuddha.com/horaciosalinas/ More&#160;&#187;]]></description> <content:encoded><![CDATA[<p>Due to factors beyond our control, <a
href="http://www.fashionbuddha.com/">FashionBuddha</a> and myself have removed the "glitch" effects from <a
href="http://horaciosalinas.net/">horaciosalinas.net</a>. It's sad, but these things do happen. It's still a great site.</p><p>You can see the glitch-enabled version here: <a
href="http://www.fashionbuddha.com/horaciosalinas/">http://www.fashionbuddha.com/horaciosalinas/</a></p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/&amp;title=Horacio without glitch effects' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Horacio without glitch effects+http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Horacio without glitch effects&amp;uri=http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Reactions to Horacio Salinas</title><link>http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/</link> <comments>http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/#comments</comments> <pubDate>Fri, 23 May 2008 10:49:25 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/</guid> <description><![CDATA[I'm talking about http://www.fashionbuddha.com/horaciosalinas/: "The electrical static was very disturbing. I don't think it adds to the photography, but it did add to my anxiety about my own computer enough that I bailed even though I knew it was something on the site. HTH" -- Zani (There is a glitchless version of the site at [...]]]></description> <content:encoded><![CDATA[<p>I'm talking about <a
href="http://www.fashionbuddha.com/horaciosalinas/">http://www.fashionbuddha.com/horaciosalinas/</a>:</p><blockquote><p>"<span
class="postbody">The electrical static was very disturbing. I don't think it adds to   the photography, but it did add to my anxiety about my own computer   enough that I bailed even though I knew it was something on the site.   HTH" -- <a
href="http://www.gotoandplay.net/forum/viewtopic.php?t=11015">Zani</a></span></p></blockquote><p>(There is a glitchless version of the site at <a
href="http://horaciosalinas.com">horaciosalinas.com</a>.)</p><p>Also... They say imitation is the sincerest form of flattery, so I'm amused that <a
href="http://yenisanat.net/horaciosalinas/">yenisanat.net copied the site in its entirety</a> (even the images!) but changed the copyright. I'm glad you appreciate our hard work, Yeni. I feel like I've finally <em>arrived</em>, ya know?</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/&amp;title=Reactions to Horacio Salinas' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Reactions to Horacio Salinas+http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Reactions to Horacio Salinas&amp;uri=http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2008/05/23/reactions-to-the-horacio-salinas-site/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Real Time JPEG Corruption</title><link>http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/</link> <comments>http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/#comments</comments> <pubDate>Fri, 23 May 2008 09:37:54 +0000</pubDate> <dc:creator>Zach</dc:creator> <category><![CDATA[Flash]]></category> <guid
isPermaLink="false">http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/</guid> <description><![CDATA[Here's a new site that I worked on: http://www.fashionbuddha.com/horaciosalinas/ The site seems typical at a first glance, until the glitches kick in... Then you're in for a treat. (You can adjust the glitch rate in the menu.) Here's how the effect works: The concept + design were crafted by Fashionbuddha Studio. They handed me proof-of-concept [...]]]></description> <content:encoded><![CDATA[<p>Here's a new site that I worked on:</p><p><a
title="http://www.fashionbuddha.com/horaciosalinas/" href="http://www.fashionbuddha.com/horaciosalinas/">http://www.fashionbuddha.com/horaciosalinas/</a></p><p><a
href="http://www.horaciosalinas.net/"><img
title="Reserved &amp; Corrupted" src="http://zacharcher.com/lab/20080523_jpeg_corruption/reserved_demo_frame.jpg" alt="Reserved &amp; Corrupted" width="417" height="566" align="absmiddle" /></a></p><p>The site seems typical at a first glance, until the glitches kick in... Then you're in for a treat. (You can adjust the glitch rate in the menu.) Here's how the effect works:</p><p><span
id="more-15"></span>The concept + design were crafted by <a
href="http://www.fashionbuddha.com/">Fashionbuddha Studio</a>. They handed me proof-of-concept code that loaded a JPEG, scrambled its bytes, and rendered it to the screen. Corrupted JPEGs look like you'd expect; some are beautiful, with distortions in their colors and textures; some were nasty or unrecognizable. A few wouldn't display at all, but more on that in a minute...</p><p>The site uses JPEG corruption as a method of animation. When the site is idle, a photograph will sometimes crackle to life and progressively corrupt itself for several frames. When you click a menu link, you see a similar effect, but it's reversed: the corrupted frames are quickly pre-rendered in memory, and then displayed in reverse order, materializing from the most corrupted frame to the least.</p><p>All the corruption effects are performed inside Flash. Use a URLLoader to load an image, then on Event.COMPLETE, you can access the raw JPEG data as a ByteArray:</p><p><code>var bytes:ByteArray = e.target.data;</code></p><p>You can traverse the ByteArray and change selective bytes, just like editing an Array. (Some people would call this <a
href="http://www.getlofi.com/?cat=13">"data bending"</a>.) Then you can display the corrupted image by using the Loader.loadBytes method:</p><p><code>_loader.loadBytes( bytes );</code></p><p>Matt Rooney of <a
href="http://impactresist.net/">Impact Resist</a> helped me with the next phase: sometimes, our corrupted ByteArrays weren't recognized as valid JPEGs, and Flash wouldn't display them. Matt dug into the <a
href="http://en.wikipedia.org/wiki/JPEG#Syntax_and_structure">JPEG file structure</a>, and created a class that identified various markers inside the file.</p><p>I wrote a <a
href="http://zacharcher.com/lab/20080523_jpeg_corruption/ScrambleHarness.swf">quick 'n dirty test harness</a> <em>(warning: contains drugs and boobs) </em>that loads a couple images, and lets you change the value of one byte at one particular position. Using the harness, and the info gleaned from Matt's JPEGInfo class, I determined that there are three "hot zones" where you can garble the data and produce desirable effects:</p><ul><li><strong>Scan data</strong>. (This is the bulk of the file, containing the image data). These effects are usually relatively weak, and cause horizontal tearing, or sometimes color changes. Applying several corruptions is effective. To see a single corruption effect, drop these values into the harness: [10000/200]</li><li><strong>Quantization tables</strong>. These are beautiful effects that can affect the entire image. The first half of the quantization data controls the visual complexity (Fourier constants) and the second half controls the overall color. Try these values: [60/40], [61/40], [64/75],  [125/110]</li><li><strong>Huffman lookup tables</strong>. This is the most drastic effect. Try these values: [366/28], [367/28], and explore the surrounding bytes.</li></ul><p>It took lots of tuning to make the photo corruption look aesthetically "correct" -- not too intense, not too subtle. The final algorithm applies a number of scan data glitches every frame, and sometimes one quantization or Huffman glitch per frame (and always on the first frame, to emphasize that the glitch is occurring). Some byte values aren't safe to inject (or modify): 0, 1 and 255 have special functions in the JPEG file format, so the site avoids those completely.</p><p>If you want to scramble your own JPEGs, but don't want to write a whole Flash harness to do it, then you can open JPEGs using a text editor (such as TextMate) and edit the file as text (with unpredictable results). Have fun!</p><p><strong>EDIT:</strong> The glitch effects have been removed from horaciosalinas.com, <a
href="http://blog.zacharcher.com/2008/06/15/horacio-salinas-no-more-glitches/">see this post for more info</a>.</p><div
class='bookmarkify'><a
name='bookmarkify'></a><div
class='linkbuttons'><a
href='http://www.facebook.com/share.php?u=http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/' title='Save to Facebook' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/facebook.png' style='width:16px; height:16px;' alt='[Facebook] ' /></a> <a
href='http://reddit.com/submit?url=http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/&amp;title=Real Time JPEG Corruption' title='Reddit' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/reddit.png' style='width:16px; height:16px;' alt='[Reddit] ' /></a> <a
href='http://twitter.com/home/?status=Real Time JPEG Corruption+http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/' title='Save to Twitter' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/twitter.png' style='width:16px; height:16px;' alt='[Twitter] ' /></a> <a
href='http://www.feedburner.com/fb/a/emailFlare?itemTitle=Real Time JPEG Corruption&amp;uri=http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/&amp;loc=en_US' title='Email this to a friend' onclick='target="_blank";' rel='nofollow'><img
src='http://blog.zacharcher.com/wp-content/plugins/bookmarkify/email.png' style='width:16px; height:16px;' alt='[Email] ' /></a> <a
title='See more bookmark and sharing options...' href='http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/#bookmarkify' rel='nofollow'><small>More&nbsp;&raquo;</small></a></div></div>]]></content:encoded> <wfw:commentRss>http://blog.zacharcher.com/2008/05/23/real-time-jpeg-corruption/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
