Robots w/Lasers

April 21, 2006

Dynamic Sound in 8.5

make up wisudamake up jogjarias pengantin jogjamake up wedding jogjamake up pengantin jogjaprewedding yogyakartaberita indonesiayogyakarta wooden craftdaily review
Filed under: Flash — davr @ 11:39 am


  1. […] 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. […]

    Pingback by Dynamic bleeps and bloops in AS3 » Zeus Labs » Flash and Actionscript Insights from a San Diego Developer and Designer — April 21, 2006 @ 3:29 pm

  2. […] I didn’t know this was possible. […]

    Pingback by FatBlog » Holy Crap, Sound Generation in Flash? — April 25, 2006 @ 12:23 pm

  3. interesting little experiment … but isn’t ActionScript
    much too slow to be used for generating any real sounds?
    audio generation and signal processing is already
    CPU-intensive in native assembly code.

    Comment by Rasmus Schultz — May 7, 2006 @ 10:19 pm

  4. Rasmus:

    I feel that AS3 has plenty of speed for things like this. It just depends on what exactly you are trying to do. Is it fast enough to sample and mix a 32 channel orchestral piece? maybe not. But I think with a little work, it could play 2 or 4 channel music in realtime, with plenty of cpu left over. When I get some free time, I’ll play around with it a bit.

    Comment by davr — May 8, 2006 @ 9:48 am

  5. Brilliant work! Never thought of using ByteArray to generate a sound container swf…

    It would be possible to make a sort of SoundProxy class out of this so that adapting it to a (hopefully eventually) proper Flash Sample/SoundData object (Flash10?!) would be less painful.

    As per the comments above I think Flash should be capable of basic synthesis and processing. Just think of plotting Math.sin() into a buffer. Basic synthesis and FM synthesis should be quite viable…

    Comment by Neil Voss — May 9, 2006 @ 11:52 pm

  6. 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.

    It still is a bit unstable, but please take a look at:


    Comment by PJ @ E-Phonic — July 8, 2006 @ 12:03 pm

  7. […] The creator over at seemingly has created the first realtime synth in Flash with AS3.0. Realtime in the meaning that it creates the produced sound completely by itself and not relying on predefined samples. He used the ByteArray and the Loader class (Loader.loadBytes) based on an idea and first experiment from David at Robots /w Lasers. The synth consists of a simple, white emptyness in where you have to click with the mouse and it plays generated sounds depending on the coordinates. The sounds might be still a bit awkward but hey, it’s a milestone in Flash history, isn’t it?! […]

    Pingback by First Realtime Synthesizer in Flash at H1DD3N.R350URC3 — July 9, 2006 @ 1:11 am

  8. […] Synan toteutustapa on yllättävä. Flashissa ei voi luoda dynaamisesti ääniä, mutta ActionScript 3 tukee ulkoisten movieclippien lataamista, joten sen avulla voi ladata tyhjän wav-äänen Flashiin ja muokata ohjelmallisesti tiedoston äänidataa niin, että saadaan ohjelma soittamaan haluttuja ääniä. Idea on ilmeisesti alun perin Davidilta. […]

    Pingback by Kuutio » Syntetisaattori Flashilla — July 27, 2006 @ 11:25 pm

  9. […] Supposing we could generate a sound wrapped in the necessary swf bytecode in memory, compile a swf from it, and play back the sound that we just embedded in it? In a previous article in André Michelle’s blog, he referred to this rather enlightening page about the technique, and after checking that I was barking up the right tree, I set to work. […]

    Pingback by FlashCodersBrighton » Blog Archive » how to make actionscript 3 play generated pcm wave data — August 1, 2006 @ 4:33 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress

Bad Behavior has blocked 839 access attempts in the last 7 days.