How I Think About Algorithms


    I spend most of my work life trying to improve Max so people can explore ideas and express them. Most aspects of this work have little to do with inventing specific algorithms used in the creation of music or art. But the use of algorithms is one of the ways you can be expressive with Max, and earlier in my life, I spent more time thinking about some of those actual algorithms. Maybe a way to sum up my career evolution was that I started by designing systems that made music and ended up designing systems that let people design their own systems to make music.
    Even if I went “meta” when I started working on Max, it helped to have a few ideas about what algorithmic gadgets would be cool to make with a gadget design tool. In this article I want to talk about some of those ideas.
    As a musician whose primary training was in the vernacular of what is typically called jazz, I think of my artistic purpose as “chasing a sound.” Ideally, this sound would be highly personal and yet reflect some recognizable influences within the tradition. To be clear, when I talk about “a sound” I am not referring to a single “sound” as in an audio sample. A musician’s sound is something that necessarily has to be in constant flux to avoid predictability, and yet at the same it should demonstrate some continuity. My concept of what changes and what stays the same in a sound might only be interesting or even discernible to me, but it forms the organizing principle that determines what I practice and explore.
    One of the most important aspects of the sound I want to find I would describe as “different and yet the same.” A simple example of this would be repetition. When I play the piano and I am repeating a phrase, I want to avoid playing it the same way each time. But the differences can’t be too great otherwise no one will have a sense of the same phrase played differently; in other words, a variation. In order for B to be perceived as a variation of A, there has to be a way to make a comparison between A and B. The musical concept of a “variation” does not really apply to two things that are completely different in every way.
    Let’s think about composing or improvising variation as a situation in which you make choices about what changes and what stays the same. This is something you can do with computer algorithms. More specifically, you can make a computer do something that at one level sounds “the same” but at some other, perhaps finer, level of detail, never actually repeats. I confess I am obsessed with the sound of what could be called repetitive non-repetitiveness.
    When making something that is both repetitive and non-repetitive, it really helps to put controls on the amount of variation itself. In slightly more Max-like terms, I’m talking about how much randomness you apply to a parameter. I start with the expectation that there is no perfect “amount of randomness” but instead there can be a beautiful evolution of that amount that someone could perform. The amount I like right now is very much based on the amount I heard a moment ago. What I strive to hear is something that sounds like the same thing, even though it is constantly changing, and on top of that, feels like it is going somewhere in a way that sounds like a journey.
    My inclination with algorithms has always been to avoid treating computers as substitutes for musicians, because the difference between people and machines for me always comes down to something I would call appropriateness. A machine, left to its own devices, will always play too loud, or not loud enough. It will play too many notes or it won’t listen very well. It is like that guest at a party who makes you cringe. But it can be really amazing at providing the raw material for you to shape -- and as a performer, you can supply the appropriateness. In other words, instead of trying to build a machine that writes or performs 100% of the music, you build a system designed to be driven to produce the music. In the same way that you would probably be highly stressed to get on stage without any way of controlling your volume level, I would be stressed to perform without access to high-level controls on the algorithms I use.
    Providing a control on the amount of variation is an idea you can apply in many ways. If you are going to be driving this control, you will want the changes you make to be perceptible within a sufficient amount of time for you to use the feedback to figure out what to do next. As a rule of thumb, that’s probably a maximum of two to three seconds.
    In the presentation I gave with Tom Hall at Loop in 2018 as well as the accompanying Max 8 patches, we tried to demonstrate how variable variation could be applied and controlled at many levels, including timbral microstructure, granular sampling, variable effects parameters, and finally notes created by delay effects.

    Multi-channel audio as creative space: Inside Max 8’s MC | Loop

    The introduction of MC in Max 8 made some of these ideas much simpler to explore within the space of sound design. Here is an example in which a number box varies the possible range of frequencies of dozens of sine waves around a central constant value.
    If you just set the number box controlling the amount of a deviation to a specific value, it sounds somewhere between a pure tone and noise. It’s more interesting if you actually move the slider…and then keep moving it. And I would claim it’s more interesting if you move the slider yourself than if you listen to someone’s carefully composed moves of the slider.
    As time moves from left to right, the amount of variation increases. A variation control does not specify a particular value; it describes the size of the range of possible values.
    As time moves from left to right, the amount of variation increases. A variation control does not specify a particular value; it describes the size of the range of possible values.
    Some people would say that a system like this is a kind of instrument. But I think of it as a way to make “a sound” as I have tried to define it here. For me, an instrument implies a need for incredible levels of precise control. Musical instruments vary dramatically in the nature of this control and where you need to apply precision. This deviate slider is not precise in the same way; the fuzziness of what it does relates to a sound I want to make. It expresses a musical idea. If I look at a saxophone sitting in a stand, I do not see musical ideas. I see years of practice ahead of me!
    If you come from more of a Western symphonic musical tradition, you might say that I’m talking about something that is more than a note and less than a piece. For me the space that is slightly more than a note is where I am trying to find my sound with algorithms. Max Mathews once told me that he thought “improvisation algorithms” were more interesting than “composition algorithms.” He went on to specify that the design of an improvisation algorithm would always include some form of performance control. In other words, improvisation is not the thing the computer does. Improvisation is what the computer is enabling you to do.
    Download the patches used in the MC presentation:

    • Apr 15 2020 | 5:47 pm
      Max Mathews once told me that he thought “improvisation algorithms” were more interesting than “composition algorithms.”
      Brilliant article! Been craving a closer look at these patches ever since i saw the presentation awhile back. Thanks for sharing(especially for the dubstep effect 😋😜). 🙌👏👏🙌
    • Apr 15 2020 | 10:14 pm
      all too good, thanks! the patches are special
    • Apr 15 2020 | 10:18 pm
    • Apr 17 2020 | 9:11 pm
      David, thanks for this beautifully eloquent insight.
    • Apr 27 2020 | 12:31 am
      David, speaking of control on the amount of variation . . . any chance of reviving UpBeat for the 21st century? There's still nothing like it these days . . .
    • Apr 28 2020 | 3:55 pm
      Very interesting to hear your thoughts about algorithm in music. I've been building a web platform for algorithmic music at tweakable.org, with some similar ideas... I would love to know what you make of it !