Generative Music

2010-03-21 – 5:08pm

Continuing my HTML5 and canvas experiments, I’ve put together a generative music system. Essentially, a series of particles move across a field, occasionally triggering sounds — the sound triggered depends on their location in the field.

There is, of course, a little bit more to it than that. Under the hood, I’ve got a series of HTML5 Audio objects that are used to provide polyphonic audio using a simple round-robin algorithm (I encoded the audio in OGG, so you’ll need to use an OGG-friendly browser, like Firefox). The particles are much simpler than those in my previous canvas dalliance, in that they don’t swarm, and their motion is more linear.

2010-03-22 – 2:09 pm

Very nice. One note: with the default verbosity, I was getting virtually no sound generation at all. Had to put it up to .1 or .2 ish.

But nice!

2010-03-22 – 4:29 pm

Hmmm… now it works.

And BTW: Chrome also seems to be an ogg-friendly browser. In fact, Chrome still seems to have the upper hand speed wise over Firefox. (Now, if only they could stop Chrome from crashing every few minutes!)

Add your voice

Spam protection by WP Captcha-Free