Posts Tagged ‘Soundscape’

Creating a Soundscape in Flash/AS3

Friday, March 27th, 2009

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:

picture-15

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.

I came up to two AS3 classes: 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. (more…)