A minimalist MIDI (not MCU/HUI) control surface script for using the Korg nanoKontrol Studio with Ableton Live (updated 2024-03-09 for Live 12)
Please note: I work almost exclusively in Live's Arrangement view, so if you prefer a Session view workflow, this script probably isn't for you!
This is a Python Remote script for Ableton Live that lets me use a Korg nanoKontrol Studio exactly the way I want for my own very specific requirements:
- I work exclusively in Arrangement view
- I do a lot of volume automation but never on the track volume; always on a pre-fader Utility gain
- I use templated default MIDI/audio tracks with a Utility->Tuner(or VSTi->ChannelEQ->Compressor->EqEight->Utility channel strip
- I like to have a lot of free faders, knobs and buttons to assign to Live and VST parameters on the fly
- I don't care about being able to mix banks of tracks simultaneously by track volume fader - I prefer to deal with one channel at a time
- I use the jog wheel a fair bit and this works best in conjunction with some slightly custom functionality that can't be defined through simple Live MIDI mappings
- I have no need to be completely hands-off keyboard and mouse, so a mix controller doesn't need to do everything for me...
- ...but it's very handy to have spare buttons for the kind of studio controls I need within arms' reach when tracking physical instruments via microphone inputs
- MCU/HUI are a hopeless for this degree of flexibility/specificity in custom controls and on-the-fly mappings, and using MCU is normally the only way to use the jog wheel in Live - hence rolling my own, to get the best of both worlds
This script can be thought of as having a Transport section, a Current Track section, a Controller Bank section and a Master section.
Transport section
[Cycle]
- toggle loop on/off[Set]
- toggle cue point (marker) at current position[ <- ]
- jump to previous cue point (marker)[ -> ]
- jump to next cue point (marker)[ << ]
- set loop start point to current position[ >> ]
- set loop end point to current position[ |< ]
- continue playback from current position[ [] ]
- stop playback[ > ]
- play(jog)
- scrub song position backwards/forwards
Current Track section - Strip 1
[Mute]
- Toggle Highpass Filter in track's first instance of a Channel EQ device. If an EQ shift key (below) is pressed, that band's gain will be reset to 0dB[Solo]
- Shift key for Channel EQ High Gain (use with encoder)[Rec]
- Shift key for Channel EQ Mid Gain (use with encoder)[Select]
- Shift key for Channel EQ Low Gain (use with encoder)(encoder)
- Track Send A level (or EQ band gain when shift keys are held)<Fader>
- Gain parameter on track's last instance of a Utility device
Current Track section - Strip 2
[Mute]
- Current track mute toggle[Solo]
- Current track solo toggle[Rec]
- Current track record arm toggle[Select]
- Shift key to override mutual-exclusivity of Mute/Solo/Record(encoder)
- Current track pan<Fader>
- Current track volume
Controller Bank section - Strips 3-7
- All buttons, encoder knobs and faders can be mapped to whatever
Master section - Strip 8
[Mute]
- Tap tempo[Solo]
- Metronome on/off[Rec]
- unused[Select]
- MIDI Arrangement Overdub toggle(encoder)
- Preview/Cue volume (e.g. click track to headphones)<Fader>
- Main output volume
- Strips 1-8 work like a conventional multichannel DAW mix controller. CC values are factory default but on MIDI channel 2 rather than 1.
To use the script, you'll need to install the Korg Kontrol Editor from Korg's website and then write the scene set (nks_AbletonLive_echolevel.nktrl_st_set), which will occupy Scenes 1 & 2 on the device. They're similar to the nKS' factory defaults, the main differences being that the jog wheel is set up for 'Inc/Dec 2' mode with an acceleration of 2; and that the transport section on Scene 2 uses global MIDI channel rather than channel 2. Also the LED mode on both scenes is 'external', which means the device can receive feedback from Ableton Live and set its LEDs appropriately to reflect toggle states and so on.
To install the script itself, copy the nanokontrolstudio_echolevel directory to "C\ProgramData\Ableton\Live[your version]\Resources\MIDI Remote Scripts" on Windows 10, or even better, follow Ableton's own instructions (Win and Mac) to install it to your user library. I've tested this on Live 10, 11 and 12.
Then you'll need to select the script under Control Surface in Preferences, and also set nanoKontrol Studio as the Input and Output. Enable it for Track and Remote in the main MIDI I/O section as well, so you can easily create mappings yourself on the fly.
The script should be easy to tweak, but since lots of things live inside listener functions you'll probably need to do a restart of Ableton Live before changes will take effect. Keep an eye on Log.txt (found in Live's Preferences dir) to check for errors, and you can use self.show_message("blah") to write stuff to the lower left of Ableton Live's display for debugging purposes. It's the most appallingly frustrating dev workflow imaginable but I've not found a better way...
One candidate for tweaking might be the Utility Gain parameter: mine's mapped to a range of -inf to 6db, rather than Gain's maximum of 36dB: that's because a) if I ever need 36dB of gain on my level trim automation something's gone horribly wrong elsewhere and b) such a huge default range makes fader resolution way lower; by mapping it to a narrower range, finer-grained fader adjustments are possible. You might want to map to a higher maximum, or even cap it at 0dB.
Changing which devices and parameters are controlled in the currently selected track should also be easy, if you take a look at the listener callbacks where I loop devices/params and compare their names against string literals. You will get errors in your Log.txt (and probably break the entire script) if you pass an out-of-range value to the API. Most values have a getter for min/max, but generally dividing MIDI's 0-127 range by 127 to give you a normalised float value (0.0 to 1.0) will do the job fine.