
Algorithmic Composition: How to Make Rule-Based Music

Algorithmic music has been around longer than you might have guessed. Ever since composers started writing music on paper, many have wondered how randomness and mathematics could be applied to their writing process.
Whether it was Mozart rolling the dice to compose melodies or other composers using cards to compose traditional dance music formulaically, algorithmic thinking has been used in composition for a long time.
However, with AI music generation tools transforming the music production landscape, more composers and producers have been introduced to the concept than ever before.
So if you’ve ever wondered what it looks like to use algorithms and mathematics to compose music, this article will take you on a beginner-friendly tour around the world of algorithmic music composition.
Let’s dive in!
What is algorithmic music composition?
Algorithmic composition uses tools like mathematical rules, random chance and even AI to produce entirely new musical works.
There are many ways algorithmic composition is used to create music, whether by applying algorithmic concepts to write sheet music or by using computers and synths to apply algorithms and generate sound.
Types of algorithmic composition
Algorithmic thinking in music composition can be categorized into four distinct categories:
- Random
- Rule-based
- AI-based
- Hybrid
Let’s explore each type of algorithmic music composition in more detail.
Random
Random algorithmic music composition (or stochastic composition in academic circles) employs randomness to generate note selection, arrangement and rhythm to generate new compositions.
In its simplest form, randomness is applied to composition by using chance, like a die or random number generator.
But modern synthesizers can also produce randomness by using sample and hold circuits to capture seemingly random voltages from a noise oscillator.
For example, sample and hold circuits were used on the legendary ARP 2600 synth to produce the bleeping and blooping sound of R2D2 in the original Star Wars films.
Today, computers, of course, can also generate random numbers, and programs like Max for Live offer many modules that generate random notes, rhythms and arrangements.
Similarly, there are many modular synths built with sample and hold circuits for introducing elements of randomness into modular synth builds.
Rule based
Rule-based algorithmic is arguably the opposite end of the spectrum when it comes to algorithmic music composition.
Instead of using randomness, it employs a set of rules to define what an algorithm can do to create a new piece of music.
For example, Euclidean rhythms use math to describe and create unique, interesting-sounding polyrhythms.
Or in another example, FM Synthesizers use algorithms to place layers of modulation on basic sine or square waves to create wholly different and often metallic synth sounds.
Hybrid
Strictly using rules or randomness is often too limiting, which is why a lot of algorithmic music combines a hybrid of both random and rule-based composition methods.
For example, limiting a random note generator to only produce notes from a specific scale and using a Euclidean rhythm sequencer to produce random rhythms with those notes is a great hybrid between randomness and rule-based composition techniques.
AI based
The latest developments in algorithmic music primarily focus on AI-based music generation.
AI music generation comes in many forms.
Whether it’s the controversial AI-song generator tools that have taken the music industry by storm, or AI vocal tools that can change and morph voices into any sound a producer wants.
AI-based algorithmic music generation isn’t limited to song or vocal generators.
Interesting plugins like SynPlant or Synthesizer V employ algorithms to generate entirely new synth and vocal sounds, and arguably they do so using ethical standards and licensed vocals.
Chord generating plugins like LANDR Composer also use algorithms to generate entirely new melodies, basslines and chord progressions.
In general, AI has taken the complex mathematics, randomness and synthesizer circuit routing out of the learning curve, making it much easier for producers to dive into the world of algorithmic music.
How to create your own algorithmic music
There are many synthesizers, tools and software plugins that producers can use to make algorithmic music in the DAW.
Let’s explore each in more detail.
Impose practical rules and limitations
The first and most obvious way is to apply rules and randomness to your music-making process.
Many producers find that working within a set of constraints actually makes it easier and more fun to get started on new ideas.
They may not realize it, but in a sense, adding constraints has its roots in an algorithmic approach to writing music.
So limit yourself to a certain scale, introduce randomness into a note sequence, even the process of adding set arrangement structures with sections and bridges invites in algorithmic-like ideas to your music.
At the end of the day, most music follows a certain formula—chord progressions, note selections, rhythm choices or arrangements can all be seen inside in an algorithmic sense.
So if you’ve already made music, you may find it easier to apply algorithmic thinking in your music-making process than you realize.
Ableton Max for Live
Ableton’s Max for Live feature might be the best and most intuitive place to start if you want to dive into the more complex aspects of algorithmic music making.
If your goal is to create self-composing synthesizers on a budget, there are plenty of user-made modules and instruments you can download for little to no cost in some cases.
Or you can even learn to code algorithmic machines of your own using Max MSP inside of Max for Live.
If you’re curious, there are entire communities online that are dedicated to building instruments, sharing them and discussing algorithmic music composition inside of Max for Live.
Randomizer plugins in your DAW
Aside from Max for Live, which interfaces exclusively with Ableton, there are plenty of other plugins for algorithmic composition that work with any VST-compatible DAW.
These plugins can generate chord progressions, create Euclidean sequences, or arpeggiate notes mapped to a chord or scale.
Some great algorithmic composition plugins to check out include:
But even without these plugins, most DAWs come with arpeggiators, sequencers and random LFOs that can introduce algorithmic elements into your music compositions.
It’s up to you to both experiment with the tools you already have while applying algorithmic thinking to your music production process.
Program your bleep-bloop bot
Algorithmic music composition, while rooted in historical practices from Mozart’s dice games to early mathematical approaches, has been dramatically reshaped by modern technology.
Today, with the rise of AI and advanced software, creating rule-based music is more accessible than ever.
Whether you experiment with randomizers, rule-based systems, AI tools like LANDR Composer, or hybrid approaches, understanding algorithmic thinking can unlock new creative avenues in your music production.
By exploring the vast array of available plugins and even your DAW’s built-in features, you can begin to integrate these powerful concepts and push the boundaries of your compositions.
Gear guides, tips, tutorials, inspiration and more—delivered weekly.
Keep up with the LANDR Blog.