Wednesday, 31 January 2018

Constraint-driven modification grids in asynchronous drum timing generator

The latest update to ProbablyGEN adds constraints to the grids, so that you can now control where beats can be placed (when editing manually) or where beats will be modified automatically using the 'every so many bars/seconds' auto modification system. The new grids are more intuitive and look sparser because of the 'missing' unavailable (locked) cells, and the previous preset 'Generative' pattern creation has been replaced by a completely flexible user controlled technique using the constraints. The previous 'Generative' functionality is now superseded and will be removed in a future version.


The grids in previous versions were not constrained in any way, and so you could put white 'active' cells anywhere in the grid. If you leave the grids in 'Edit' mode, and never set any constraints, then this version will behave in exactly the same way as the previous versions.

But if you select 'Lock' mode, then the whole grid will change to show the 'constraints' and will be filled with white cells the first time that you go into 'Lock' mode.

 A white cell indicates an unconstrained cell. If you remove the white then the cell becomes 'constrained', (unavailable, locked...) and it will not be available (or visible) in the grid.

If you click or drag in the grid, then the cells will no longer show white, and the cells will no longer be available or visible. You will see the effect when you change the mode back to 'Edit' - all of the cells that were not left as white will have vanished, and you will not be able to put a white cell in them - and neither will the automatic modification options: Gen or Rnd.

The first thing to try is to remove all of the cells beyond the current length: 16 in the example shown on the right.

Here are constraints similar to the ones used in the 'Gen' generative functionality from previous versions. The lowest track (the 'Bass' drum track) just has four vertical bars on the beat, whilst the next track up (the 'Snare' drum track) has off-beat vertical bars, with extra time spreading for two of the off-beats. The top track (the 'Hi-hat' drum track) has busy 8th note vertical bars followed by a final block at the end of the bar.

Remember that these white cells are just setting the constraints - they are not related to the probability controls that are present in 'Edit' mode.

Constrained patterns

You can see the result of setting the constraints grid when you go back into 'Edit' mode - the previous all-white cells now go back to the usual dark colour, and you can now manually add white cells wherever you want in the cells that are visible. All of the other cells are now 'locked' and aren't visible.

 The way to think about the use of the white cells in the constraints is that when you go into Lock mode, you want to have white cells wherever you want to be able to put white cells when you are in Edit mode.
 The per-track 'Change' controls allow you to set the effect of the 'Rnd' auto modification function. If Change is set to 0, then the random changes to the grid will (over time) not change the number of white cells. This isn't exact, and so you may not always get exactly the same number of white cells  present in the grids.

If you set Change to a positive number, then the amount of change each time the automatic modification happens will reflect the setting, and so for the maximum value of +20, then up to 20 of the cells might be changed to (or from) white. The three previous screenshots show the effect of four values of Change on what is inside the grids. The bottom track changes the least each time, which is okay for a bass drum, whilst the top track has the most changes each time. If you set Change to +20, then there will be a lot of changes to the white cells (and the grid may fill up over time), whilst if you set Change to -20, then there will be a lot of changes every time, and the grid may well empty over time.

The automatic modifications functionality has also changed slightly - you can now select '1' bar as the time interval, which means that you can now have a new random pattern every bar, if you want. Previously, the shortest value was 2 bars.


The constraints system is well worth spending some time learning. It allows you to have very precise control over the way that beats are generated, and can also speed up entering frequently used patterns like the bass, snare and hi-hat examples shown above.

Constraints allow you to disable the lowest 'dark' row of the grids by removing the white cells in that row when in 'Lock' mode. This means that you can no longer have a way of setting a single drum event with 50% probability - you can put two white cells in the grid above the lowest 'dark' row and they will happen with 50% probability.

The 'Unlock' button...

The lowest button for each track is the 'Unlock' button. This serves exactly the same purpose as the 'Clear' button at the highest position in the track layout, except that it works on the constraints. If you press this button then all of the constraints will be removed for that track, and when you select the 'Lock' mode, then the constraints grid will have white cells everywhere. There is no way to undo pressing this button, so be careful!

There is no way to undo the 'Clear' button either - it clears all the white cells in an ordinary 'Edit' grid.

The probability grids

As a recap, here's how the probability grids work in ProbablyGEN. Watch out for the lower dark bar!

Highest velocity happens 100% of the time.

Highest velocity happens 50% of the time. Upper middle velocities happen 50% of the time.

The Upper and Lower middle velocities each happen 50% of the time.

The Upper middle, Lower middle, and Lowest velocities each happen 33% of the time.

The Highest velocity happens 50% of the time. The Lower middle velocity happens 50% of the time.

The Highest, Upper middle, Lower middle, and Lowest velocities each happen 25% of the time.

The Highest velocity happens 50% of the time. No note event at all is generated for 50% of the time.

The Upper middle and Lower middle velocities happen 66% of the time. No note event at all is generated for 34% of the time.

The Highest, Upper middle, Lower middle, and Lowest velocities each happen 20% of the time. No note event at all is generated for 20% of the time.

Downloading ProbablyGEN 0.05

You can download ProbablyGEN 0.05 for free from

Here are the instructions for what to do with the .amxd file that you download from


Original blog: version 0.02: Complex timing generator for Max For Live in Ableton Live

Update: version 0.04: Asynchronous timing generator for Max For Live in ...

Monday, 22 January 2018

AES@NAMM: Residuals Using Simple Separation

AES@NAMM 2018 Pro-Sound Symposium in Anaheim, California

My presentation: Thursday the 25th in Hilton Huntingdon A Level 4, 11am, 45 minutes, 

repeated Sunday the 28th in Hilton Huntingdon A Level 4, 11am, 45 minutes

Normally I just post personal research results in this blog (e.g. the MIDI Interfaces investigation), but when I’m presenting an academic paper at a real event, then this blog seems like a good place to gather all of the related information into one place...

For more years than I really want to think about, I have been looking into ways to use samples as the raw material for synthesis. Having spent my formative years during the rise of S&S (Sample and Synthesis (processing)), and with the E-mu Morpheus as one of my all-time favourite synths (or more correctly, sample replay devices with synthesiser-style post processing - and in the case of the Morpheus (and a few other favoured E-mu devices), that wonderful morphing Z-Plane filter!), then my aim has been to see just how far samples can be exploited in a synthesis context.

Research on 'Using samples for synthesis'...

The results of lots of thinking about how samples work, and how to make the most of them, particularly in a practical way. This is the topic of a paper that I’m presenting at the AES@NAMM 2018 Pro-Sound Symposium in Anaheim, California, on Thursday the 25th in Huntingdon A Level 4. I’m on at 11am for 45 minutes, and there’s a lot to try and pack into the time…

Supporting material (posted here as it becomes available…)

Demo video. First, here’s the 'teaser' ‘demonstration’ video that shows some of the results - using a single sample of an aluminium can (‘tin can’ is much shorter and easier to type, even though the metal is not tin!). This does not go into the theory or practice in much depth.

AES@NAMM. Here’s a link to the AES@NAMM web-site.

AES@NAMM Pro-Sound Symposium. This is a link to the event itself.

The AES@NAMM Schedule. Who is speaking when and where...

'Residuals Using Simple Separation'  The link to the presentation schedule - it’s an AES ‘Engineering Brief’. 

'Residuals Using Simple Separation' Powerpoint. Here’s a link to the slides from the presentation, where I talk about some of the background theory (there's more in the paper), and do some demonstrations. I’m going to post some more detailed audio demonstrations on SoundCloud and Youtube later too.

Coming soon. Here’s a link where you can download the Ableton Live Instrument Rack device that I used to do the demos in the video and the presentation. There’s lots of scope for a more intelligent front-end to doing this form of ‘synthesis using samples’. 

Coming soon. When I have tidied up the Nyqvist code for the sample processing routines that I used inside Audacity, then I will post a link to them as well. They are released using a GPL licence. There are also a lot of possibilities to make the required sample processing smarter and more automated, and I hope to see some cool stuff released that makes the most of the creative possibilities.

I’m considering writing an M4L ‘assist ‘plug-in’, but I’m sure that a better coder than myself is going to beat me to it with something really cool and sophisticated.

I’m working on a ‘user manual’ for the techniques that are described in the paper and presentation, and I’m more than happy to talk to sample library creators about how they can use the concepts to enhance the flexibility and usability of their samples. 


Saturday, 13 January 2018

Asynchronous timing generator for Max For Live in Ableton Live

Previously, I introduced ProbablyGEN, a Max For Live device that produces MIDI note events on three channels - with quite a lot of control over the timing of each channel. Essentially, instead of being tied to a single timing source, the three channels provide independent timing, and I provided default mappings to drum sounds because that seemed like a good way for people to start to explore the polyrhythms that are produced.

The feedback that I got suggested that quite a few people were using ProbablyGEN as a generative polyrhythmic drum machine pattern creator utility, and so I have now taken the comments and added extra functionality to make it easier to use ProbablyGEN in this way.

Additional asynchronicity

ProbablyGEN version 0.04 adds a fourth source of timing, but this time it works across the channels, and allows any channel grid to be filled randomly, or filled using a generative algorithm. As with the channel timing, this 'Rnd/Gen' functionality can be clocked using a free-running asynchronous clock (the 'Free' mode), or synchronised to the Bar count from Ableton Live's transport (the 'Sync' mode). Synchronising to Bars is slightly different to the 'Divide' control used in the channel timing - it quantises to discrete bars, and so a new grid pattern is only produced when the bar ends. In contrast, the Free mode is just a free-running clock, and so the new grid patterns can happen at any time - and the display shows the time between grid changes and shows a vertical 'count' indicator that shows when a new grid will be created (when the bar reaches the top).

 Looking at each part of the new Rnd/Gen control section in detail:

Common controls

The mode switch at the top of the common control section allows one of the two modes to be chosen:

Free - the Rnd/Gen clock is completely asynchronous (not tied to Live's transport at all). The 'Speed' control sets the time between a new grid being generated (shown in seconds). The bar on the left hand side shows the progress towards the next new grid - when it reaches the top then  new grid is generated (and the bar then drops down to the bottom).

Sync - the Rnd/Gen clock generates a new grid after the set number of bars, and so is tied to Live's transport. The 'Bars' control sets the number of bars between new grids being generated - in this case, the control is set to 9 bars. The number on the left hand side is the bar count, currently showing 3, so in 6 bars' time, the grid will be reset. 

The 'Fix/Auto' button controls if the automatic Rnd/Gen controls are active. When in 'Fix' mode, the grids are not affected. Selecting 'Auto' will activate the automatic Rnd/Gen effect on the grids (using the Per-channel selections described next...)

Per-channel controls

The 'Clear' button works as in previous versions - it clears the grid on that channel.

Each channel now has channel-specific 'Gen' and 'Rnd' buttons. These are always active - regardless of the 'Fix/Auto' button setting.

If you click on the 'Gen' control then a generative algorithm will produce a drum pattern for that channel. Each channel has a different algorithm: the top channel is designed for hi-hats, the middle for snares, and the bottom channel for kicks. Each time you click on the 'Gen' button, a new different pattern will be randomly generated.

If you click on the 'Rnd' button, then two things happen: first, some random cells in the grid will be cleared, and then, some random cells will be set to white. The 'Rnd' button thus modifies any pattern in the grid - it does not replace it (unless you press the 'Rnd' button a lot of times!). So you can use the 'Rnd' button to modify any grid - even a grid produced by the 'Gen' button.

'Auto' mode

When the 'Fix/Auto' button is set to 'Auto' then the timing controls can affect the grids. There are six selection boxes, three for each channel. When an 'X' is lit up, then the button on the right hand side of the sector will be activated when the timing clock generates a 'Rnd/Gen' event. 

In the case shown on the left, the top channel will have a new grid generated, the middle channel grid will be modified with random cells, and the bottom channel will generate a new kick drum pattern, and then randomly modify that pattern. ('Gen' always happens before 'Rnd'...)

If none of the selectors has an 'X' in it, then the grids will not be affected, and the state of the 'Fix/Auto' button does not matter.

Downloading ProbablyGEN 0.04

You can download ProbablyGEN 0.04 for free from

Here are the instructions for what to do with the .amxd file that you download from


Original blog: version 0.02: Complex timing generator for Max For Live in Ableton Live

Update: version 0.05: Constraint-driven modification grids in asynchronous drum timing generator

Tuesday, 26 December 2017

Two-step, two-bar triad chord, film music generator...

The festive season is here, and the end of the year approaches rapidly, so here are a couple of free utilities to entertain you over the holidays…

I’ve released quite a few sound generators already, but this time I thought I would do something slightly different - a chord sequence generator. I will then show you a few ways that it can be used (simple orchestration and arranging tips for Live), as well as show you how to make a ‘missing’ preset for the Ableton ‘Random’ MIDI Effect.

What it is...

TR2gen_mr is a 2 step sequencer. Yes, just two steps, each one bar long, and looped forever. All it does is generate 2 chords made up of major or minor triads, so just three notes in each bar. You can set the pitch of each chord, if it is major or minor, how you want the fixed or random inversions to be applied to the three notes, and how long the notes last. Simple - in fact, so simple that you are probably wondering how this could be useful!

You may know that quite a lot of the music used in films follows some basic rules, and there are some excellent tutorials, explanations and demonstrations available on YouTube. Here are some examples:

How to Imitate a Whole Lot of Hollywood Film Music In Four Easy Steps:

How to Imitate Even More Closely a Whole Lot of Hollywood Film Music with One More Easy Steps:

(The two links above by Scott Murphy are nicely made and give very clear explanations - thoroughly recommended!)

Film Score Harmony: Chords by Thirds:

(The above link goes into music theory a bit more deeply...)

…and this link includes a very useful compilation summary chart of the first two links by Scott Murphy (Different intervals between the roots suit different genres of film!):

With all of this in mind, all that TR2gen_mr does is make it easy to create pairs of chords that have a fixed pitch interval between their roots, and have either fixed or random inversions applied to them.

The Controls

The main user interface element is the 2-step grid, which uses the standard M4L ‘live.step’ object, and so may be familiar to you already. Using a mouse, trackpad or other controller, just click, hold and drag the music keyboard up and down to choose the pitch range you want to use, and drag from side to side to zoom in and out. Click to the right of the music keyboard to set the two notes, which follow the usual left to right time ordering of Ableton’s piano roll.

Each of the two single bar steps has the root note set using the grid, and underneath that are the playback controls: duplicated for each bar. (I could have used the live.step object to do everything in this utility, but that requires multiple layers of controls, and from simple utilities I prefer to be able to see everything at a glance…) The uppermost buttons control the type of chord: MAJOR or minor, following the convention of major chords being in capital letters (M) and minor chords being in lower case letters (m).

Underneath the ‘MAJ/min’ buttons are three horizontal rows of buttons that control the three notes in the chords: Root at the top, then the 3rd, then the 5th. Each of these rows has a ‘note name’ that gives the fixed ‘no inversion’ form, and so is shown by ‘R’,’3’, and ‘5’. Each row has the same order, so, from the left hand side: the first button is ’-‘, indicating that the note will either be randomly inverted downwards by an octave, or will not be inverted at all. 50% chance of either occurrence. The next button to the right is the note name: ‘R’, ‘3’, or ‘5’, and these are all fixed (so no randomness), with no inversions. The next button to the right is ‘+’, and this works like the ‘-‘ button, but inverts upwards by an octave approximately half of the time. (In a future version, then I may provide fixed inversions without the randomness, but I’m in a bit of a ‘randomness is cool’ period at the moment…). The final button on the right is ‘+-‘, and this randomly inverts up or down by an octave, or doesn’t invert at all - so there’s a 33% chance of each of these happening this time. (Note: If you look at the 'Random' MIDI Effect plug-in from Ableton, they use 'Add', 'Sub', and 'Bi', where I have used '+', '-', and '+-' - my excuse is that I was running out of space...)

(Note also that the rows are horizontal - unfortunately the UI makes it look like they are vertical!)

The final control is the ‘Length’ rotary control, which sets the length of the notes that are produced. At 120 rpm, then this covers the range from staccato through to just over a bar long, and at very slow tempos then it may not completely fill a bar - one of these days I will figure out the transport-to-note-length conversion…

Playing and Recording

To set TR2gen_mr running, you just start Live's transport... To stop it, you stop Live's transport. You may find that the notes in the first bar are not correct, and so you should wait until the first repeat (bar three) before trusting the output. This means that if you are recording the output of TR2gen_mr, you should always ignore the first one or two bars...

I mentioned the MAJOR/minor notation convention earlier, but didn't say that you can include the interval between the two root notes in between, so a major chord followed by a minor chord with an interval of 5 could be written as 'M2m' - this is how the summary chart is annotated in the link above.


The TR2gen_mr M4L plug-in can be connected to any of the Ableton Instruments, although my favourite for listening to harmonies and chords is a basic piano sound. This will produce a very simple sustained chord (for most of the bar: set by the ‘Length’ control), but it is easy to extend this using Live’s built-in MIDI Effects. The first thing I did was to add an Instrument Rack and drop a Piano instrument into it. Block chords are a bit boring after a few repetitions, even with added inversions, and so adding the Arpeggiator MIDI Effect can turn it into something rather busier.

The ‘classic’ instrument sound to accompany a piano is a string pad (as in the well-known example from the Korg M1, for example), and so dropping a String Ensemble instrument into the Rack and increasing the attack and release times gives the ‘hold notes to get the strings sweeping in, play staccato to hear just the piano’ time-based control between the two sounds. But Ableton Live’s Instrument Racks let you do much more interesting things that that, and so I added additional random inversions using the ‘Random’ MIDI Effect.

(The reason I didn’t do a much simpler TR2gen_mr device and let the Random MIDI Effect do the random inversions was to maintain detailed control over exactly which notes are inverted…) The presets that Ableton provide for the Random MIDI Effect don’t include one which randomly inverts notes up AND down, and so I’ve produced my own, and saved it as a ‘adv’ file. The screenshot shows exactly how to produce this ‘Random Inversions’ plug-in, and all you need to do is set Random up like this, and then save it as ‘Random Inversions’ for future use. (That’s the second ‘free’ giveaway this time, by the way…)

By dropping other instruments into the Rack, you can extend the ‘Orchestra’ that is playing the output of TR2gen_mr. I added some Double Basses and used the ‘Pitch’ MIDI Effect to drop them by an octave...

...and a Brass Ensemble that uses a separate instance of the ‘Random Inversions’ so the strings and brass are not just paralleling each other (paralleling is bad!).

The end result of all this ‘arranging’ is a lot more interesting than the block chords that TR2gen_mr produces, and could be used as the backing music for all sorts of projects. (YouTube/Vimeo (etc.) videos, animation demos, etc.)

The 'Arranger' Instrument Rack can be downloaded here:

So there’s this blog’s seasonal presents to you! See you in the New Year.

Some examples of using TR2gen_mr are on SoundCloud:

Downloading TR2gen_mr

You can download TR2gen_mr for free from

Here are the instructions for what to do with the .amxd file that you download from

Tuesday, 12 December 2017

Where do I put a downloaded .amxd MaxForLive (M4L) device file in Ableton Live?

This blog should answer some questions like these: How do you install a MaxForLive plug-in? What do you do with a .amxd file? Where do you put MaxForLive plug-in files?

Installing MaxForLive device/plug-in files

Many MaxForLive (M4L) devices/plug-ins can be downloaded from the web-site, and many other places on the Internet.

When you download a device/plug-in, you will often get just one file - this will have the name of the device/plug-in, followed by '.amxd'. The suffix indicates that the type of file: in this case it is a '.amxd' MaxForLive (M4L) device file. You will need to add this file to Ableton Live so that you can add it to the track device chain.

A '.amxd' device file is similar to VST, AU, etc., 'plug-in' files - it contains the code, user interface and other data required to make the plug-in work inside Ableton Live. In order for Ableton Live to recognise the file correctly, it needs to be added to Ableton Live.

How do I add it to Ableton Live?

Live 9 provides two ways to add a .amxd M4L device file. Both require you to set up the Ableton Live window and the window containing your downloaded file so that both windows are visible on the screen...

1) Drag the .amxd device file into a track, and then click on the save icon (right: floppy). This will automatically save the device to your ‘User Library’ folder in ‘Places’ (the ‘head outline’ icon), and will also save a '.adv' file which can be used to store your favourite initial setup.

2) Put the .amxd device in a folder you have allocated to M4L devices, then add that folder to the Browser. Just scroll down to the bottom of ‘Places’ and click on ‘Add Folder’ . Then select the folder where you have saved the .amxd device file. (The ‘power user’ technique is to just drag that folder into ‘Places’)

Scroll down past the example download boxes for the same information - but with screenshots!

Some of my free .amxd device file downloads:

Max for Live
Missing Echo dark

This echo puts an LFO inside the feedback loop, so the number of echoes changes over time.


Max for Live
ProbablyLFO dark

This is no ordinary LFO. Lots of timing sources, edit waveforms, chance variations, and much more.


Max for Live

A 4-phase LFO blends four channels of granular atmospheric sound into a swirling audio experience...



How do I add it to Ableton Live (with screenshots)?

Live 9 provides two ways to add a .amxd M4L device file. Both require you to set up the Ableton Live window and the window containing your downloaded file so that both windows are visible on the screen...

Method 1: Drag the file into a track...

Here we have the 'Downloads' folder (where you have probably put the downloaded .amxd device file...), and inside it is the file itself.

(The screenshot also shows the User Library open in the 'Places' part of the Browser inside Live.)

Drag the .amxd device file into a track... This can be a track strip,

or the track chain...

Then click on the save icon
(on the right hand side of the window: with a 'floppy disk' icon)...

This will automatically save the device to your ‘User Library’ folder in ‘Places’ (the ‘head outline’ icon), and will also save a '.adv' file which can be used to store your favourite initial setup.

Method 2. Folder dragging...

Make sure that you set up the Ableton Live window and the window containing your downloaded file so that both windows are visible on the screen...

Put the .amxd device in a folder you have allocated to M4L devices, then add that folder to the Browser.

(To add a folder to the Browser: Just scroll down to the bottom of ‘Places’ and click on ‘Add Folder’. Then select the folder where you have saved the .amxd device file.)

When you have done this, then you will have a new folder in your 'Places'

Method 2a. 'Power user!'

The ‘power user’ technique is to just drag the folder containing the .amxd file into ‘Places’...

... and it gets added. Easy and very quick.

The only difficult bits to the power user method are:
-  arranging the two windows on the screen!
- scrolling all the way down to the bottom of the 'Places' (it can get very long...)

Sunday, 3 December 2017

Complex timing generator for Max For Live and Ableton Live

The first presentation at Loop 2017 was Andrey Smirnov's wonderful talk and demo of Leon Theremin's 'Rhythmicon', ending with a superb live performance piece. It was an inspiring opener to a wonderful event, and it got me thinking...

Probably GENerator

If you've been following my 'Probably' series of MaxForLive devices, then you may have noticed that they have gradually been influenced more and more by modular synthesisers. ProbablyLFO could easily have some radical graphics, a name suggesting 'West Coast' influences, and be a hardware module in a rack, except that it is only in software in Ableton Live at the moment. Producing hardware is a time-consuming process, and I'm still considering what my next device will be...

But, as we have just passed through one annual winter 'holiday' event, and with another looming, this seemed like a good time to release yet another unusual giveaway, and with the 'Rhythmicon' still tucked away at the back of my mind, I wondered what I could do that was exploratory rather than just a dull copy... And, trust me, some of my previous M4L giveaways at this time of year have been useful, but just a little bland. 

The result is ProbablyGEN, (GEN is short for Generator, not Max's 'gen'!), and it is a three channel (after dFreez_mr, I've temporarily given up on trying to squeeze four channels in!) asynchronous / synchronous note generator. Each channel has a choice of free-running (async) or synchronous (divided from Live's transport), a probabilistic 'velocity' grid (with a special variation on the previous user interface specially for this type of application), length control per grid, direction controls (forwards, backwards, scanner), and completely straight-forward (gasp!) MIDI Note output selection. So you get three note polyphony (or use the 'Chord' MIDI plug-in) which is ideal for simple drum sounds, or simple three-part monophonic music.

The screenshot above shows three synchronised channels, all running at 1:1 (i.e., the same as Live's transport), and all playing 16 column grids (more on this in a moment). The far right hand side shows the MIDI Notes which are being generated, which is a giveaway for what this is doing: 36 is Kick, 38 is Snare, and 42 is Closed Hi-Hat. I did consider calling this ProbablyD, or ProbablyDrum, but then I realised that you could use it for other purposes than just drums, and so I went for the generic name of 'GENerator'.

The 'Columns' setting and the direction buttons on the right might need some explanation. Why is the middle channel 'Columns' control set to 17 instead of 16? Actually, this is a consequence of it running back and forth in a 'scanner' type pattern - the little '+' is there to remind you that when you choose the 'scanner' direction then you need to increment the 'Columns' control by 1 (or not, as you prefer!). So, actually, all of these channels have 16 columns in the active part of the grid - but there's more later on this... 

With these settings, from the lowest channel upwards: the bass drum is playing four 'on the beat' hits, with the final column (or the 16) exploiting the new UI twist that I have added: the upper white cell is indeed a '66' velocity. but the lower white cell is a '0' velocity on the black row, which doesn't mean 'zero velocity' (that would be a Note Off...), but means 'don't play this note. Now because the probability grid takes multiple instances of white cells in a vertical column as providing choices for that event, this means that there are two things that can happen here: a kick drum played at a velocity of 66, or no kick drum, and with each having the same probability - so the kick drum will play about half of the time. When you listen to this, then you hear that 'the drummer' keeps putting in extra little appoggiatura ('pick-ups') at random, just before the main beat at the start of the bar. So here we have a software emulation of an impatient foot...

The middle 'snare' channel is scanning back and forth, and so we get a single snare (at 33,66 or 99 velocity) or a cluster of 2 or 3 snares on alternate repeats. Again, the 'zero' bar is used to make that middle snare in the cluster happen about half of the time.

The 'hi-hat' channel has 'on the beat' hits, with off-beats at half probability using the 'zero' row again, and a cluster of 'sometimes' at the end of the bar, followed by an end of bar tick that always happens.

A rhythm less ordinary... 

The screenshot above shows a slightly more unusual setup. This time, the bass is as before, whilst the snare is playing slower, at 0.889:1 to Live's transport, and the active part of the grid is only 15 columns long (wide?). The hi-hat is now faster, at 1.333:1, and there are 22 columns in the active part of the grid. In this example, I have deliberately chosen the values of Divide and Column so that the lengths are the same duration in time, but this does reveal an interesting side-effect. It is quite difficult to change the Divide control and the Columns control at the same time, and so you will find that the timing gets out of alignment, as you can see by the three vertical cursor lines not being aligned in a vertical line. There are two ways to fix this: stop Live's transport and restart it; or hit the 'In' button in the top left hand corner, just underneath the 'start' light circle. This forces a reset of the internal counters, but doesn't sync it back to the bar or beat of Live's transport, which can be a useful effect. Either way, you get to control the channel timing alignment as you want.

The hi-hat is also busier in this last few columns, with 25% and 33% probabilities from the page of the 'zero' row. But you've probably not got the time to concentrate too much on this, with all of the timing complexity that this setup gives. Each of the channels is outputting notes in its own synced time, but the timing isn't the 'four-to-the-floor' many ears are used to hearing. Nope, this could perhaps be interpreted as being simultaneously an emulation in software of the best AND/OR the worst software drummer in the world...

This is only scratching the surface of the timing options that ProbablyGEN gives you - the 'Divide' range is deliberately set wide, so you can go fast and very slow (try increasing Live's tempo too!). And if you use the 'Free' button, then the tempo of that channel is completely independent of Live's transport, and so is totally asynchronous. For hi-hats, this can sound pretty cool! (This is also where tempo-aligned echo can be useful to explore...) But hey, that's enough presents given away in one blog article!


If you replace a drum kit with a synthesiser, then ProbablyGEN becomes a three channel monophonic step sequencer with potentially independent timing of the three channels (or any degree of sync that you want). As I said earlier, this is the sort of thing that many people associate with modular synthesiser racks, and not a laptop running Ableton Live.

By using the 'Chord' MIDI effect plug-in, then one, two or all of these notes can be expanded into chords. Depending on how you set this up, it can be described with words like 'jazzy', or 'obtuse'... (and if you've ever listened to the 'ChromatixT' demos on SoundCloud, then...)

As usual, ProbablyGEN is available for free from Enjoy doing interesting things away from 4:4 timing as we move into 2018!

Unexpected surprises!

ProbablyGEN outputs all three notes when you first instantiate it in a track, so beware!

Did someone mention a Parappa the Rapper reference?
5 Minutes of Parappa the Rapper Remastered Gameplay - YouTube 2mins 10 seconds


Update: version 0.04: Asynchronous timing generator for Max For Live in ...

Update: version 0.05: Constraint-driven modification grids in asynchronous drum timing generator

Thursday, 30 November 2017

Probabilistic flexible LFO for Ableton Live

ProbablyLFO is not an ordinary LFO, although it can be used to produce the usual simple repetitive, predictable modulations that are expected from this type of slow modulation oscillator. But it goes much further than that, into more unusual areas, and so it allows deep, complex and often unexpected and unpredictable control over parameters in ways that can be very musically useful.

LFOs normally provide a speed control and a waveform selector, and LFOs for use in Ableton Live add a way of mapping the output to a parameter. ProbablyLFO has all of these, but the way it approaches each of them is intended to extend and enhance what it does. So there are four ways to control the speed, a small number of preset waveforms which can: be edited live; have random values added; can be filtered/smoothed; and output, in various ways. The most conventional bit is the parameter mapping, which works exactly the same as in any other LFO - and that's because that bit of code is taken from the Ableton example M4L LFO!


ProbablyLFO is part of the Probably series, and is a companion plug-in to all of the step sequencers (Probably, ProbablyZ, and ProbablyS have been released so far). The common feature is probabilistic control, and so the sequencers do not produce static repetitions of the same sequence (unless you set them to do so, of course) - instead you can control how they produce variations in pitch, octave, probability of a note event happening, velocity and length (and more...). ProbablyLFO brings probability to LFOs...

So what does ProbablyLFO do differently?

The speed of an LFO sets the timing of the modulation that it controls. So a typical use might be the  vibrato of an oscillator, or a slow sweep of a filter or phaser. ProbablyLFO has four sources for its basic underlying 'Speed':
- a free-running oscillator (i.e asynchronous to Live's tempo clock)
- a synced divided version of Live's tempo clock (i.e. synchronous)
- Note events (so each incoming note from a clip causes the LFO to run)
- Poly events (the LFO runs faster or slower depending on how many notes happen at once)

The 'Free' setting is the simplest. There is a 'Speed' control that sets the basic frequency (in Hertz or cycles per second) that the LFO runs at. (You will see why I call it the 'basic' frequency later on...) This speed is not synced to the main Ableton Live tempo clock (i.e. it is asynchronous) and so can b used when you want a modulation to happen with no connection to the main tempo - slow sweeps are one example that work well.

The 'Sync' setting allows you to synchronise to the main Ableton Live tempo clock, but you can control the division ration - so the control is called 'Divide'. If you set the 'Divide' control to 1:1, then ProbablyLFO runs at the same speed as the Ableton Live tempo clock. Set it to 2:1 and it runs at twice the speed of Live (the fastest is 4:1, which is 4 times Live's tempo). Conversely, if you set it to 0.5:1 then it runs at half the tempo of Live, and you can go all the way down to 0.125:1, which is one eighth of the tempo of Live. There are other ratios as well between these limits, but they are all locked to Live's tempo.

The 'Note' setting has no control - or rather, the control is in the incoming MIDI notes. It takes any note events in the clip on the track, and uses them to run the LFO. So the more notes there are, the faster the LFO goes. So this is another type of 'sync' - the LFO is locked to the notes, but if you add extra notes to the clip, then the LFO reflects that by running faster. Simultaneous notes count as one note when using this setting.

The 'Poly' setting also has no front-panel control, and is a variation on the 'Note' setting. In 'Poly' the number of notes that are present simultaneously controls how quickly the LFO runs, so chords make it run faster than single notes. Once again, this is 'synced', but it is another type of sync.

The 'Note' and 'Poly' modes can be very useful musically, because the LFO is tracking the occurrence of notes, and it not tied directly to time or tempo. You may need to spend some time getting used to these two settings, because this type of sync may be quite unusual (I've not seen it anywhere else before, but I haven't seen everything!).


LFOs traditionally have  predictable selection of waveforms (or wave shapes: LFOs arguably have wave shapes, whereas audio oscillators should have waveforms, but this is just semantic detail, and waveform is often used interchangeably with waveshape): sine, triangle, sawtooth, square, pulse and some sort of random or 'sample & hold' waveform (and sometimes a 'draw-your-own' waveform as well...).

ProbablyLFO has a similar selection of waveforms provided as presets, but has a much larger possible set of waveforms (very large numbers of them: many millions). The waveforms are provided as starting points for you to edit to suit your own purposes, and so some of them may appear weird at first.

The 'Flat' waveform is the first unusual waveform. It looks like a thick line across the screen, and you may be wondering why it is included at all.

To understand what is happening, then you need to know what is happening in the waveform grid. The 16x16 grid in the middle of ProbablyLFO shows time horizontally, and value vertically. Single white cells in a column produce that value as the output, but when there is more than one white cell in a vertical column, then the output value will be chosen randomly from those values. In this case, there are three rows of white cells, and so the output waveform can be any of those three values...

So the 'Flat' waveform is actually anything but flat: it is a sequence of values chosen from the middle three: a kind of random ripple. You can change the smoothness of the ripples using the 'Smooth' control (sorry about the obviousness of the naming here!): lower values make the output 'jagged and step, whilst higher values smooth it out. But take care: if you apply too much smoothing then you will miss the peaks and troughs. You can see the smoothed output of the grid on the right hand side of the grid - in the big vertical bar.

To hear this modulating a parameter, you will need to use the 'Map' button on the right hand side of ProbablyLFO to select a parameter. It is normally a good idea to 'undo' or 'clear' any pre-existing mapping by clicking on the 'X' button first, an then clicking on the 'Map' button, followed by the parameter that you wan to control. When you have selected a parameter to control, then the name of hat parameter should appear in the 'Map' button. The final things you may need to tweak are the 'Offset' and 'Depth' controls, which set how the smoothed output value from the grid affects the parameter. The best starting point is to set the Offset to zero, and the Depth to 100%, and see how this affects the parameter you have chosen. Starting with a filter frequency parameter in a synth is a good starting point for exploring how these controls work. You can invert the way that the value goes by using the 'Normal/Invert' button. The 'Flat' setting can be a bit subtle, so you may not hear much effect on the filter, so you could try increasing the filter resonance, or you could click the little '+R' button to add some randomness and give you more range of values in the output.

Clicking on 'Flat' again will give you the original, clean waveform again, and you've probably already clicked on the '-R' button to see if that removes white cells - which it does. 'Clear' clears the whole grid. Hopefully, you've just realised that there are a huge number of possible waveforms in ProbablyLFO, and exploring them all could take a long, long time...

The 'Both' waveform looks like just slight ripples at the top and bottom of the range of values. But, in practice, this produces an output which makes big jumps up and down, or little jumps in the ripples. You can control the smoothness and size of the jumps with the 'Smooth' control, of course. This tends to sound a bit like the 'Sample & Hold' or 'Random' waveforms that you get in conventional LFOs, depending on the setting of the Smooth control.

'SineH' is the traditional sine waveform that you were expecting to find in an LFO, except that it is horribly quantised! The 'Smooth' control can remove as much of the blockiness as you want, so the grid is slightly misleading. 'SineV' is not normally found in LFOs, and gives an interesting output: not random, but structured, and with lots of variation each time it repeats.

'RampU' (Up) and 'RampD' (Down) are the usual sawtooth waveforms, but they also provide a good opportunity to explore some additional controls. The 'Direction' controls on the right hand side shows '<', '<>' and '>', and ProbablyLFO normally defaults on first use to '>', which equates to 'forwards' or moving from left to right across the grid. If you select '<' then the cursor line moves across the grid 'backwards' from right to left, and if you select '<>' then it 'loops' back and forth from left to right, and the sawtooth or ramp waveform becomes a triangle waveform at half the speed. You may have already figured out that if you want a full speed triangle, then you click on 'Clear' and then draw in a single cycle and select '>' or '<'...

'Rect' provides various rectangular waveforms: from square to pulse. Just keep clicking on the button until you get a waveform you like. (I did consider making all of the 'waveform' preset buttons work this way, but decided against it in this version. I also wondered if I should make all of them 'add' without clearing... I'm still considering the best UI to use in a future version...)

'Bars' gives you four vertical bars, whilst 'Blobs' gives four blobs. These are intended (as all the presets are) as starting points for editing, or adding (or removing) random white cells with '+R' or '-R'.

The final control in this version is the Columns control, which sets the number of columns in the grid. This is normally set to 16, but you can set it to smaller values if you want to change the length and waveform that the grid produces. The final parameter-affecting version of the grid output, after smoothing, offset and depth, is the small vertical bar on the far right hand side.

And that concludes this quick description of ProbablyLFO. I hope that you like and enjoy exploring its many and varied creative modulation control possibilities (and probabilities).

ProbablyLFO is available, for free, from

You will get a '.amxd' M4L device file. You need to add this to Ableton Live so that you can add it to the track device chain.

How do I add it to Ableton Live?

Live 9 provides two ways to add a .amxd M4L device file:

1) Drag the .amxd device file into a track, and then click on the save icon (right: floppy). This will automatically save the device to your ‘User Library’ folder in ‘Places’ (the ‘head outline’ icon)

2) Put the .amxd device in a folder you have allocated to M4L devices, then add that folder to the Browser. Just scroll down to the bottom of ‘Places’ and click on ‘Add Folder’ . Then select the folder where you have saved the .amxd device file. (The ‘power user’ technique is to just drag that folder into ‘Places’)