Thursday, 31 December 2020

Thoughts on Asynchronous Loops in MaxForLive for Ableton Live...

I ruthlessly prune comments. There are some people who think that every blog is a place where they can advertise for free, and so they add automatically generated comments with a clickable link somewhere and hope that people will click on it. I just delete these 'chancer' comments. But, sometimes, a genuine and interesting comment arrives...

ElDepleto wrote a comment recently at the end of the 'Non Euclidean...' blog post:

Hello. I have been reading your blog for a while and I really enjoy your devices. I am hoping you can help. I am looking for a m4l device that can play 4 asynchronous loops not tied to Ableton’s tempo or any tempo really. Thinking Discreet Music by Eno. I’d also like to be able do Reich style phasing with it. I am hoping you know of something that exists. Drag and drop would be ideal. Anyway, I hope you have a happy holiday and keep up the great work! -Brian

This one caught my attention, and I thought that it would be a good opportunity to do a one-off 'Adam Neely'-style 'Q&A' blog post, and you are reading it!

Asynchronous loops...

The blog post that the comment was attached to was was for my Non-Euclidean, Non-Linear Sequencer Toolkit, and this can be thought of as being close to the opposite end of a spectrum of approaches that has the 'I'm looking for...' 'Asynchronous Loops' at the other end. My Non-U, Non-L sequencer produces MIDI notes where the timing can be phased/slipped relative to each other, and you can have up to four sets of sequences running plesiochronously at once. The 'Plesio' prefix is a description of the case where two systems are not asynchronous, but they are not synchronous either. It turns out that async and sync are just extreme cases, an there are lots of 'partially synchronous' cases in between, hence 'plesio' meaning 'partly'. In this case, the minimum time interval is a 64th note, and so the phasing is coarse and quantised to Live's timing clock, but it can still give some interesting outputs. 

The 'other end' is multiple loops (samples that repeat with some degree of seamlessness) where the ultimate 'analogue' form would be four separate tape loops, with the minimum time interval between them being down to an atom of iron on the magnetic tape. The digital equivalent could be implemented in a number of ways: fractions of a cent of pitch shifts, perhaps, or just four different length loops played back at the same rate (although the sample rate imposes a 'quantisation' limit of time for this method), or different playback clocks... Of all of these, the analogue tape is probably my favourite - because it is simple and mechanical. So, not for the first time, digital technology has turned easy accessible DIY into something more like arcane complexity...

Database?

There's an easy answer, of course. Just search the MaxForLive.com repository of M4L devices. Unfortunately, whilst there are a lot of M4L devices on MaxForLive.com, the sheer number of them can make it hard to find a specific instance (or instances). It isn't an accident that it took several different attempts at Internet Search Engines (Alta Vista, for example) before we got the current giants of search, and it took a lot of thinking, invention, and several reworks of business models before we got where we are now. MaxForLive.com is a wonderful resource, but asking the developers of devices to describe their work isn't a guarantee of unbiased, accurate and consistent classification. 

Databases are interesting pieces of software. Shoehorning data into a spreadsheet and expecting it to be usable as a powerful relational database is unlikely to pay dividends, and actually, that's the point - for a database to have value, then it needs to have money spent on compiling it, on verifying the data in it, on making it accessible, on keeping it up-to-date, and more. Sometimes you can get people to do this themselves: Google Earth is an astonishing example of how ordinary people freely provide hugely valuable data updates. But it normally requires money up-front, and with payback later. The scale gets big very quickly. On the opposite end of the scale, you have Pianobook.co.uk, where in just over a year or so, over 400 sample-based virtual instruments have been freely donated as a common resource (looked after by volunteers), and there's already a problem of finding stuff, just like on MaxForLive.com. 

400 is an interesting number. If you were asked to sort 10 numbers into order, then you would probably have no hesitation in doing it without any planning. For 100 numbers, then you would probably spend a bit longer planning out your approach. 400 is getting big enough to think about asking a few other people. 1,000 would be quite daunting. 10,000 and you would be thinking about having to do a lot pf planning and setup to achieve the task. 100,000 and most people would probably go to a specialist company to do it. So 400 looks like it might be close to the number where it starts to turn into something non-trivial and requiring real effort - and money. 

MaxForLive.com has almost 5,000 devices...

5,000 devices is a lot. If it takes you an hour or so to get thoroughly familiar with how something works and what it does, then you might do 5 or maybe 8 devices in a working day... This means that it will take you something like 2 years to get a good level of familiarity will all the devices, and this isn't taking into account updates and new device releases. I would be surprised if there are many people who have a good grasp of all of the devices on MaxForLive.com.

Back Catalogue...

My first thought was to look in my own back catalogue! I have about 100 M4L devices on MaxForLive, and there are some that get close to what is required. (And if not, then the temptation to make one of my own would be enormous!)

I didn't find exactly what was required, but they were related and still interesting...

26 November 2017 - dFreez

dFreez is the 'drone-performance-oriented' version of sFreez, a 4-channel sample player that uses a 4-phase LFO to cyclically fade between the four samples. It makes creating atmospheric washes of sounds (drones, etc.) very easy - just drag and drop four samples and off you go! The addition was a slow 'Fade Up/Fade Down' control that can take a long time to fade up or down...

https://blog.synthesizerwriter.com/2017/11/dfreezmr-m4l-live-performance-utility.html

20 October 2017 - sFreez

This is the original 4-channel sample player with a 4-phase LFO that fades cyclically between 4 dragged and dropped samples to create continually changing washes of sound. 

https://blog.synthesizerwriter.com/2017/10/sfreezmr-4-phase-lfo-looped-sample-live.html

24 January 2016 - Saw4Generator

4 channels, but Sawtooth oscillators, not samples. But I learnt a lot about how tricky it can be to control 4 channels of sound at once...

https://blog.synthesizerwriter.com/2016/01/generating-audio-soundscapes.html

9 February 2019 - INSTsineATMOSPHERE

INSTsineATMOSPHERE uses 3 channels of FM oscillators and is another attempt to provide a simple user interface to a complex sound generator.  

https://blog.synthesizerwriter.com/2019/02/modulated-sine-waves-two-ways-recipe-in.html

30 August 2016 - gFreez

This is the ancestor of sFreez and dFreez, and uses granular 'frozen' spectra as the source material. So you capture a spectrum from an incoming instrument or recording, and then that is replayed as a looped 'grain'. More slowly changing washes of sound...

https://blog.synthesizerwriter.com/2016/08/audio-environments-from-frozen-spectral.html

So looking back through previous MaxForLive devices had some 'close approaches', but no direct hits.  

So I thought about it from an oblique angle...

Go local!

I realised that Ableton Live itself was originally designed as a MIDI sequencer, but that when sample replay was added to the 'Clip Launching' (Session) view, then something very different was the result. Live's Session View doesn't have any link to time in the upper part of the window - just a matrix of clips. It isn't at all like the 'Piano Roll' or 'Tape Recorder' views that had time on the horizontal axis, and pitch or tracks on the vertical axis. 

Clips in Live can do a lot. I've always been a fan of the slightly obscure 'Clip Envelope' functionality, which many people overlook. But when you have a sample as a Clip, and you loop it, then you get a lot of ability to do interesting things, all from when the Session view first appeared and Ableton let people play around with samples without any dependence on a time axis.

So if you create a Clip in Ableton Live, and set the 'Warp' and 'Loop' buttons on, then it will play as a continuous loop. The length of the sample determines the length of the loop, so it isn't tied to Ableton's transport clock. Activating the 'Warp' button but not using any warping functions means that the clip plays asynchronously to Live's transport, but it also means that if your loop is seamless, then there is only one length that you can use - the one where it is seamless! So as long as your sample has silence at the end, then you can reduce the length of the sample, and it will loop that reduced length sample. (More about warping later).

I'm sure that this is well-known, but I hope that my rediscovery may be useful to some people. 

Here's a Clip on a Track, set up as I have outlined:



The sample that I'm using is just one of the factory samples that comes in Live Suite, I think. This is just the raw 'dragged and dropped' sample. There are several things to note in the screenshot. First, the sample is not a whole bar in length - you can see the 1.1.2 marker just after the middle of the sample, but this is a view of the whole sample, as you can see in the tiny preview box at the lower edge of the screenshot. Secondly, the 'quantisation' is shown as 1/512 in the lower right hand corner, which is equivalent to 'no quantisation' in Live. Finally, there's no yellow 'Warp' marker in the grey 'warp' bar on the right hand side. In the purple bar you can see the end triangle, and in the light grey bar under that you can see the repeat triangle (or is it the other way round?), but the next bar down, the 'warp' bar, doesn't have any marker at all. All three of these signs indicate that this sample isn't tied to Live's transport. 

Track 2 has the same sample, but this time the length of the sample in the Clip has been adjusted:


The upper red ellipse on the far side shows that the length of the clip has been shortened - the purple and light grey bars now end, and there's a light grey area to the right of them. The darker grey 'warp' bar still doesn't have a yellow 'Warp' handle in it (this is good for this application!). When you change the length of a sample by dragging the end triangles, then they jump to specific places, so you don't have complete control over the length, and those places are related to the bar and beat positions. (But remember that the sample in Track 1 is NOT linked to bar or beat positions at all...)

Track 3 is just a slightly shorter sample:


The white triangle has now gone black, which indicates something related to warping, but note that there isn't any yellow warp handle, so this is just a shorter sample. Playing all three tracks at once gives exactly the asynchronousity that ElDepleto wanted! (You just need to add a fourth track and tweak it, of course!). Using the same sample makes it very easy to hear hat is happening, but you can get very good results by transposing samples down or up, and by using the /2 and *2 halve/doubling buttons to change the length. Detuning samples gives asynchronicity at a finer level of detail, if you want. 

Warping

If you want, you can use/activate the Warp facilities and see how this changes things. Here's Track 2 with modifications in Tempo applied to the sample:

If you click on the far right hand side, in the darker grey warp bar, where the yellow 'Warp' handle would be if it was there, then you will find that it appears and you can move it so that the sample changes tempo to match the loop length. This does mean that it is now synched to Live's transport, but the loop length need not be whole bars, and so is 'plesiochronous'. You can see that the quantisation has now changed to 1/32, and the length is a whole number of beats. 

If we do the same with Track 3, then we get this:


Yes, a broader light grey region to the right hand side, and a shorter, tempo-tweaked clip...

You might like to try out both variants to see which gives the asynchronicity that you want. I have to apologise for not delivering a MaxForLive device that does this, hut having the native functionality in Live is very useful. If you want to have seamless samples, but which are slightly different lengths, then the technique that I use is to overlap copies of the start and end of the sample and do a cross fade, then merge and trim back to the original sample. This means that the sample fades out its end as it fades in its beginning. I wish that audio editing tools would automate this type of editing function (Audacity, for example), but once you've got your head around it, it isn't difficult to do. 

I have done a video which shows the 'no warp' asynchronicity in action, and this is available on my YouTube channel: 

If I can find time, I may see what a stand-alone MaxForLive version would look like...

And thanks to ElDepleto for the comment! Much appreciated!

 ---

If you find my writing helpful, informative or entertaining, then please consider visiting this link:

Buy me a coffeeBuy me a coffee (Encourage me to write more posts like this one!)


Synthesizerwriter's Store
 (New 'Modular thinking' designs now available!)


   




  

2 comments:

  1. Hello,
    I am not sure if you are upset with my inquiry. I asked you because you seem to do a lot of devices that are timing related. I am sorry if I offended. I do appreciate your writings. I thank you for this resource. There is a ton of new techniques for me to try in this post. Thank you for taking the time and Happy New Year! -Brian

    ReplyDelete
  2. Brian. I loved your comment! (I sincerely apologise if I gave any other impression) It set me off an a much-needed summary of related devices, and then inspired a YouTube video (and I reminded myself that I still need to spend more time in the darker recesses of Live!). My comment moderation is almost all deletions of unwanted adverts, so your comment was a very welcome real query. Thanks again. Happy New Year, Martin

    ReplyDelete