StandingWave2: an open source AS3 audio library
May 15, 2009 on 3:24 am | In Flex, Music, Programming | 29 Comments[See note below about the StandingWave3 update.]
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 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!
Important update: After a lot of amazing work by Max Lord, who rearranged SW2’s internal organs to create a new, bionically altered library, StandingWave 3 was released in June 2010. This update to StandingWave uses Adobe Alchemy to compile C audio processing code directly into the Flash Player for maximum speed, and is generally much faster and more flexible than Standing Wave 2. It also includes a notion of modulators that allows for continuous variation of many filter parameters. Like this idea? I do, which is why it’s now the production audio library in Noteflight. Go to the StandingWave 3 repository on GitHub.
Panel on Startups and Cloud Computing
May 12, 2009 on 1:25 pm | In Miscellaneous, Programming | 1 CommentWith my business hat planted on my head, I’ve been invited to appear at a local panel on building startups with cloud-based computing services:
http://www.vilnashul.com/calendar/event/the-state-of-startups-using-cloud-computing/
This should be interesting; I know a couple of the other companies represented on the panel, and I am sure some diverting and unpredictable discussion is in the works! Also I’ve never been to the Vilna Shul, a much-neglected historic synagogue in Boston.
360Flex: Talking About Audio
May 11, 2009 on 12:39 pm | In Flex, Music, Programming | 1 CommentI’ve been working all weekend on next Monday’s presentation at 360 Flex: the focus is on audio synthesis in Flash. I think this will be a fun one: I’ll be unveiling an open source version of Noteflight’s StandingWave audio library, at long last. This should make it much easier for folks to create Flash or Flex apps that do real-time audio synthesis, since it provides a set of useful building blocks on top of the raw Flash Player 10 API. StandingWave has a bunch of useful concepts in it like audio sources, filters/transformations and sequenced “performances” of timed events, and I’m hopeful that others will find it useful. I’ll post again when it’s actually ready for consumption — that is to say, next week!
I’m showing a few cool demos of this technology at the conference, including a Moccasin-based visual editor for a “musical shapes” world in which shapes represent tones, and a set of data entry forms that progress smoothly through an accompanying musical form as the user navigates. It’s been loads of fun working on this stuff, which is to say it’s not anything like work at all.
I guess I have to go back to work now.
Gosh darn it.
Entries and comments feeds.
Valid XHTML and CSS.
All content copyright (c) 2006-2007 Joseph Berkovitz. All Rights Reserved.