<?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>SIGMA::BLOG &#187; Soundscape</title>
	<atom:link href="http://www.sigmagroup.com/blog/archives/tag/soundscape/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sigmagroup.com/blog</link>
	<description>Full service advertising agency</description>
	<lastBuildDate>Wed, 24 Aug 2011 14:15:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating a Soundscape in Flash/AS3</title>
		<link>http://www.sigmagroup.com/blog/archives/809</link>
		<comments>http://www.sigmagroup.com/blog/archives/809#comments</comments>
		<pubDate>Fri, 27 Mar 2009 13:32:20 +0000</pubDate>
		<dc:creator>JSchorn</dc:creator>
				<category><![CDATA[Web Design/Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[joe schorn]]></category>
		<category><![CDATA[Sigma Group]]></category>
		<category><![CDATA[Sound effect]]></category>
		<category><![CDATA[Soundscape]]></category>

		<guid isPermaLink="false">http://www.sigmagroup.com/wordpress/?p=809</guid>
		<description><![CDATA[Recently, I was tasked with creating a soundscape for a flash-based project we were producing for a client. I wanted to create something that would allow a user to navigate an image with their mouse and blend different audio files together—changing the pan and volume of sounds as they moved their mouse. Here’s the result:
I [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was tasked with creating a <a class="zem_slink" title="Soundscape" rel="wikipedia" href="http://en.wikipedia.org/wiki/Soundscape">soundscape</a> for a flash-based project we were producing for a client. I wanted to create something that would allow a user to navigate an image with their mouse and blend different audio files together—changing the pan and volume of sounds as they moved their mouse. Here’s the result:</p>
<div id="attachment_811" class="wp-caption aligncenter" style="width: 310px"><a title="http://www.sigmagroup.com/ftp/jschorn/preview/soundscape/" href="http://www.sigmagroup.com/ftp/jschorn/preview/soundscape/" target="_blank"><img class="size-medium wp-image-811" src="http://www.sigmagroup.com/wordpress/wp-content/uploads/2009/03/picture-15-300x145.jpg" alt="picture-15" width="300" height="145" /></a><p class="wp-caption-text">http://www.sigmagroup.com/ftp/jschorn/preview/soundscape/The result seemed quite flexible and easy to implement. So I thought perhaps other Flash developers might find it useful.  Here’s how it works.</p></div>
<p>I came up to two <a href="http://en.wikipedia.org/wiki/ActionScript" target="_blank">AS3 classes</a>: SoundCell and Soundscape.  A SoundCell is a circular representation of a sound in space.  As you move closer to the center of the sound from any direction, it becomes louder.  Move to the left of the sound, and it pans to your right.  Move to the right, and it pans to your left.  Move past the radius of the sound and it shuts off.  The SoundCell also has a graphical representation that you can turn on or off so you can position cells. The Soundscape is an object that holds various SoundCells. It includes methods for adding cells, playing cells, and destroying them. Cells can overlap each other—creating some really nice blended sound effects.<span id="more-809"></span></p>
<p style="text-align: left;">Using the classes is easy and below is the step-by-step guide.</p>
<p>1.  Import the Soundscape class.</p>
<ul>
<li>import com.sigma.sound.Soundscape;</li>
</ul>
<p>2.  Create a new instance of the Soundscape class and add it to the display list.</p>
<ul>
<li>var mySoundscape:Soundscape = new Soundscape();</li>
<li>addChild(mySoundscape);</li>
</ul>
<p style="text-align: left;">3.  Add the cells you want using the addSoundCell() method. This method takes 6 parameters (filePath:String, xCoordinate:Number, yCoordinate:Number, radius:Number, visible:Boolean, color:Number).</p>
<ul>
<li>mySoundscape.addSoundCell(&#8221;audio/city.mp3&#8243;, 450, 200, 500, true, 0&#215;990000);</li>
</ul>
<p style="text-align: left;">4.  When you&#8217;ve added all of your SoundCells, then call the start() method to initiate the Soundscape, and the Soundscape takes care of the rest.</p>
<ul>
<li>mySoundscape.start();</li>
</ul>
<p style="text-align: left;">5.  When you are done with your Soundscape you can destroy it with a call to the destroyCells() method.</p>
<ul>
<li>mySoundscape.destroyCells();</li>
</ul>
<p style="text-align: left;">I&#8217;ve posted the source <a title="http://www.sigmagroup.com/ftp/jschorn/preview/soundscape/soundscape_src.zip" href="http://www.sigmagroup.com/ftp/jschorn/preview/soundscape/soundscape_src.zip" target="_blank">here</a>.  Feel free to use it and modify it to your heart’s content!</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/db19c390-322c-4ab5-9c25-788c9720f9a1/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=db19c390-322c-4ab5-9c25-788c9720f9a1" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sigmagroup.com/blog/archives/809/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

