<?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; Sound</title>
	<atom:link href="http://efnx.com/tag/sound/feed/" rel="self" type="application/rss+xml" />
	<link>http://efnx.com</link>
	<description>code. blog.</description>
	<lastBuildDate>Tue, 15 May 2012 17:46:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Actionscript 3 Browser Theremin / Wave Data Visualization</title>
		<link>http://efnx.com/browser-theremin-wave-data-visualization/</link>
		<comments>http://efnx.com/browser-theremin-wave-data-visualization/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 22:02:38 +0000</pubDate>
		<dc:creator>Schell</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Theremin]]></category>

		<guid isPermaLink="false">http://blog.efnx.com/?p=52</guid>
		<description><![CDATA[Yesterday I started fooling around with FP10&#8242;s sound generation capabilities and I got the idea to code a little Theremin. It came out pretty good, but was bland in aesthetics. I decided to try my hand at coding a visualization algorithm similar to the type of visualization one would see while using Amadeus or Digital [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I started fooling around with FP10&#8242;s sound generation capabilities and I got the idea to code a little Theremin. It came out pretty good, but was bland in aesthetics. I decided to try my hand at coding a visualization algorithm similar to the type of visualization one would see while using <a href="http://www.hairersoft.com/Amadeus.html">Amadeus</a> or Digital Performer, etc. I wanted to plot the wave form on the stage. Taking a copy of the sound buffer and selecting equally spaced samples I plotted them on the bitmapData of a Bitmap object and drew lines between data points. This is what it looks like:<br />
<a href="http://www.efnx.com/lab/Theremin/"><img src="http://www.efnx.com/lab/Theremin/_assets/images/Theramin.png" alt="Theremin Wave Data" /></a></p>
<p>The mouse position in x controls the frequency of a sine wave [from 220Hz to 440Hz or A3 to A4], while the y position controls volume. There&#8217;s some tearing that occurs when modulating volume, I haven&#8217;t figured that out how to fix that yet.  As you move your mouse the wave that is generated is plotted on the stage. The pink dots represent sampled data points [which correspond to speaker movement] while the purple lines are approximations of the in-betweens [just lines drawn from point to point]. After playing with that for a while I wrote a class that matches note names to frequencies and drew markers indicating where on the x-axis of the stage one would have to place the cursor to generate a given note between A3 and A4. This is just a small example of the possibilities of sound in flash, and one way to interact with it. I&#8217;m looking forward to building on the classes I made for this example. I&#8217;ve included my entire TextMate project and source below [which will be the foundation of many more experiments], you can chop it up and use it however you want, although I didn&#8217;t copy any license to it, but trust me I won&#8217;t sue. </p>
<p>src -> <a href='http://blog.efnx.com/wp-content/uploads/2008/08/theremin.tar.gz' title='Theremin Project'>Theremin Project/Visualizing Wave Data</a></p>
]]></content:encoded>
			<wfw:commentRss>http://efnx.com/browser-theremin-wave-data-visualization/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

