Package: protocol0
Protocol0 Control Surface Script for AbletonProtocol0 is a control surface script for Ableton Live 11It is a "selected track control" like
script focused on working in session view.I've been specifically working on making the session recording more powerful and more adapted to my workflow.
It has a focus on :Recording external synths (both midi and audio) in a smart wayBeing able to export / import sub tracks so as to always work on flattened audio track with the possibility to recall the base (midi track) at a button push.The scripts react to a set of midi note and cc messages. I'm currently triggering those using a Faderfox EC4.This script is definitely a "working on my machine" script and is not generic to any layout / usage.
It should be interesting for a remote script dev though.FeaturesI started writing the script specifically because I thought recording my Prophet Rev2 was tedious.
Later on I realized I would probably produce better if I was working more in session view and experiment longer instead of rushing to
arrangement. So now it is more of a session view tool.
Regarding recording my goal was to achieve a satisfactory recording experience with hardware synths,
as well as being able to use heavy vsts that I could easily bounce to audio and recall.One of my main goals was to achieve a workflow where I had close to zero heavy vsts at any time, and a sleek set.Specifically the script aims to achieve :A better workflow in session viewA better workflow when using external synthesizersAn automated way to bounce big vsts tracks to audio and recall them easilyAn integration with my generic FaderFox EC4 midi controller (could be used by any midi configurable controllers).Use presses / long presses (both note messages) / button scrolls (cc messages) to trigger actions.NB : a number of actions are relative to the selected track, and the script sees certain types of group track as
one composite track (see External Synths).Other actions can be relative to the selected scene, clip, or to the song.A lot of little improvements in the session view including:Fixed length recordingRe recording audio from midi at a button's pushHandling of audio clip tails (recording and playing) to have perfect loops when recording hardwareA way to "scroll" (and inside scenes) and launch scenes with keyboard shortcutsA tool to bounce session to arrangementTools to split and crop scenesValidator code that can detect different kind of set configuration "errors" (routings, volumes, unused devices etc.)Some code to synchronize my push2 to the script (specifically the session component)A few other tools that can be found in the action_groups folderThe bigger part of the script is dedicated to handling external synths.External SynthsThe script is able to record both midi, audio and automation at the same time doing unlimited or fixed length
recordings.It activates only on a group track that has the following layout (in this order, any other layout will not be
detected) :a midi track (records midi)an audio track (records audio)the record button has 2 main modes :midi recording : will record midi and audio on the next scene availableaudio recording : will record audio from midi on this sceneThe backendThis script executes in the context of ableton's bundled python interpreter, like any script. Some things are not
possible in this environment like spawning processes or accessing win32apis (keyboard, mouse ..)
A simple example : clicking on a device show button is not possible from a "normal" script. To make this kind of thing
possible I've created a backend that you can find inthis repo.NB : quite some features are not implemented in the API (freezing, flattening, cropping .. but also dragging in or out tracks etc ..).
All of this is implemented using the backend mostly leveraging wild mouse clicks.The backend is exposing its api over midi, and I'm using loopMidi virtual ports to communicate with it.Without setting up the backend (might not be straightforward) the script will only partially work.As it's not possible to listen to multiple midi ports from a surface script I'm using a "proxy" surface script that forwards messages
from my backend on its port to the main script. Seethis repoThe same purpose would be achievable my external midi routing using e.g. midi ox. I like this dependency better.Installationmake bootstrapInstall the script in your remote scripts folder (for Live 11)make install_script_p0make install_script_p0_midito add a midi port proxyInstall the backendclone and follow the README install section of thebackend.You should alsoDevelopmentI've written a technical doc that details important parts of the script object model and techniques. Also, a few remote
scripts concepts are
explained.see this article(might be a bit
outdated)I'm working on dev and releasing working versions to masterI've been using DDD concepts to structure the script with a single central domain folderToolsmake testruns the test suite (pytest).make checkruns the linting tools and tests on the whole project. I'm using flake8, vulture and mypy.