The Logistic Function and its Discontents

This article explores the mathematical and more specifically the musical products of a very simple equation. In that exploration, we touch not only mathematics and music, but art, architecture, nature and philosophy; so those who are usually squeamish about mathematics are encouraged to read on.

Most readers who made it through high school algebra should be familiar with quadratic functions and the parabolas described by these functions on the x-y plane. For those who have forgotten, a parabola looks like this:

Parabolas are seen not only in high-school math classes, but often in nature as well. Among the most exquisite uses of parabolae can be found in the architecture of Antoni Gaudí. I had the priveledge of seeing many of his buildings and spaces in Barcelona, including this magnificent example of parabolic architecture:

But (as usual), I digress. For the remainder of this article, we will focus on a particular class of these functions, called logistic functions:

f(x) = ax(x-1)

Logistic functions have roots and 0 and 1, and describe a downward facing parabola (or “water-shedding parabola” in the parlance of my high-school pre-calculus teacher). The peak of this parabola depends on the value of a, and as we will soon see, this is the least of the interesting properties dependent on a.

Now, instead of simply graphing the function on an x-y plane, apply the output of the function back as the next input value in a process known as iteration:

xn+1 = axn(xn1)

This is a fancy way of saying “do the function over and over again.” What is interesting is that for different values of a, one will get different results. For low values (where a is less than one), repeated iterations get closer and closer to zero. If a is between 1 and 3, the it will end up at some value between zero and one. Above 3, things get more interesting. The first range bounces around between two values, as characterized below:

As a increases, eventually the results start bouncing among four values, and then eight, then sixteen, and so on. These “doubling periods” get closer and closer together (those interested in this part of the story are encouraged to look up the Feigenbaum constant). Beyond about 3.57 or so, things get a little crazy, and rather than settling into a period behavior around a few points, we obsserve what is best described as “chaotic behavior,” where the succession of points on the logistic function varies unpredictably.

It is not random in the same way that we usually think of (like rolling dice or using the random-number generators on our computers), but has rather intricate patterns within – those interested in learning more are encouraged to look up “chaos.” This chatoic behavior can be musically interesting, and I have used the chaotic range of the logistic function in compositions, such as the following except from my 2000 piece Spin Cycle/Control Freak.

One can more vividly observe the behavior I describe above as a graph called a bifurcation diagram. As the values is a increase (a is labelled as “r” in this graphic I shamelessly but legally ripped off from wikipedia), one can oberve vertically the period doubling where the logistic map converges on a single value, then bounces between two points, then four, then eight, and so on, until the onset of chaos at approximatley 3.57.

There are tons of books and online articles on chaos, the logistic function, and its bifurcation diagram. Thus, it's probably best that interested readers simply google those phrases rather than suffer through more of my own writing on the topics. However, I do have more to say on my musical interpretations of these concepts.

Given my experience in additive synthesis and frequency-domain processing (if I have lost you, then skip to the musical excerpt at the end, it's pretty cool), I of course viewed this map as a series of frequency spectra that grow more or less complex based on a. I implemented this idea in Open Sound World. using the logstic function and its bifurcation diagram to drive OSW's additive synthesizer functions. The results were quite interesting, and have been used in several of my live performances. I use my graphics tablet to sweep through different values of a on the horizontal axis as in the bifurcation diagram:

Photo by Tiffany Worthington

The resulting sound is the synthesis of frequences based on the verticle slice through the diagram.

Click here to listen to an example.

In the periods of chaos, the sound is extremely complex and rich. Below 3.57 and in the observable “calm periods,” the sound is simpler, containing on a few components forming somethin akin to an inharmonic chord. In true chaotic fashion, small movements along the horizontal axis result in dramatic differences in the spectrum and the timbre. The leads to a certain “glitchy” quality in the sound – one can practice control over time to make smooth transitions and find interesting “islands of stability” within the timbral space.

I have used this simple but evocative computer instrument in several performances, including my 2006 Skronkathon performance as well as my work last year with the Electron SAlon series. I have really only scratched the surface the possibilities with this concept, and hope to have more examples int the future.

Adventures in Circuit Bending: Vtech Tiny Touch phone

Last evening I embarked on a circuit-bending project, and this forum provides me a unique opportunity to document the experience.

For those who are not familiar with circuit bending, it basically the process of modifying the electronics in existing audio devices, usually simple analog circuits in musical toys. In the process, one can add new expressive controls to create a unique, albiet “lo fi”, instrument. A great introduction on circuit bending can be found at Reed Ghazala's Art of Circuit Bending. Additionally the blog Get LoFi has a wealth of information and circuit bending projects and instruments.

This experiment involves the Vtech Tiny Touch phone. It plays a few simple phrases relating to numbers and colors as the buttons on the phone are pressed. You can listen to an example here. Vtech toys are good circuit-bending fodder, and I've tried the phones before. During my first attempt, I shorted out the integrated circuit (oops), which ended that effort. The second time I did a simple bend across a timing circuit that allowed me to alter the speed and pitch of the sound with a potentiometer. I had this instrument open for kids to play with during the my show at Zeum in San Francisco this past spring, which turned about to be a death sentence for it. One kid happily showed his parents and me the capacitor he managed to pull off the circuit board. This time I'm going more slowly and methodically, with the goal of a more interesting and robust instrument.

First, we open up the phone to reveal its guts (i.e., circuitry):

Now grab a test wire (i.e., with clips on the ends) and start looking for interesting “bends” by shorting different points in the circuit. In general, this is a hit or miss process and experimentation is the rule of the game. However, care should be taken to avoid shorts that could damage the audio circuits. In particular, stay clear of anything that connects directly to the batteries.

A rather effective short is opposite corners of the IC board, as illustrated by the pink dots in the closeup below:

Shorting these leads, which essentially drops the resistance to near zero, slows down a timer and thus the speed and pitch of the audio, as can be heard in this audio clip. Note the slower version of the telephone ring. From this result, one can conclude that varying the resistance changes the timing and pitch of the sound, in particular highwer resistance yields higher pitch, with infinite resistance (i.e., open circuit) restoring the original behavior. Such a bend is a good opportunity for a potentiometer to mechanically change the pitch, or a photocell to use light as a pitch control. For now, I am attaching a photocell using alligator clips:

Cupping my hand over the photocell and moving it closer and further while pressing buttons yields variable-pitch sound and beginnings of a new circuit-bent instrument.

I could stop here and make this bend permanent, but I would to continue with other options, including switching between photo, mechanical, and null modulation, as well routing other signals over this bend to create FM synthesis. I will continue to document this project here as I find more time to work on it.

getting ready for tomorrow's performance, part 1

Well, it's time to stop fooling around with pictures and get back to using Open Sound World for what is was intendend, making sound. In preparation for my performance tomorrow at the Skronkathon, I have selected a couple of patches that have worked well for me in the past. They are quite robust, and provide a variety of musical gestures and timbres that complement the sound generated by Ron Lettuce on his PVC wind instrument.

First there is my sinusoidal timbre space based on bifurcation diagrams from classic chaotic functions, controlled using my Wacom graphics tablet. If that sounds really complicated and weird, just accept for the moment that it sounds really cool, and that I will post a more in-depth article about it along with sound clips in the near future. The second patch uses a WX7 wind controller to control a set of resonance models and the excitations used to drive them – essentially, a metallic chamber that one plays like a wind instrument (clarinet, saxophone, etc.). Both of these programs were used in my performances with ELSA Productions last year.

Before today, I had been a bit worried about using my Dell laptop for the performance, as it had a tendency to start running the fan at full blast and slowing to a crawl, especially when running a CPU-intensive program like OSW or Emulator X2. Things would get even worse running a program like Poser or Bryce that is both CPU and graphics intensive. I installed the fan control software and cleaned out the internal fans and heat sink as described in this article and others, and while this has helped, it hasn't cured the problem, particularly with respect to graphics. I fear the root cause of the problem is simply that the laptop, which is nearly three years old, is simply nearing retirement.

In any case, I am also the planning to use the Evolver and the feedback+filter technique I described in a previous article. I generally have both a hardware synth and computer running simultaneously during live performances, so that if the computer and software crash I still have something to play. This has paid off on numerous occasions.

And that's pretty much it. It doesn't sound like a lot, a couple of very focused synthesis techniques, but by listening and playing them like traditional instruments, I expect to get a ful musical performance – I often advise such a “simple” approach to live electronic performance when asked by other musicians.

So that's it for now. I'm off to San Francisco for my one “rehearsal,” taking a leisurely trip up Highway 1 to Half Moon Bay and then cutting over to get to the city. More later.