Recurse Games

Procedural Music in Beatroot

February 25, 2018 | View Comments |
|

Beatroot is a program that procedurally generates music. It was made in 1 week as part of PROCJAM, and sounds like this:


Because it was made in such a short time, there areXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

How it works

Beatroot follows a series of steps, based on music theory, to compose its music. The same steps could be followed (roughly) by a human composer. Abundant Music is my favourite example of this approach. Alternatives include training Neural Networks to imitate existing music (example), or generating notes from random/mathematical systems (example).

Chords

First, we randomly select a tempo (speed) and scale (a palette of notes commonly used in music). Modes (types) of scale used include Major and Pentatonic. Each has a distinct sound, with things like Phrygian Dominant sounding more ‘exotic’.

Using notes from the scale, we randomly create a palette of chords (groups of notes played at the same time). Beatroot only uses triads (groups of three notes, often referred to with roman numerals I to VII), but others could be added (I didn’t have time to try this out). A palette might look like this:

Beatroot chord palette

Chords have a random chance of being inverted (like IIIc), or grouped in ordered pairs (like I-VI).

Each composition has a random probability of applying different mutations to its chords (e.g., using notes from other scales, increasing/decreasing individual notes, etc.). This is intended to make compositions sound more distinct (whether it actually does is an area for further investigation).

Chord Progressions

A chord progression is a series of chords. Certain

Using chords from the palette, we create a random set of chord progressions (e.g., V-II-VII-IV). We start with the final chord (usually I), then choose the chord before that, and the chord before that. We become more likely to ‘stop’ (i.e., choose the starting chord) after reaching a reasonable length or on certain chords (V, I, VI, or IV). Certain chords are more likely to precede others XXXXXXXXXXXXXXXXX

Further Reading

Tero Parviainen’s How Generative Music Works is an excellent introduction to the field.

Christer Kaitila’s Procedural Music Generation tutorial

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Like/retweet prior to post: https://twitter.com/xiotex/status/918786568076316673 https://twitter.com/akirassasin_dev/status/898912394524610561 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

comments powered by Disqus