The Sound of Chaos

Chaos theory and its little cousin – strange attractors – have been around for a long time. Pictures of chaotic systems and strange attractors abound, and they are a mainstay for computer math experimentalists, although still in the minor leagues relative to the Mandelbrot set.

Most implementations tend to ignore the fact that these systems represent dynamics, that they move and evolve. Still pictures can hide the fact that, for example there are sink states, and that was supposed to represent 20,000 iterations only shows 5,000 because the system hit a fixed point at iteration 5,001.

Years ago I wrote a Windows program to show the dynamics of strange attractors, but that experiment quickly moved over to computing the dynamics of iterated function systems, iterated rational polynomials, and Kleinian groups. And I always wanted to use these systems to generate sounds.

All that remained on the back burner until this year. I recently discovered that the Flash Player now supports on-the-fly sound generation. And an implementation in Flash would conform to my self-imposed mandate to write only software that was browser based. So I downloaded the latest Flex Builder beta from Adobe and set about learning enough Actionscript to get this project going.

It’s been a tough slog because Flex 4 has many departures from Flex 3, in particular the Spark component set, which is sort of the same as Halo, but also different. So hard times for a newb.

Anyways, I’ve got a bare example experiment going, which is in my beta area. It comes with a video that should explain what’s going on.

Scoring the Boulder Dash theme

A few weeks ago I discovered, a website that lets you create musical scores.  I’ve always wanted to use scoring software, but never got around to it until – well you know, the price was right.

Years ago I wrote a computer game called Boulder Dash.  The music for that was composed in a very basic soundtrack editor I wrote for the Atari 800, and was never actually played on a real-world instrument.  I’ve always wanted to convert that music to a real score and hear what it would sound like on, say, the piano.

I dug up some old listings and transcribed the music, which was encoded in all of 256 bytes, and represented 16 bars of music in two voices.

Here’s the result (the play button is at the upper left of the snippet):

In the original game, the 16 bar melody repeated endlessly, ceasing only when the user pressed the Start button.  Here, I give two reps, followed by a tacked-on finish.  According to a friend with music theory background, this kind of repeating passage is called a vamp (in musical theatre circles), and the key signature (which I admit had been puzzling me) is C minor.

By the way, some of Noteflight’s amazing features show through in the score snippet above.  Not only can you play the score by pressing the forward button, but you can click individual notes and play them (or play notes that share the same stem by clicking on the stem).  Each bar has its own play button, so you can start play in mid-score.  You can select groups of notes, staffs, bars, etc – check it out by hovering over different parts of the score. Shift-P will start playing from your current selection.  For more of this awesomeness – and actual music-editing functionaliy, go to their site. Or click on the Noteflight icon at the lower right of the snippet to see the full score.