Algorithmic Processes & AI

Moving away from purely sound-based patching, this page features a number of algorithmic patches designed to output data and lists which can control synths and other audio patches. A number of them are designed to eventually work together to form a rudimentary AI system capable of generating complete music tracks at the touch of a button. Most recent work includes attempting to build a neural network entirely within Max.

  • Melody Generator

Quite an old patch, but it allows for quite a lot of different outputs depending on the settings chosen, including melodies of different lengths, in different keys and modes, and probably-based intervals layering on top of the base melody. May need some updating to work properly with synths that expect note-off messages.
Download

  • Key & Chord Selection

This patch is part of a series currently in development, with the intention of creating an all-in-one digital composer, capable of generating and outputting entire finished pieces without continuous user interaction. This patch in particular will select a sequence of 4 chords and a key signature to base the main structure of a piece around. The probability-based choice system selects the chords based on information regarding relative chord progressions in popular music, taken from hooktheory‘s database on the subject and input manually.
Download

  • Voicings & Chord Generator

Leading on from the chord selection patch, this next patch will assign a voicing to each chord in the sequence as it comes in, and can then play the chords back in one of a set number of rhythms. These rhythms are pre-determined and currently fairly limited, but can be expanded in the future and may even be algorithmically designed at some stage. The patch sends out MIDI pairings for use with any polyphonic synth.
Download

  • Timing Control

This control patch will define and generate the entire structure of a piece (in theory this will be the first in a chain of generation patches within the algorithmic composer) in traditional format, with Verse, Chorus, Bridge etc. Using a transport object and a series of connected timepoint objects, the patch will then output numbers to represent the transition to any given section, which will in turn control the instrumental elements of the composer directly.
Download

  • Factorial Function

Despite having various objects and functions for calculating and representing complex mathematics, Max does not seem to have a factorial function. For anyone wishing to calculate binomial expansions or other formulas involving factorials, this patch should help.
Download

  • Algorithmic Composer Demonstration

A brief demonstration of the first draft of my desired Algorithmic Composer, which is designed to produce House music at the touch of a button. Future work to be completed mainly involves tying this in with the structuring work I have done previously, in order to generate entire finished pieces as opposed to snippets like this. If you try this out, the drums will need to be linked to your own samples (if you have them). Enter the ‘Polybuffering MK2’ patch and follow the instructions.
Download

  • Algorithmic Music Box

A simple algorithmic implementation taken from this video: https://www.youtube.com/watch?v=3Z8CuAC_-bg
Simply select a starting note and two note length values. The system will begin looping ascending notes, alternating between the two note lengths when more than one note is played at the same time. Try experimenting with the values and do watch the original video!
Download

  • Neural Networks Part 1: Our First Neuron

The first in a series on Neural Networks in Max, in this tutorial we build our very own neuron, able to read a set of training data and learn to recognise a pattern. More to come!
Download

  • Neural Networks Part 2: Abstracting the Neuron and Troubleshooting

In this next Neural Networks tutorial, we take our Neuron patch and turn it into a standalone object with a dynamic number of inputs.
Download

  • Neural Networks Part 3: Building the Network

We take our neuron abstraction, make a couple of different versions of it and build them together into an actual neural network!
Download

  • Neural Networks Part 4: All About Layers

Just like onions and ogres, neural networks have layers! In this tutorial we abstract those layers and do away with all the previous labour-intensive work building and connecting each neuron.
Download

  • ml.markov Tutorial Part 1

Markov Chains are a powerful Machine Learning technique, and with the latest update, Benjamin Smith’s ml.star library for Max/MSP includes an ml.markov object for easy implementation. In this first tutorial, we work through the help file, understanding how and why the object works, then expand on it and use some more complex MIDI files to generate interesting musical output.
Download

  • ml.markov Tutorial Part 2

Returning to our Markov Chain patch, this time we expand on the previous work and enable time-based learning of MIDI data!

Download

  • ml.markov Tutorial Part 3

The MIDI-trained markov chain is back and better than ever! Now with a full user interface and various additional features, in this video you will learn to quickly and easily generate new music from existing MIDI files, combine various harmonic and rhythmic aspects of different pieces, and even run multiple sets of markov chains to learn from several instruments at a time.

Download

%d bloggers like this: