StandingWave2: an open source AS3 audio library
May 15, 2009 on 3:24 am | In Flex, Music, Programming | 21 CommentsAfter months of waiting for an opportunity to open up in my schedule, I’ve finally managed to create and package the StandingWave2 audio synthesis engine for Flash. It’s now up on Google Code at http://code.google.com/p/standingwave/. Phew… about time!
People have been asking for an open source audio library for a long time. Because the original StandingWave1 became an integral part of Noteflight, I could not simply give the code away. StandingWave2, on the other hand, is a clean subset that the Noteflight team is happy to make available to the Flash community under the MIT OS license.
The basic ideas behind StandingWave are sources, filters and performances. Sources and filters are simple, self-contained objects that can be hooked up to create a kind of audio-processing/sequencing pipeline, and then rendered by a “player” object that encapsulates the Flash Player 10 audio API. Performances allow source/filter combinations to be delivered in a continuous sequence, with extremely precise timing. Obviously this can be used to play music, but it can also be used for all kinds of dynamic sound creation. And it’s relatively easy to extend StandingWave to add your own kinds of sources, filters and performances once you read the code and get the idea.
All the DSP algorithms are in pure AS3. They would certainly be faster in PixelBender or Alchemy, but we’ve opted to keep the approach simple and flexible for now so that it’s easy for people to extend.
I will be talking much more about StandingWave at 360Flex and Flash on Tap, so hope you can make it to either of those conferences. I’ll be posting the slides here.
About its quality and performance: as useful as this library is (thousands of people use it on Noteflight), it could be so much better. It’s fast, but it should be faster; it has a basic repertoire of sources and filters, but should be richer. The need for improvement is one of the main reasons we’re open sourcing it: we very much want others to contribute.
Happy audio coding!
21 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Entries and comments feeds.
Valid XHTML and CSS.
All content copyright (c) 2006-2007 Joseph Berkovitz. All Rights Reserved.
Wow, great news! See you in Boston :)
Comment by Joa Ebert — May 15, 2009 #
Thanks for sharing ! I’m looking forward to trying this out.
Comment by David Wilhelm — May 15, 2009 #
1000 thanks !
Comment by rkn14 — May 15, 2009 #
Wow, Joe! This is amazing. Thank you so much
Comment by Chris Lyons — May 15, 2009 #
StandingWave: Open Source AS3 Audio Library für Flash…
StandingWave ist eine Audio-Bibliothek für ActionScript 3 und kann somit in Flash oder Flex eingesetzt werden. Sie stammt aus der Audio-Engine von NoteFlight, einem Online-Notenprogramm, und wird nun als Open Source angeboten.
The goal of StandingWav…
Trackback by www.video-flash.de — May 15, 2009 #
big thanks for sharing!
Comment by j — July 6, 2009 #
[...] been messing around with recently released Standing wave 2 engine over at JoeberKovitz.com. He used the initial version for his online musical composition app NoteFlight which is very [...]
Pingback by Standing Wave 2 - Open source AS3 sound engine | AdenForshaw.com — July 10, 2009 #
[...] AS3 audio library http://code.google.com/p/standingwave/ After months of waiting for an opportunity [...]
Pingback by Flex开发相关优秀资源集合(全球) | 中文Flex例子 — July 22, 2009 #
[...] AS3 audio library http://code.google.com/p/standingwave/ After months of waiting for an opportunity to open up in my schedule, I’ve finally managed to create and package the StandingWave2 audio synthesis engine for Flash. It’s now up on Google Code athttp://code.google.com/p/standingwave/. Phew… about time.more… 没有过多的研究它,只是从joeberkovitz.com看到了就发了出来。 The goal of StandingWave is to encapsulate the following kinds of objects, permitting them to be easily chained together and combined to produce complex, dynamic audio output: [...]
Pingback by Flex开发相关优秀资源集合 — July 25, 2009 #
Thanks a lot !!
Comment by pozeat — July 30, 2009 #
hey joe,
looks really interesting – perhaps you could provide a zip download or similar either on your site or the google code site? i find the whole subversion thing overly technical and a hassle, coming from a design/scripting/music background. :-)
also a simple online demo would be fantastic as well.
cheers, luke
Comment by luke — August 9, 2009 #
I’ve had numerous requests to provide an online demo, and I realize this would make things simpler for a lot of people. I’ll make an effort, but because the library is being updated relatively frequently, it is a bunch of extra work to keep posting new downloads all the time.
But maybe even an out-of-date demo would be worthwhile.
Comment by joe — August 9, 2009 #
Is there a way to create distortion and change the levels on the bass of an mp3?
Comment by Simoens — August 18, 2009 #
No distortion yet but you can certainly boost the bass by using a BiquadFilter.
Comment by joe — August 18, 2009 #
Ok thanks for the info ! :D
Comment by Simoens — August 18, 2009 #
Thanks so much for releasing this, Joe! Could I get a hint as to how I would pan sounds? In particular, I’m creating SineSources, and I’d like to pan them left or right. I’d appreciate any tips.
Comment by Surya Buchwald — August 25, 2009 #
I’ve been porting The Synthesis ToolKit in C++ to AS3 some time ago.
Hope you can have a look :)
http://code.google.com/p/stk-in-as3/
Comment by Andy Li — September 21, 2009 #
ok not a developer nor savvy at all w/ subversion, so i meticulously copy the files one by one :P im familiar enough w/ as3 code but im a caveman w/ stuff outside cs4..
now, i wonder how to compile this? is it correct to drag simpleoutput.mxml to the flex_sdk mxmlc.exe? import the files in an .as file in cs4?
i’ll keep digging but once i get a clue to get past this i know i can take more baby steps..
thanks,
Comment by jay — September 29, 2009 #
Well, what you really need is an exported, fully built version of the library in a ZIP file. I’ve just built that for you (and others) and posted it on the “Downloads” tab on Google Code.
We were avoiding this for a while when the library was changing every day, but it’s pretty stable now.
Comment by joe — September 29, 2009 #
joe, huge thanks for the almost instantaneous response! diving in now…
Comment by jay — September 30, 2009 #
Hey Joe, incredible. This was exactly was I was looking for. I built this small AS3 toy called the Tone Scribbler using StandingWave2. It made the project a hundred times easier. Thanks.
I used it as the final project for my Flash class. You can check it out on my website.
http://francisbaptiste.com/tone-scribbler-an-as3-toy/
Thanks again.
Comment by Francis Baptiste — December 18, 2009 #