Tutorial : generative music in Ableton Live

Generative music in Live

Here is a brief tutorial on making generative music with Live. This tutorial first appeared on the Ableton Live Forum, in 2007 – so the examples were made using Live 6.07  and will work with any version of live later than that.

What is generative music?

Generative music is where you provide logical or programmatic ‘seeds’ and the computer grows you some music based on the parameters you set out, Brian Eno is probably the most famous practitioner.

Feeling lazy?

Here is a LivePack to download with four examples of varying complexity.

Download the Live Pack

Why make generative music, or get Live to make music for you?

Generative music is a different beast from making a track of your own, it is more like planting a garden. In fact a generative piece is like a glorified wind chime, so we could equally ask ourselves “why do people have wind chimes rather than stand in the garden hitting aluminium themselves?”  The answer would be the same – the sounds which result may not be “music” but they can be good background noise and in that way quite beautiful and surprisingly interesting as ambience, furthermore the underlying generation can be tinkered with to deliver a wide range of what appears to be expression. A generative piece will sustain a low level of interest for hours!

Live is quite a good environment for creating generative music and I have two methods to do so, an audio based method and a midi method.

I will focus on the more midi-oriented method here.
There are limitations to how far you can go with Live and generative music, but what you can achieve is entertaining.

How it is achieved in Live

To make generative music we need to make Live play or do something whenever a condition is met, we get flexibility by giving the program some freedom. Instead of saying “EVERY time a bar starts play a C minor chord”, we want variation. An example might be “Sometimes play a chord (from a selection of chords) on either the first or third beat, and if you do then perhaps play one of these ralated chords after it, or perhaps think about playing this tune instead”

So now we have a random event which is constrained by a limited set of outcomes, it sounds passably like music.

Tools of the trade

Midi Devices

  • Random – to generate random pitches
  • Scale – to make those pitches be less random
  • Velocity – to make random note start triggers
  • Pitch – to transpose phrases chords and notes
  • Note Length – to give variation to the note length
  • Chord – a variety of uses

Audio Devices

  • AutoPanner – can be used for ‘cross-fading’ between one component and another
  • AutoFilter – similar but different
  • BeatRepeat – repeating random stuff makes it sound like you meant it!

obviously the other Live devices such as Reverb get used, but the above are the ones that are strictly ‘generative’

Getting started – ‘plinky plonk world’

Lets make a bad start!  Drop a Midi instrument on a track so you can hear what is happening during the exploration process, use a simple patch like an electric piano (or a Simpler with a triangle wave in) and give it a long release. At the start the output will sound pretty dull, trust me it gets better.

we need a timing pulse to begin with, I use a single midi C3 note in a session clip, I loop this on a quarter bar.
This gives me a nice regular trigger at a 120bpm for the random events to take their cue from. Like this …

midi

That’s all the midi programming we will need done!   Next we need to make that ‘trigger’ random, to do this we use the Velocity device. Actually two velocity devices, like this

Generative conditional if-gate

The first takes the incoming repetitive note and randomizes the velocity.
The second one only lets notes through which fall in the selected velocity range.

This is the core concept of how we will select and filter random values in Live. How we can decide “do I do something, or not?”

In the image that range is from 0 to 59. You will see that I assign the range to a macro called ‘chance’. Try this, it will soon become apparent what ‘chance’ does.
Remember to set the Velocity device to ‘gate’ mode.

You might notice I also set the ‘random’ high on the second Velocity – this is so that further down the chain I have a ready made scattering of random values to make use of for further filtering (you’ll see!)

Now we need to make the pitches change, the most brutal way is to use the Random Device, simply dropping it in the rack after the Velocity section will give you an annoying random ‘tune’.

Give it some pattern with the use of the Scale plugin, choose a nice preset or set your own if you know how … and there you have your first very basic generative thing. A bit shit though isn’t it. It plays random notes, they have random pitches which conform in a brutal way to a scale. It’s a start. It’s hardly music though.

Generative music if-gate repitching

Make it sound more interesting

There are a few things about our example above which make it a bit dull, unpleasant and it just .. well, un-interesting. It sounds very machine like in its random nature rather than musical, there is no tonal variance such as there might be in a human musical peice, there is no sense of drama, no sense of space or *cough* ambience. If we can simulate any of that, it would help.

Conditions of Interest

We used the velocity devices to set a ‘condition’, if the value is within a certain range the note sounds. We can expand this to become what programmers know as an ‘if – else’ conditional.

Generative conditional-if-else

Here we set two ranges, one produces one outcome, the other will produce another outcome.
This can help us get some drama and tonal variance in there, for example: by allowing any (random) value between 60 and 70 to trigger one chord, while anything between 70 and 80 might trigger a different chord.

Those are ‘conditions’ , when a condition is met an action is taken. To a programmer this might read as if (var>60 && var<70) { do this } else if(var>70 && var<80) {do that}

We can make our piece more interesting by cascading the variations, or to put it in English ” if the value is between 60 and seventy then do either this chord or that chord, if you do that chord then consider these further three variations”

A second choice of conditions follows the first, cunning use of these cascades provides potentially musical output.

Cascading The Variations .

You saw how I set a ‘condition’ with two Velocity plugins, and how we can set two different outcomes using ‘if – else’. Now imagine dividing the random values up into many zones, this way you can create little themic areas.
You can start to go further down the fractal tree, each conditional zone can have a new random value generated to make new notes for itself. Each ‘conditional zone’ can be a different part of your song. The ‘riff’ , the ‘bassline’ , the ‘chords’ . Each of them can watch a zone and do some more complicated ‘riff’ or ‘chord’ related actions anytime that rack is triggered by the main condition.

Here we have the zones of a random seed divided into themes

Generative branches

and in this example the watched zones are further divided to play notes of a riff, each riff note is also conditional. The cascade effect first decides if a note should play on a particular beat and then it decides which note from its small pallet of notes. Out of view here, a further conditional decides whether to transpose the eventual riff.

riff

This is making my brain hurt!

Although this sounds very technical, in fact (if you are anything like me) you will simply set up a few conditions and then add stuff where it seems right, until it makes a nice noise. Once you have an idea of the basic principles you can simply sculpt or garden yourself a tune in an ad-hoc manner. You will notice that my example files aren’t exactly exemplary of order and fore-thought.
But it certainly helps to have some kind of plan!

I think that’s enough to absorb for now.
So, here are some example files

Examples

  • Zawinul – a complex peice which should sustain a lengthy listen
  • Harpist – an example of riffs riffing away
  • Experimentaloid – a more simple example
  • Infinity Plus one – more of the same.

Download the Live Pack