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?


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!).

Waveforms

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).

MaxForLive.com

ProbablyLFO is available, for free, from MaxForLive.com.

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’)



Buy me a coffeeBuy me a coffee




Sunday, 26 November 2017

dFreez_mr - M4L live performance utility

Sometimes, inspiration hits you at interesting times. There I was, in Studio 4 at the Funkhaus at Loop 2017, giving the second of three Open Space Lightning Presentations (one per day), when I realised that sFreez_mr was missing a vital set of functionality. sFreez_mr is an M4L Audio Effect that provides 4 parallel loop audio players whose output is slowly mixed between using a 4-phase LFO. I made it to produce complex mixes for background atmospheres and special effects - so put four wind and rain loops into it, and you can generate non-repeating 'atmosphere' tracks for installations, stage and theatre usage.

What I realised mid-presentation was that every time I used sFreez_mr, I would raise the channel fader for the track it was in at the start, and lower the fader in that channel at the end. My headset mic was going direct to the PA mixer, and so I didn't have that signal to duck the channel volume inside Ableton Live. What I needed was an automatic volume fade in and out control...

dFreez_mr


dFreez_mr is the result of taking that idea and working on it for a few days. It it often happens that what seems to be a simple idea is more complex to implement, and this was definitely one of those cases. I quickly realised that I needed to have four different states:
1. Off. Zero volume.
2. Fading up. Volume goes from zero to maximum at a defined rate, using a non-linear curve.
3. On, Maximum volume.
4. Fading down. Volume goes rom maximum to zero at a defined rate, using a non-linear curve.

I also realised that I wanted a minimum of controls, whilst also providing lots of feedback to the user. I ended up with a single button, which 'starts' the fading upwards from the 'Off' state to the 'On' state, and which then 'stops' the audio by fading downwards from the 'On' state to the 'Off' state. I added two controls for setting the times to fade up and down (twist the dial to set the Seconds and Minutes), and some indicators to show the progress in the fade process, and finally, a state indicator, which says which state is currently active.

In practice, you load up four samples into the players in the 'Off' state, then when you are ready to go, you press the 'Start' button.

You wait whilst it goes through state 2 and eventually gets to state 3: fully 'On'. It then stays in this state until you do something. In dFreez_mr, this is where you would wait for the 'Load' lights to go 'bright' (showing it is safe to change the sample in the player because the volume is zero at that point) and you swap samples...

When you want to stop the audio, then in state 3, you press the 'Stop' button, wait through state 4, and it eventually gets to state 1 ('Off') again.

Now, if you've ever been to a 'Drone' music concert, then this is more or less what happens during one of those performances, so there may be ways of using dFreez_mr for more than just background atmosphere effects.

MaxForLive.com

As usual, you can get dFreez_mr from MaxForLive.com. Like many of my ideas, at this stage, it is not perfect, not production ready. In fact, it is quite some way from being properly finished, needs some tidying up inside, parameters naming, etc, and so it is free. I hope you enjoy using it.