Wednesday, 8 July 2020

Note Count Processor in Max For Live for Ableton Live

After I described the 'Triple Transposing Delay' with three different ways of connecting the delays together, as 'experimental', people seemed to like that, so my latest release is 'extremely experimental'!

Although it isn't a reliable guide, I've not seen anything like MIDIoneOF before, although, of course, you could do some of it using clip envelopes. In fact, I reckon that you can do almost anything by using clip envelopes, and I'm sure that those people who produce YouTube videos with apparently click-attracting titles like: 'Powerful Advanced Generative Techniques For Ableton Live', in huge white block capitals will be busy making yet more of those videos as I type, although they don't seem to use clip envelopes... When I did release a YouTube video on using Clip Envelopes, it got a wonderful review (Thanks, Darwin!) and over a hundred views, so maybe I should make some more...

MIDIoneOF


MIDIoneOF is the first of a series, because people seem to like it when there is more than one of something, and actually that's part of where the name comes from. I wanted to called it 'n of m' because it is based on permutations and modulo arithmetic, but mathematical notation like 'n of m' isn't very good for naming Max For Live plug-ins, and 'Nofm' sounds like onomatopoeia for eating food, rather than a cool M4L device. So 'One of' got the most votes, and may well be followed by 'Two of' when I have time to finish it. (I have no idea what the third might be called...) Me? Busy? I've been doing several major projects over the last few months (the TR-505 was just one of them) and I can't talk about some of them, but they might even see the light of day at some time. Over the years, I've become rather used to doing stuff that never has the media spotlight turned onto it, and I'd probably be surprised now if a glimmer of limelight ever appeared on any of my stuff. But hey, It means that sometimes I can hint abut something rare and unusual!

(*) MIDIoneOF counts notes as they arrive at the input, and then processes those notes in various ways. The main process is muting: you can set notes to be muted depending on two criteria: the note count length (from 2 to 16 notes), and the 'Mute Pattern' which you can set in the 16 light purple boxes (although you can only set ones which are within the note count length!).

The Mute buttons mute the note if they are grey, but let the note through if they are light purple, by the way.... 

So if the note count is set to 7 notes, then you can set mutes for note counts between 1 and 7 notes. There are 'Speedup' buttons to set all the mutes on ('AllOn') or off ('AllOff'), as well as a random selection.

The muting affects the notes as they pass through the device, and all of the timing is derived from those notes... Despite appearances, the mute buttons are only indirectly connected to the timing transport of Ableton Live - and if you don't quantise your notes, then there's no real connection at all. So what may look like a simplistic rhythmic accenting utility isn't quite that at all... It may look like a step sequencer, but the steps are the notes, not the transport timing. It's kind of a step sequencer turned inside out...

This is probably a good time to revisit the start of a previous paragraph (*). When I say: 'as they arrive', I mean that if you have a clip with 8 notes in it, then MIDIoneOF will get those 8 notes, and will process them in the order in which they arrive. So if the note count length is set to 7, then the first 7 notes will be processed (and muted or not, depending on the settings of the numbered buttons in the Mute Pattern. The eighth note will then be processed as the first note of the second set of 7 notes, and MIDIoneOF will continue processing in groups of 7 notes, until you stop Ableton Live.

The clip (or live playing) can include single staccato notes, legato notes, or chords, although there are limits to the speed and quantity of notes which it can deal with! Remember that I did say: 'Extremely experimental!'. Note also that this behaviour isn't what you probably associate with a step sequencer, but as I said, this isn't...

The second bit of processing is the 'AutoRandom' button, which saves you from the effort of clickng on the Mute buttons. You set a number (between 2 and 16 - a motif in this series) and after that number of multiples of note counts (so every n x 7 notes in the example I have used so far), the Mute buttons will be randomised. Properly random, and not one of those 'tailored randoms to make random more suited to human beings', so you can have everything muted, nothing muted, and these can repeat several times. Real random is like that, although in a lot of modern software it has been 'tailored' to suit people's expectation - the classic example is iTunes, where the Shuffle function does not play the same track twice, even though a random selection might play it twice, or even thrice, or even... It seems that people report it as a problem if a random shuffle plays the same thing twice... So you set the number of multiples of the note count length, and click on the 'AutoRandom' button, and off it goes. Setting the multiple to 4, 8 or 16 sounds kind of musical, because too much exposure to popular music seems to have convinced many people that everything happens every 4, 8 or 16 bars at 120 bpm in 4/4 time. Since the example so far has been every 7 notes, then try 7 as the multiple and you will find that it might feel slightly early.

The second processing is MIDI velocity. Since the note count and Mute Pattern know which number each note is, then we can do interesting things to the velocity value of the notes. The clue is the 'Rise/Fall' button, and this has an Offset rotary control on the left side, and a Scaling rotary control on the right hand side. Rise increases the velocity value as the note count increases, whilst Fall decreases the velocity value as the note count increases. This means that, as with lots of stuff that I do, velocity matters! You should try MIDIoneOF with an Instrument that is velocity sensitive... The important thing to remember is that the velocity processing happens depending on the note count length, so with the 7 note example and a Fall button setting, then the first note will have the largest velocity value, then the velocity will drop over the next 6 notes to the 7th note, which will be the quietest (lowest MIDI velocity value), and finally, the 8th note will then be loud again, after which it will drop for th next 6 notes, and so on. The 7 note cycle will repeat until you change it.

Note that all of the processing happens based on just the notes themselves. MIDIoneOF takes all of its timing from thosee notes, not from the bars and beats within Live. So if your clip has notes in a complex rhythm, then MIDIoneOF will process the notes in that same complex rhythm. As I said, you can feed your own playing through MIDIoneOF if you wish... And I'm not going to mention Olafur Arnalds here...

The final processing is Probability, which is independent of the note count length! One thing that I have realised is that 100% is not enough, and I'm looking at this to see if there is anything I can do, but adding in extra notes is quite tricky in real time...

There's also the slightly red '!' "All Notes/Sounds Off" button in case you need to stop errant hanging notes. This may well signpost this as an 'experimental' device regardless of how I tag it in MaxForLive.com...

And that's the MIDIoneOF device. Hopefully you haven't seen anything quite like it before... because I much prefer not to repeat things that other people have already done. There have been a lot of Max For Live devices recently which are just people re-making a device which is already on Max For Live. I think that time is too short to waste it re-coding something which is already available!

Inside

I won't bore you with a counter, and I won't bother explaining why the count is from 2 to 16 and not 1 to 16 (1 is the obvious minimum, but it is really boring using a count of one!). Instead, this is probably a good place to do another in the occasional series of 'Things that Max doesn't have a pre-made object for...'

In this case, it's those 'Mute Buttons' that are the source of the problem. To mute the MIDI note when any of the mute buttons are highlighted requires what I call a 'wide' OR function - a 16-input OR gate. This isn't standard in Max...which is not hugely surprising... Now I know that you can use Boolean logic to transform the gate, but as far as I can see,  this doesn't really do anything other than mean that a different 'wide' gate and extra inversions are needed. So what did I do? I made a 16-input OR gate using a tree hierarchy of 2-input OR gates. Yep, I resorted to 'brute force and ignorance' to save time and effort. Sorry.


Two things are probably notable in this sub-patcher. First, there's the left-most input, which sets all of the outputs to zero. I've had all sorts of 'difficult to track down' problems caused by the gswitch object when there's no input on one of the two inputs (This would be a 'floating input' if this was hardware, which it isn't...), and so this ensures that that won't happen. Second, there's my standard 'use a blink to make both inputs trigger the output' approach, which enables the ORs to ripple downwards from either side. I'm sure there's a better way to do this whole 'Wide OR' functionality, but I have't had a flash of inspiration yet... It works well enough for my purposes.

Links

YouTube video on using Clip Envelopes - Features Clip Envelopes - in a video!
All Things Modular - Inspired by Modular - Darwin's blog has some interesting posts in it! Including this one where it refers to the above video on clip envelopes.

Getting MIDIoneOF

You can get MIDIoneOF here:

     https://maxforlive.com/library/device/6436/midioneof

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

     https://synthesizerwriter.blogspot.co.uk/2017/12/where-do-i-put-downloaded-amxd.html

(In Live 10, you can also just double-click on the .amxd file, but this puts the device in the same folder as all of the factory devices...)

Oh, yes, and sometimes last-minute fixes do get added, which is why sometimes a blog post is behind the version number of MaxForLive.com... and pictures may not always be the current version... but Schrodinger's cat's status is permanently uncertain...

Modular Equivalents

In terms of basic modular equivalents, then implementing MIDIoneOF in a modular synth is just a step sequencer (or a ring counter in old parlance) driven by gates or triggers instead of a clock, some toggle switches for selecting the steps, and some velocity processing in a CV utility. About 5 modules by my count, giving an ME of 5. I hope that this blog post makes more people think about pulling out that patch cable from the clock input of the step sequencer and connecting it to a gate instead of an LFO or a Clock Generator. Modulars synths have cliches too! 

---

If you find my writing helpful, informative or entertaining, then please consider visiting these links:


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




















   


No comments:

Post a comment