..

3-minute Algorithmic Etude

I was tasked with writing a 3-minute etude using algorithmic techniques in Max and Ableton Live. I’ll be discussing the Max devices I wrote and used for this piece, and how I took advantage of them while composing. I didn’t go into this project with a clear idea of what I wanted to do, so it ended up being quite experimental and abstract.

Section 1

Firstly, I wrote a random MIDI arpeggiator that utilises tendency masks to determine what keys to play from given chords. It splits the current notes being played into bounds for a random number generator to choose from. For example, if you play five notes at once, the lowest note will trigger if the RNG spits out a number between 0 and 0.2, the second note will trigger for 0.21-0.4 and so on all the way to 1.

There are two dials which control the range of the random values being generated, essentially acting as a tendency mask when automated. You can also adjust the speed at which it picks a note. Here’s how one of the tracks using it looks in Ableton, as an example:

Ableton Live track view

Here you can see the original chords with the dial automations overlaid, and beneath is the outputted MIDI. Can you see the resemblance of the shape? With the right synths, this effect can sound pretty magical.

MIDI output from the arpeggiator

See inside the Max patch:

Max patch for the arpeggiator

Referenced forum posts in comments: 1, 2

Subpatches:

Max patch for ‘bounded_random’

Max patch for ‘scalar’

I put the same arp on three layers, all using the same tendency mask too. One is an Analog Lab V patch called Beauty Harp, one utilises the Karplus-Strong algorithm and the other is an FM synth (see above). I’m also using a second FM synth, but with this one I set the harmonicity very high and attached the modulation index to an LFO. The outcome is a sort of semi-tonal sweeping noise generator? If you listen carefully, you can hear it several times throughout the track.

Section 2

My focus was completely flipped after I completed the first half of the piece. Where at first, I was using the generative components to compose, this time I just used them to add texture and variation.

Introducing: The Rand-O-Drummer! This device utilises a seed to generate a random repeating drum pattern. It does this by running two metronomes: one for picking notes and one for reinitialising the RNG seed on every bar. Note velocity is chosen using Lehmer’s linear congruence formula, which basically creates repeating patterns.

Rand-O-Drummer

See inside the Max patch:

Max patch for the Rand-O-Drummer

Subpatches:

Max patch for ‘bounded_random’

Note: I did not make this subpatch, it was provided by my professor.

Perhaps it is my lack of experience in Max, but my devices never tend to work quite as I had hoped. In this case, the drummer rarely stayed in sync with the Live project, so I recorded its output to a new MIDI track instead of relying on the device.

MIDI output from the Rand-O-Drummer

Finally, I attempted to use Markov chains to generate a melody. To train it, I used random notes from the chords of the piece. What you see in pink is the training data, and in green is the subsequent generated melody. The drummer adds random noises here and there to make it a little more interesting, and the synth playing the Markov chain’s melody adds a lot of depth.

MIDI output from the Markov chain

See inside the Max patch:

Max patch for the Markov Responder

Note: This patch was partially made by my professor, and I was tasked with completing it.

Subpatches:

Max patch for ‘basic_markov’

Max patch for ‘random_bag’

Note: Random bag was provided by my professor.

Conclusion

I had a lot of fun making this piece. It was a great opportunity to try out some new techniques and devices in Max, and I’m very happy with the result. If you’re interested in listening to the full piece, you can find it here.

And as if you hadn’t seen enough screenshots already, here’s a final one showing the full project in Ableton:

Ableton Live project view

Thanks for reading. If you have any questions or feedback, feel free to leave a comment below.