Python baseline MIDI Remote Script Control Surface extends the _framework instance of the experimental, undocumented, and officially unsupported API for Ableton.
After working with this script for nearly a year I had the opportunity to clean up the code-set to a usable, stable point providing some necessary decoupled script blocks. Up until now all of the scripts for this purpose have had serious flaws and problems inhibiting them from widespread use. Here’s some notes on problems and changes I tackled:
- Stripped out all ambient calls to unneeded imports and tested thoroughly
- Removed all of the linear math for clip launch assignment and replaced with Python lists. This allows non-linear mapping, removed complicated and unnecessary math as well as increases the functionality and integration for more devices.
- Decoupled the scene launch and stop clip assignments. On most scripts this was handled in the clip assignment (with complicated math). Before my edits using scene launch or stop clip quantities that did not match scene and track count (respectively) would cause errors or call for unnecessary math. These assignments are now handled via Python lists. Scene launch and Stop Clip actions are reduced to 3 lines of code (before error checking protocols)
- Functionality and customization of this script is now infinitely easier. This comes in 2 parts.
- First is the use of a simplified assignment system (configuration) that is easy for non-programmers to adjust numbers. Help[ in the comments and extra lines of code are very helpful for those looking to getting things working faster.
- Second is the introduction of real-time error checking on the various decoupled element assignment routines. In short, only real and valid Python lists or variables are assigned. A simple conditional check on the presence and validity of information in the assignment (configuration area) is central. One of many benefits of strong typing.
- As mentioned, inline error checking is standard on my scripts. This error checking is not perfect (e.g. will not check for duplicate number assignment). Regardless, this is a HUGE step forward on this work. Further error checking is introduced in the web-app detailed below.
- log.txt error reporting included from compile to close using easy to read messages from the developer (me) as well as the native error logging form the API.
- This script is stable. Error are not present, log.txt files have been parsed as well as through testing on many machines and operating systems.
- This work is so solid I have since translated this script into a web-app for writing custom control surfaces for the Ableton Python API via http://modern.dj/app (set to launch September 2011).
- This application will write Mac OSX and Windows compliant Python files for the Python API (of Ableton).
- The joke “We are using Linux and PHP to write Python files for use on Windows and Mac.”
- Full and appropriate error checking is in place via the web-app (such as duplicate number assignment checks).
- Remote scripts are stored against your user (id).
- The entire app runs on Codeigniter. Additional scripting (estimate) stands at 3kloc for the period ending August 2011 (late alpha). This app (including login and storage mechanism) is estimated at 10kloc for beta->go-live.
- Generates dynamic and logical forms to input mapping numbers.
- Includes a Note+decoration+octave tool allowing the user to obtain values form the MIDI mapping mode in Ableton. This is a one-to-one relationship of data values, another huge step forward.
- Writes the Python file, stored the file on server, delivers the user a *.zip file.
- Allows the user to include a handle and device name to eliminate collisions. This naming influences the class, file, and folder names as well as calls inside the script.
- With the addition of the login system MRS files reach C.R.U.D. status.
- This application allows anyone to write Python for the API regardless of skills and programming “know how”
- This application will write Mac OSX and Windows compliant Python files for the Python API (of Ableton).
- Git Hub Project
- Documentation
- View the App, requires login : http://modern.dj/app