Sunday, 20 November 2016

MIDI Processing - MIDI f(x)_mr

MIDI Experimentation

My latest Max For Live MIDI device for Ableton Live is several MIDI processing functions in one! (some of them unusual and/or experimental)
  • Filtering                       (ok, so not very experimental), 
  • Note transpose             (er, just a bit ordinary...), 
  • Velocity shift               (quite unusual, and very useful), 
  • Note Invert                  (very unusual), 
  • Velocity invert             (experimental, and pretty unusual), and 
  • a deterministic pitch mapping utility that is based on pitch multiplication and modulo arithmetic             (very experimental). 
The name 'MIDIf(x)_mr' is intended to let people know that this is a unusual and different MIDI device.

Use at your own risk. (Putting 'Scale' or one of those other 'MIDI scale'-adjusting M4L devices after MIDIf(x)_mr (with appropriate settings in 'Scale'!) is recommended for those people who don't like too many accidentals infesting their music...) And have fun! (Oh, and if you get 'stuck' notes, then click on the '!' button to flush things clean again.)

MIDI f(x)_mr

Here are some details of the processing:

MIDI Filtering

The MIDI Filtering allows rapid removal of notes, continuous controllers, after-touch(channel pressure) or pitch-bend, and I often have it set so that it just lets notes through an filters everything else out.

Note transpose

Note transpose just transposes the incoming MIDI, and is included here because it is useful to have in a multi-purpose utility, but also because it was very useful during the development process! The rotary control is labelled "Offset' because that's what it is doing: adding an offset to the MIDI note numbers.

Velocity shift

Velocity shift (just rotate the 'Offset' control) is useful to compensate for keyboards the require playing hard to get decent amounts of velocity, or for sound modules that require high velocity inputs to produce a sound at a decent volume. The rotary control is labelled 'Offset' because it is adding an offset to the MIDI velocity value for Note On messages.

Note Invert

Note Invert is one of those 'fun' utilities that is usable once with someone who has never seen a reversed keyboard, where the high notes are on the left, and the low notes are on the right. Actually, it can also be used to create interesting bass notes that don't just predictably track the root. The 'Offset' rotary control can be used to set the keyboard so that any key you choose is the same on the inverted keyboard. I tend to use middle C (=60 sometimes) as my reference, but you may find it interesting to choose other values and see what happens.

Velocity invert

Velocity invert is another 'fun' function that upsets people who expect sounds to be louder when you play harder. But it is also very useful for creating 'velocity layering in layered sounds - use inverted velocity on one of the layers and you can control the two sounds just by playing harder or softer. Once again, the 'Offset' control is merely adding to the MIDI velocity value, and this time can be used to compensate for the bias of your keyboard's velocity calibration, or any bias in your sound generation modules. Also see this blog entry: Inverted MIDI Velocity

Pitch Mapping...

And finally, there's that weird-sounding deterministic pitch mapping utility that you were going to ignore... As it happens, not exploring it would be a pity because there's lots of scope for exploration here. You get two stages of 'pitch scaling, followed by wrapping round of the notes', which is achieved by multiplying the incoming pitch, and then applying modulo arithmetic to the result - and then doing it all again. Some people will tell you that multiplying MIDI note numbers does not produce useful results, whilst other people will tell you that you need to constrain the resulting interval madness with processing that wraps the result into manageable lumps. I'm with the 'others'.

So the 'Range' control lets you adjust from the usual '1 octave in = 1 octave out' scaling, to 1 octave in = 3.55 octaves out' super broad scaling where the two stages let you do this twice, resulting in a single octave spanning 7 octaves (and also meaning that a lot of notes are missing!).

The 'Limit' control can be used to bring that huge span under some sort of control. If you set the limit to 1, then you only get a single note out. if you set it to 12, the you get 12 notes out, and any input you put in just wraps round and round those 12, so the same 12 notes repeat themselves all across the keyboard range. If you set it to 128, then it is the same as if it was not there at all, of course!

The best way to learn how to use it is not to set the Range of one section to 1.10, leave the other Range at 1.00, and set both Limits to 128 - this gives a keyboard which is almost right (emphasis on 'almost'). Much better is to create an 8th note looped sequence (a rising scale is fine), and then to explore just one of the two processing sections. The 1.1 Range with a Limit of 12 is a good stating point - you will need to adjust the Offset control to get the output into a sensible range (watch the left and right numbers to either side of the 'MIDIf(x)_mr' title - I use middle C (=60 sometimes) and tweak the Offset to get 60 at the output). Listen to what happens with the looped sequence, and then try adjusting the Range or the Limit. Just hopping back and forth between a few range settings is pretty cool for starters...


The small white boxes are the usual 'memory' buttons that M4L provides. You shift-click in a box to save a setting, and just click on a box to recall the stored settings. Empty boxes are white in colour, whilst boxes containing saved settings ae orange. The current setting is bright orange.


The output of MIDIf(x)_mr is scaled in pitch, and so can contain all sorts of note numbers. Using something to constrain the notes to a scale is a good idea in many applications. You can use Ableton's own 'Scale' utility for this, or search 'Max for' for 'midi scale' devices, and se what comes up - when I searched there were several different possibilities to try out.


As usual, this is experimental stuff that I'm more than happy for you to play about with, and it may or may not do what you want, or even what I intended it to do. Let me know if you have any problems, and I may be able to find the time to fix it or even improve it...

I have added a new blog entry that explains some of what is happening inside the 'Warp' processing part of MIDIf(x)_mr. More information can also be found in this blog entry on one of the tools used to develop MIDIf(x)_mr.

Also see: Inverted MIDI Velocity

No comments:

Post a Comment