Andre Michelle could be credited with have The Best Job In Flash currently. His presentation was about how a simple hack in the Flash Player leads to hours of fun with oscillators, resonance filters, vocoders and, errr, vibrating balls…
The usual way of producing sound in flash is to load an mp3 into the flash.media.Sound object. However, this is boring! If you use flash.display.Loader with loadBytes(), a ByteArray object goes in, and a Sound object comes out. the sources for this trick (and more) are available at http://popforge.googlecode.com
For continuous sound, you need to make use of an Audio Cycle Buffer that splits bytes into arrays of 256 chunks (apparently this is the optimal number and gives a significant speed boost). Look inside the ‘Examples’ folder in the popforge svn to find a simple setups that create a 1 second sine wave, a continuous wave stream, flange effects etc.
Other projects using the Sound object hack include:
- 8Bitboy – relive hundreds of Amiga game soundtracks with this MOD player able to emulate the Amiga’s 4 channel, 8-bit sound system.
- FL-909 – an astonishing re-creation of the Roland drum machine that launched a thousand House tracks in the late eighties/early nineties
- Hobnox – an online music community that is planning to release the latest of Andre’s work, including a revamped TR-909, TB-303, effects and mixing all available through a Flash interface. Register on the site for a chance to play with the free beta version!