<?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>The efnx code blog. &#187; Wave</title>
	<atom:link href="http://efnx.com/tag/wave/feed/" rel="self" type="application/rss+xml" />
	<link>http://efnx.com</link>
	<description>code. blog.</description>
	<lastBuildDate>Sat, 03 Jul 2010 18:02:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flash Actionscript 3 Waveform Generation Class</title>
		<link>http://efnx.com/flash-actionscript-3-waveform-generation-class/</link>
		<comments>http://efnx.com/flash-actionscript-3-waveform-generation-class/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 22:45:35 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[Wave]]></category>
		<category><![CDATA[waveform]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/?p=90</guid>
		<description><![CDATA[In my last post, Plotting a Sound Wave in Flash AS3 I detailed a method to use when displaying audio data. The method itself works great, but due to Flash&#8217;s frame-based code execution and event processing the user looses input capabilities while the flash player chugs through millions of numbers adding, rounding and comparing. In [...]]]></description>
			<content:encoded><![CDATA[<p>In my last post, <a href="http://blog.efnx.com/?p=75">Plotting a Sound Wave in Flash AS3</a> I detailed a method to use when displaying audio data. The method itself works great, but due to Flash&#8217;s frame-based code execution and event processing the user looses input capabilities while the flash player chugs through millions of numbers adding, rounding and comparing. In order to make displaying an audio waveform easier on both the programmer and the user I wrote a class that analyzes a Sound object progressively, and dispatches a special event containing the analyzed data. The class will construct a left and right channel Vector, each containing one data point [a number between 0 and 1] for a given number of <a href="http://en.wikipedia.org/wiki/Window_function">windows</a>, between two positions in the sound. The left and right position are measured in samples and two types of analyzation are offered. Here is a demo of the class in action:<br />
<div class="wp-caption aligncenter" style="width: 578px"><a href="http://efnx.com/lab/WavePlotter/"><img alt="Screen Capture of Waveform Plot" src="http://efnx.com/lab/WavePlotter/waveform_screen.png" title="Waveform Plot" width="568" height="237" /></a><p class="wp-caption-text">Screen Capture of Waveform Plot</p></div><br />
The calculated data can be reached incrementally through the WaveformEvent object which is dispatched every frame, or at the end of all analyzation in the Waveform object&#8217;s leftChannel and rightChannel properties. The details are listed in the documentation below.</p>
<p>Thanks to the <a href="http://summitprojectsflashblog.wordpress.com/2008/07/31/wave-theory-in-actionscript-3/">Summit Projects Flash Blog</a> and <a href="http://www.bytearray.org/?p=329">Thibault Imbert at ByteArray</a> for their posts on the different techniques that went into my class.</p>
<p><a name="source"><strong>Source</strong></a><br />
Here is the source for my TextMate project: <a href="http://efnx.com/lab/WavePlotter/src/WavePlotter_Main_081024.src.tar.gz">Sources</a><br />
Documentation: <a href="http://efnx.com/docs/efnx/sound/Waveform.html">class</a> and <a href="http://efnx.com/docs/efnx/events/WaveformEvent.html">event</a></p>
<p>And here is a Flex version (made in windows): // Thanks dem!<br />
<a href='http://blog.efnx.com/wp-content/uploads/2009/11/WavePlotter_Main.zip'>Sources (Flex version)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/flash-actionscript-3-waveform-generation-class/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
	</channel>
</rss>
