Predictability, Surprise, and Randomness in music.

Satisfying music balances predictability and surprise.  Our minds are trained to know what event comes next in music. If you listen to 100 folk songs, the sequences of chords and rhythm all have a logic that sounds good to the ear.  When someone writes a new song, they’re essentially starting with a chord and then using their ‘music recognizer’ to suggest what comes next.

But music that is entirely predictable is trite and boring. You want to hear something unexpected from time to time. The genius of Western classical harmony is that when you drop in a note that’s unexpected, possibly dissonant, there are available harmonic resolutions that ‘add up.’  So you get a surprise but it’s followed with something that’s expected.

There’s another dimension besides Predictability & Surprise: Randomness.  Random sources are a fundamental component in modular synthesis.  You can connect a noise source to a sample & hold module, and it will pick out random values every time you trigger it.  It frees you from having to think the notes up yourself. It’s an endless source of novelty.

The problem with purely random sequences of notes or rhythms is that they can sound arbitrary and devoid of authorial intention.  A good composer will make music that is imbued unmistakably with their personality. Random sequences do not have that intentionality and personality.

Random input into music is not entirely useless.  If you start out with something predictable: a 2 bar loop that repeats, you can add some precise with, for example, randomly modulating the filter cutoff. You hear the same notes in the same rhythm but the timbre changes continuously.

Never doing anything by half, I often patch in many random modulations into a patch.  For example I’ll take a sound sample and slice it to pieces, then chose slices at random to play back.  Then process the signal with a bandpass filter that’s also randomly modulated.  But the trigger driving the sampler – selecting each new slice and filter cutoff – will come from a regular clock.  So there’s some rhythmic predictability that interacts with the constant surprise.

It helps me make the music I want to make.  The random inputs into the music seem to rhyme with the way randomness affects my life constantly.  Paradoxically, when you steadily inject randomness into your music, it has it’s own predictability.  The ear expects the randomness, and it inverts the role of surprise in the music. It’s surprising when the random process produces something that the ear might expect, based on our inborn and learned intuitive knowledge of music.

There’s another layer to how randomness works in music: the human mind and senses are adapted to finding patterns in chaotic input.  This is valuable for survival. If your eye can catch the twitch a black tail in a tree tossed by the wind in low light, you can avoid being attacked by a panther.  But when presented with truly (or mostly*) random input, your mind will find pattern in it.

This all means – to me at least – that randomness isn’t inimical to musical expression, but can add to it.   When one adds randomness the process of tuning it’s effects adds an intentionality to it’s action on the music.  Maybe in how a composer tunes the randomness can be a conduit for the composers personality as much as their choice of notes and rhythms.

Groove, Metastability and Randomness

[audio:http://www.cornwarning.com/chaircrusher/Chaircrusher-TestPercussionGroove.mp3|titles=test percussion groove|artists=chaircrusher]http://www.cornwarning.com/chaircrusher/Chaircrusher-TestPercussionGroove.mp3

bazille
This is a recording of two loops playing in Ableton Live. One is a percussion drum rack, the second is the U-He Bazille instrument run through several effects.
This loop plays the same notes, but will never actually play the same one bar sounds twice, for two interlocking reasons.

First, both instruments go through a gate effect, which is adjusted so that the threshold is at the point of metastability, meaning that it spends most of it’s time on the cusp of closing and cutting off the sound.

Second, the Bazille patch uses random LFOs to modulate the levels of two oscillators as they modulate each other. On top of that, each of the two random LFOs is modulating the rate of the other, and the cutoff of a low pass filter through which the resulting signal passes. This accounts for the filtered noise sounds continually changing sound.

In addition, the two MIDI clips driving the sounds are modified by two different groove timings.

So the loop never repeats, and yet it also stays the same. The variety of the loop has musical value — in the same way (but not equal to) a human drummer adds vitality and interest to a repeated drum pattern with micro-variations of timing and dynamics. And the repetition of the loop has musical value, in the way a groove can entrain the listener’s mind.

It’s the wisdom of Heraclitus embodied: “No man ever steps in the same river twice.” It’s the same and not the same. Though I’m neither as wise as Heraclitus nor as musically talented as a significant percentage of humanity.

Using Random Processing in Ableton Live

There are two things that I’ve done consistently for 18 years I’ve been using a computer to make music is to experiment with random processes to generate something musically.

EXAMPLE ENSEMBLE: http://www.cornwarning.com/xfer/AbletonLiveRandomizeExample.zip

Ableton Live has a ton of effects. People spend a lot of time and money (or time looking for W4R3Z, which imho is wasted) to find third party VST instruments and effects to give them a palette of sounds. But before you go crazy buying and downloading stuff, it’s a good idea to fully explore the stuff built in to Live.

The Live MIDI effects are an under-utilized resource for creative sequencing, and the MIDI effect rack I’ve built does something that is to me really inspirational: It takes a stream of midi notes and randomizes their pitch and velocity.

That doesn’t seem like much except for this particular context: If you have a drum rack after this MIDI effect rack, when a MIDI note occurs, it adds a random offset to the note number, and assigns a random velocity. If you load a drum rack with an assortment of sounds — in the case of my example, latin percussion samples — it will generate endless variety of drum patterns with continuously changing accents.

From left to right the components of this rack are

  1. Pitch Effect. Adds a fixed offset to incoming notes.
  2. Random Effect. Adds a random offset to incoming notes.
  3. Velocity Effect. Randomly changes velocity of incoming notes.
  4. Velocity Effect. Filters out notes with velocity outside the range lowest to lowest+range.

The actual rhythm is determined by the note pattern that’s playing in the current MIDI track. This is cool because you can use groove templates on (for example) clip with a steady stream of 16th notes, and the output of the rack will follow the groove template. Every time a note is triggered by the clip, a random offset is added to the pitch, which has the effect of choosing a different drum sound, with a random velocity.

The Macro controls on the left side give you control over various parameters.

  1. Lowest: notes with velocities below this value won’t play
  2. Range: notes with velocities above Lowest+Range won’t play
  3. Pitch: Constant offset added to incoming note numbers
  4. Rand Velocity: How much randomness is added to incoming note velocities

Here’s a use case: If you play the third clip in the KW Conga track in the example ensemble, it is a steady stream of notes with a pitch of C1, which in my drum rack corresponds to the first sound. If you don’t want a hit on every 16th note, turning up the Lowest knob will discard notes with low velocity, and turning down Range discards notes with higher velocity. You tune the velocity range with these two knobs to thin out the incoming stream of notes by discarding some of the lowest and highest velocity notes.

The Pitch knob is to get around a limitation of the Random MIDI effect — it only goes up to a maximum offset of 24. Since I have more than 24 sounds loaded in the drum rack, in order to play any of the sounds more than 2 octaves above C1, I have to add an offset. You can also play this knob — or automate it — to change the set of sounds played by the incoming notes. In this particular rack, all the flams are at the top of the drum rack’s note range, so if the Pitch knob is below 8, you won’t get any flams.

The Rand Velocity knob, if turned to zero, doesn’t change incoming velocities at all. This would be useful in the case where you want the Velocity of the Groove template to determine note volumes.

All this is harder to explain than it is to use. Try downloading the example ensemble and fiddle with the knobs, and I think you’ll find that there’s an intuitive feel to using this effect rack. The main thing you need to start with is a drum rack — like the conga rack in the example — driven by clips usually consisting of C1 notes, which is the default lowest note for drum racks. The more sounds you add to your drum rack the more useful the pitch knob will be; if you only have 24 sounds, turning up Pitch will just cause notes to be sent to empty slots in the drum rack.

And if you don’t want to just let this sort of constrained randomness do its thing forever, you can record the output of the MIDI rack in another MIDI track, and then choose a few bars to loop, or find the 4 bars that’s almost perfect and tweak it a bit.

This sort of technique isn’t limited to drum sounds. If you’re using this rack with a pitched instrument it will do something random, and perhaps useful. With a pitched instrument, you can add a Scale Live MIDI effect, in order to constrain the notes played to the scale of your choice.

And that’s only the beginning of what you can do with effect racks. Live’s MIDI effect racks have the same ‘multi-chain’ feature of Live Effect and Instrument Racks — you can set up different chains of MIDI effects and use the Chain Select control to choose between them. And once you add in Max For Live MIDI effects, things can really get crazy.