Step sequencer / drum machine

Part of the sequencer

Part of the sequencer

Here is a basic step sequencer for creating rhythms. The sounds it plays are small MP3 files. Short sound clips of drum noises, blips and plings. So it’s more a sample player than a drum synth. But the main thing is that it loads and plays rhythm patterns and that the patterns can easily be edited. That’s what I wanted to do here.

It plays patterns in the same way FL Studio (FruityLoops) does. There’s twelve tracks that each play their own sound and each track has sixteen steps that can be switched on or off by clicking the step buttons.

Besides that the volume of each step can be changed by holding the “1” (one) key on the computer keyboard while dragging the mouse up or down on the step button. The blue rectangle on the step will change in height to indicate the volume level.

The image of the waveform on the left of each track can be clicked to play the sound. And there are four patterns. Switch between them with the ‘1’ to ‘4’ buttons at the bottom.

Try it out below. This time I added play and stop buttons because in the previous two players I didn’t and that started to annoy me. Things on web pages should only make noise when they’re specifically told so.

Get Adobe Flash player

If you’re interested in any of the ActionScript code then download the full source of this project here. The ZIP includes all ActionScript classes, the samples and everything needed to compile and run the project.

A few notes on the source:

The project was made in FDT 3. There is no FLA file as a base to compile the SWF from. Instead you’ll need to set the class AppController (flash/classes/com/hisschemoller/AppController.as) as the main class in the project’s Run/Debug settings.

All visual elements of the projects were made in the Flash file flash/assets/assets.fla. That’s where all the button graphics are. This file is compiled to the SWC file assets.swc and that must be added to the class path in FDT. (Right click on the SWC file in FDT’s Flash explorer and choose ‘Add to Classpath’.) Then the scripts in FDT can find the MovieClips in the Flash library that were given a class name.

There might be all kinds of weird hidden Mac files in the ZIP. As well as the FDT launch and project setting files. I’m quite new to working on a Mac and I’m not shure what it adds that I don’t see. Sorry for that.

14 Comments

Hannah Herbert,

Hello,

I am a student from Toronto and I was browsing the internet for a project idea when I came across your site.

I must say that your work is a great inspiration!

Wouter,

Hi Martin,
No, I don’t intend to start an open source library. I just put my source codes online here for anyone interested to download. A good library would have to be well thought out, maintained and properly commented and documented. Just to experiment a bit and share the source code is more fun I think.

And there’s stuff from other people in my code as well. The AudioEngine and IAudioProcessor are by André Michelle. He presented that code at Flash In The Can here in Amsterdam last year. Check those source codes here. He’s a developer for Hobnox, so he knows his stuff about audio programming in Flash.

Cheers,
Wouter

Martin,

Hi Wouter,

Great result, great code, great sound!

I am wondering if you intend to deliver your work as an open source library? Your AudioEngine is really cool, and I am about to use it for some personnal project. I have to provide volume & pan support for IAudioProcessor, and thought I could add that to a shared code base?

A sequencer supporting MidiXml and an engine for rendering sound layers synchronously was really great to start working, so if you do no publish anything, at least thank you very much for sharing your knowledge and work.

By the way, your sound on myspace is really cool as well :)

Ciao,

Martin
ps: check AudioTool from Hobnox, an impressive online music editor.

Martin,

Hi Wouter,
Many thanks for sharing such a good work… I tried several stuffs to have a simple metronome working without being able to have it running regularly :)
I will look deeper in your code how you did this!

Tor Castensson,

Hi

Great work, I’m very impressed.
I would like to talk to you more about a project my company is starting up in sweden. Could you please email me for further info?

Thanks!

/T

audio programming :: 3komma14,

[…] Adobe Flash is a multimedia platform originally acquired by Macromedia and currently developed and distributed by Adobe Systems. Since its introduction in 1996, Flash has become a popular method for adding animation and interactivity to web pages. But you can do a lot more with it. A good example is the wouter hisschemoller, a flash developer from amsterdam specialized in audio programming. His background as a Dj, tells a lot about the love for electronic music. One of his last project is a Step sequencer / drum machine. […]

Robin slierendregt,

Super cool stuff wouter.
You making great work.

Leave a Reply

Your email address will not be published. Required fields are marked *

eleven + four =