AS3 – AudioCycleBuffer

July 22nd, 2006

After lots of crashes and frailties, I got today the solution for an audio-cycle-buffer (2047 samples). That means, it is possible to synthesize custom sounds and effects nearly in runtime (delay about 47ms). I have no *BIG* example here right now. Just the first running engine. It has a simple SWF embedded, where an empty wavfile is exported. This SWF will be parsed, modified and reloaded to create the sync- and the permanently changing cycle-buffer-sound. The class Cycle provides switching mono/stereo and 8bit/16bit, yet.

Sidenote to Frank: It's on you to bring the Roland TB-303 to Flash :-) And I have to mention e-phonic and david. They also tried to find a solution on dynamic sound synthesis in flash with pretty cool results.


To have a stable sync in the browser I had to double the cycle-buffer. So the latency is now about 92ms.

Update Enhanced version in my laboratory besides other audio experiements

Update 1.5 years later the Hobnox AudioTool with lots of plugins is available.

Filed under: +

14 Responses to “AS3 – AudioCycleBuffer”

  1. Tek Says:
    July 23rd, 2006 at 8:37 pm

    A really good thing and long awaited ;)

    Thanx to share your work André.

  2. eric Says:
    July 24th, 2006 at 3:21 pm

    actually the first thing i thought of when i heard that e-phonic synth was a tb303! something about the distorted, 8-bit 11khz buzz sounded all squelchy and acid-y.

  3. André Michelle Says:
    July 24th, 2006 at 10:00 pm

    [update]

  4. franky Says:
    July 24th, 2006 at 10:09 pm

    doin’ some more work on the 303 tomorrow. thanks for the excellent audiobuffer engine! cheers.

  5. ktec Says:
    July 24th, 2006 at 11:42 pm

    Thats absolutely awsome work guys!! Nice one!! Watch out properllorheads eh hehe!!

  6. steffen fiedler Says:
    July 25th, 2006 at 12:56 am

    great stuff, as always!

  7. E-Phonic Says:
    July 25th, 2006 at 8:12 am

    Very nice work indeed!!!
    Didn’t had much time to work on my version, but i see it wont be needed anymore ;-)
    Looking forward to play around with it!

    Cheers!
    PJ

  8. Andrew Says:
    July 26th, 2006 at 10:41 am

    OMFG Lets make some Acid.

  9. Roger Says:
    July 27th, 2006 at 10:21 pm

    You’re modifying a SWF and reloading that? How in the world? If so, doesn’t that process represent a huge security hole in flash player?

  10. Jalava Says:
    July 28th, 2006 at 2:37 am

    oh, you have removed the audio.zip from your site :(

    I wish I had stored it first time around and not just skimming throught the source in winrar preview..

    Will it be coming back, or is it too good to be handed to public this early :)

  11. george margaris Says:
    March 11th, 2007 at 1:13 pm

    92 ms latency?

    Wow, that is really low! :-)

    It gets better every time, keep spacing!

  12. ruffneck Says:
    April 22nd, 2007 at 6:55 pm

    I want bigger knobs :) and easier math :))

  13. Joe Says:
    February 3rd, 2009 at 6:47 pm

    Does very weird things when the flash is scrolled out of view or the window looses focus. Seems like the tempo goes way up and the sample get cut off — OSX 10.5.6 Safari 3.2.1

  14. Eder Lima Says:
    February 22nd, 2009 at 6:20 pm

    A W E S O M E !!!!

Leave a Reply