We used RTcmix, Max/MSP and showed a JSyn example for our class demos. For the attractor-realization applications, RTcmix was imbedded in a wxWindows graphics context. See the resources web page for appropriate links to these packages.



Here are the source-code files for the class examples:

We talked about different ways of "doing" algorithmic composition and demonstrated some simple scorefiles (scripts) to show probabilistic and deterministic approaches (see below). We also looked at times where probabilistic/deterministic techniques overlap -- constrained probabilities and chaotic equations.

Simple Algorithmic Scorefiles

Our first little scorefile showed a very simple 'algorithmic' operation -- creating a scale (both logarithmic and linear). A variant of this deterministic approach uses the bottom part of a simple parabola (y = x2), mapping it into a frequency range we can hear and stepping through the range [-1.0, 1.0] to generate our notes:

Next we explored the use of constrained randomness, ultimately winding up with a little scorefile to create a narrowing/widening effect on our note pitches (the widening was a happy byproduct of sloppy programming -- yay!):

Finally, we wrote a simple scorefile that did a fun sort of 'spectral decomposition'. We started by generating the aligned harmonics of a sawtooth waveform. We then gradually randomized the start time of each harmonic, ultimately resulting in a cascading effect through the harmonic spectrum:

Not content with that, of course we then began to randomize the frequency of each harmonic. What fun:

Chaotic Attractors: The Population Equation

The first chaotic equation we tried was the famous "population equation": This equation was made famous in James Gleick's book Chaos: the Making of a New Science. When plotted by changing the value of R and iterating the equation, we can see regions of relative stability (single or double values are always generated) interspersed with areas of chaotic behaviour:

Mapping the output of the equation onto pitch seemed like a logical thing to do, so we did. Luke Dubois has also created a nifty Max/MSP patch that uses this equation (available at the top of this web page):

Chaotic Attractors: The Lorenz Attractor

The Lorenz attractor is generated by iterating the following three differential equations, and plotting x against z after calculating the delta-difference for the points x, y and z: Because we were always plotting tiny delta-differences in the values of x and z, the graph was nicely connected, and by inserting a small amount of time between each point plotted we could observe the plot as it orbited around one basin of attraction and then jumped into the other (the characteristic behavior of the Lorenz attractor -- originally developed as an atmospheric/climate model). The obvious thing for us computer-musicians to do is to realize this as a graph of frequency vs. amplitude and listen as the merry Lorenz attractor unfolded itself. Oh what fun!

Chaotic Attractors: The Henon Attractor

The Henon attractor presented a slightly different challenge in sonic interpretation. The attractor is generated in a fashion almost as simple as the chaotic population equation described earlier. Simply iterate the following two equations: Plotting the [x,y] pairs that come from the above will ultimate generate the attractor.

The tricky part is that, like the population equation in one of the chaotic regimes, the points jump randomly along the attractor orbit. If we just played these notes as pitches, then it would sound like random notes.

Instead, we imagined trying to capture the 'essence' of the attractor-filling process, because essence-capturing sure seemed like a good idea at the time. We treated the graph above as a simplified spectral (FFT) plot for a 2-second chunk of time, and repeatedly realized it as we plotted 10 points for each 2-second burst. As the attractor filled in, the initially schematic sound of the swooping attractor gradually became a more coherent musical gesture. Sort of.

There's a whole lot more fun to be had with these algorithmic entities. I think the key to really doing something interesting is to think beyond the simple, straightforward realizations that we made for class demo purposes. Mapping our plots onto frequency (even as spectra) makes a kind of intuitive sense, but surely there is an undiscovered sonic landscape awaiting the creative individual who can imagine even more rewarding uses of these approaches.