A problem occured while loading the plugin: krl_flickr_photoset -> : Assigning the return value of new by reference is deprecated on line 18
kelvinluck.com: Wave Sequencer experiment
Get Firefox! creative commons

Wave Sequencer experiment

A couple of weeks ago I attended the FitC Amsterdam conference which was great fun. One of the most inspiring sessions I saw was Andre Michelle’s “Making REAL Music Within Flash” where he talked us through generating sound in flash using the infamous flash sound hack and then showed us how he is redefining what should be possible in flash by building the hobnox audio tool.

I travelled to Amsterdam by train and ferry which meant that I had some spare time on the way back to play and luckily Andre and Joa Ebert have released the complex code behind the flash sound hack as part of their popforge open source library.

So I built my Wave Sequencer. The idea is that it loads in a wav file and splits it into 16 equally sized chunks. You can then re-arrange these chunks to create new variations on the beat. Each 16 chunk section is a pattern and you can create up to 16 different patterns by choosing different patterns from the “pattern bank” at the bottom of the screen.

The loop I’m using is the famous Amen break and I’ve sped it up a bit (and given you a slider so you can control the speed yourself). If you play around with it you’ll see you can slice and dice your own old skool jungle riddims :)

You need Flash Player version 9+ to view this sample. Get Flash Player.

Note: If you are experiencing choppy audio then you are probably running the latest revision of the flash player ( which breaks onSoundComplete. So join the petition and ask Adobe to make some noise. I’ve compiled a standalone version of the app against the older player and you can download the PC standalone version which doesn’t have the audio issues.

Obviously this little experiment is very rough around the edges and there is a lot that can be done to improve it but I’ve been too busy with “real work” to look at it in the weeks since I got back from FitC and I thought it was better to publish it as is than to leave it to get lost on my hard drive…

My code here is really simple, all of the complex stuff is done by the popforge library. So big thanks to Andre for the inspiration and the sourcecode :) Hopefully I’ll find some time in the coming months to take this a lot further and to turn it into an AIR app which is actually useful!

  1. Coooooool ;) I like it!

    Andre Michelle    Mar 17, 10:42    #
  2. Wicked :) Hopefully I’ll get some time to finish it up sometime soon…

    Kelvin Luck    Mar 18, 20:02    #
  3. Hi Kevin!

    I was hoping to find the code for this interesting solution… Any chance that you could provide a link to it?

    — Jonas Nyström    Sep 4, 06:19    #
  4. Hi Jonas,

    The sourcecode is a bit of a mess because it was stuck together on a long boat trip so I’m not too keen to post it…

    I basically started from the popforge play wavfile example and rearranged the samples array as it is being played based on the UI changes…

    If you have any other questions I’d be happy to help…

    Kelvin Luck    Sep 4, 06:52    #
  5. I would like to see the source code even if it is not so clean…
    Thanks to you and André Michelle for inspiration: this give me the way to follow for my new website…

    batchass    Sep 10, 08:40    #
  6. this is so good..

    Dinç Erem Tapa    Sep 13, 09:59    #
  7. On my macbook with flash player 9 and now 10 installed I still get the “You need Flash Player version 9+ to view this sample” message.
    I have to view source and find the direct path to the swf to see it: http://www.kelvinluck.com/assets/wavesequencer/WaveSequencer.swf

    Morten Skogly    Oct 19, 20:41    #
  8. Thanks for the headsup Morten… I was about to say that it must work because it’s embedded with swfobject etc etc then I took a closer look and saw that Textpattern was putting in BR tags in the javascript code… Another reason I need to update my blog software!!

    Anyway – it should be fixed now, thanks again for the headsup :)

    Kelvin Luck    Oct 20, 02:04    #