Dynamic bleeps and bloops in AS3

by Josh Tynjala

I noticed an awesome hack on Flashcoders today. David from Robots w/Lasers shows off a way to dynamically generate sounds in AS3. He actually builds a SWF in a ByteArray at runtime and passes it into a Loader object. With a little work to refine this approach, ambitious Flash developers could put together some sort of music sequencer. A full game soundtrack would be pretty cool. The sounds have a nice retro feel that would go well with many of the Flash games out there. It reminds me of my days playing with BASIC or Assembly. I’m sure there are hundreds of other possibilities.

If you’ve got some time, David is interested in seeing any improvements that can be made. I might take a look at his code later this weekend. It seems like a fun little project.

About the Author

Josh Tynjala is an indie game developer, entrepreneur, Flash and Flex mercenary, and bowler hat enthusiast.

Discussion
  1. Hi,

    I’ve been working on a Class that was based on your idea.
    I took the concept a bit further and created a realtime circular audio buffer so you can generate audio in realtime without the limit of sample length, as it will ’stream’ the circular buffer.

    Please take a look at:
    http://www.e-phonic.com/misc/

    Cheers!
    PJ

    posted by PJ @ E-Phonic on 07.08.2006
  2. Ah, i see this wasn’t your code… :-)
    I’ll post this at David’s site too.

    posted by PJ @ E-Phonic on 07.08.2006
Share Your Thoughts

To display code in comments: <pre>Code here. May be multiline. Format XML with &gt; and &lt; entities.</pre>

Some HTML allowed in comments: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>