p0-script-2


Namep0-script-2 JSON
Version 1.0.2 PyPI version JSON
download
home_page
SummaryProtocol0 ableton remote script
upload_time2023-06-03 04:25:07
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2023 Thibault Lebrun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords remote script ableton
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Protocol0 Control Surface Script for Ableton

Protocol0 is a control surface script for Ableton Live (tested on 11 and 10)

It 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 way
- Being 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.

## Features

I 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 view
- A better workflow when using external synthesizers
- An automated way to bounce big vsts tracks to audio and recall them easily
- An 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 recording
> - Re recording audio from midi at a button's push
> - Handling of audio clip tails (recording and playing) to have perfect loops when recording hardware
> - A way to "scroll" (and inside scenes) and launch scenes with keyboard shortcuts
> - A tool to bounce session to arrangement
> - Tools to split and crop scenes
> - Validator 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 folder

<br><br>
The bigger part of the script is dedicated to handling external synths.

### External Synths

- The 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 available
    - audio recording : will record audio from midi on this scene

## The backend

This 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 in [this repo](https://github.com/lebrunthibault/Protocol0-Backend).

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. See [this repo](https://github.com/lebrunthibault/Protocol0-Midi-Surface-Script)
> The same purpose would be achievable my external midi routing using e.g. midi ox. I like this dependency better.

## Installation

### Install the backend

- clone and follow the README install section of the [backend](https://github.com/lebrunthibault/Protocol0-Backend).
- You should also clone the [companion midi script](https://github.com/lebrunthibault/Protocol0-Midi-Surface-Script) to
  receive data back from the backend

### Install the script

- clone the repo in your remote scripts directory
- create a .env.json file by duplicating the .env.example.json and fill it
- create a python virtual env, activate it and `pip install -r .\requirements.txt`
- Try using a configurable midi controller to match the mappings in ./application/control_surface/group. The main
  commands are defined in ActionGroupMain


## Development

I'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](https://lebrunthibault.github.io/post/music/protocol0/p0-technical-overview/) (might be a bit
outdated)

I'm working on dev and releasing working versions to master

I've been using DDD concepts to structure the script with a single central domain folder

### Tools

- `make test` runs the test suite (pytest).
- `make check` runs the linting tools and tests on the whole project. I'm using flake8, vulture and mypy.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "p0-script-2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "remote script,ableton",
    "author": "",
    "author_email": "Thibault Lebrun <thibaultlebrun@live.fr>",
    "download_url": "https://files.pythonhosted.org/packages/7b/04/20c77576da7789dbd5522f2af01c2dea5d816c75ac17785388a639382f5a/p0-script_2-1.0.2.tar.gz",
    "platform": null,
    "description": "# Protocol0 Control Surface Script for Ableton\r\n\r\nProtocol0 is a control surface script for Ableton Live (tested on 11 and 10)\r\n\r\nIt is a \"selected track control\" like\r\nscript focused on working in session view. \r\n\r\nI've been specifically working on making the session recording more powerful and more adapted to my workflow.\r\nIt has a focus on :\r\n- Recording external synths (both midi and audio) in a smart way\r\n- Being 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.\r\n\r\nThe scripts react to a set of midi note and cc messages. I'm currently triggering those using a Faderfox EC4.\r\n> This script is definitely a \"working on my machine\" script and is not generic to any layout / usage.\r\n> It should be interesting for a remote script dev though.\r\n\r\n## Features\r\n\r\nI started writing the script specifically because I thought recording my Prophet Rev2 was tedious. \r\nLater on I realized I would probably produce better if I was working more in session view and experiment longer instead of rushing to\r\narrangement. So now it is more of a session view tool. \r\nRegarding recording my goal was to achieve a satisfactory recording experience with hardware synths,\r\nas well as being able to use heavy vsts that I could easily bounce to audio and recall.\r\n\r\nOne of my main goals was to achieve a workflow where I had close to zero heavy vsts at any time, and a sleek set.\r\n\r\nSpecifically the script aims to achieve :\r\n\r\n- A better workflow in session view\r\n- A better workflow when using external synthesizers\r\n- An automated way to bounce big vsts tracks to audio and recall them easily\r\n- An integration with my generic FaderFox EC4 midi controller (could be used by any midi configurable controllers).\r\n    - Use presses / long presses (both note messages) / button scrolls (cc messages) to trigger actions.\r\n    - NB : a number of actions are relative to the selected track, and the script sees certain types of group track as\r\n      one composite track (see External Synths).\r\n    - Other actions can be relative to the selected scene, clip, or to the song.\r\n- A lot of little improvements in the session view including:\r\n\r\n> - Fixed length recording\r\n> - Re recording audio from midi at a button's push\r\n> - Handling of audio clip tails (recording and playing) to have perfect loops when recording hardware\r\n> - A way to \"scroll\" (and inside scenes) and launch scenes with keyboard shortcuts\r\n> - A tool to bounce session to arrangement\r\n> - Tools to split and crop scenes\r\n> - Validator code that can detect different kind of set configuration \"errors\" (routings, volumes, unused devices etc.)\r\n> - Some code to synchronize my push2 to the script (specifically the session component)\r\n> - A few other tools that can be found in the action_groups folder\r\n\r\n<br><br>\r\nThe bigger part of the script is dedicated to handling external synths.\r\n\r\n### External Synths\r\n\r\n- The script is able to record both midi, audio and automation at the same time doing unlimited or fixed length\r\n  recordings.\r\n- It activates only on a group track that has the following layout (in this order, any other layout will not be\r\n  detected) :\r\n    - a midi track (records midi)\r\n    - an audio track (records audio)\r\n- the record button has 2 main modes :\r\n    - midi recording : will record midi and audio on the next scene available\r\n    - audio recording : will record audio from midi on this scene\r\n\r\n## The backend\r\n\r\nThis script executes in the context of ableton's bundled python interpreter, like any script. Some things are not\r\npossible in this environment like spawning processes or accessing win32apis (keyboard, mouse ..)\r\nA simple example : clicking on a device show button is not possible from a \"normal\" script. To make this kind of thing\r\npossible I've created a backend that you can find in [this repo](https://github.com/lebrunthibault/Protocol0-Backend).\r\n\r\nNB : quite some features are not implemented in the API (freezing, flattening, cropping .. but also dragging in or out tracks etc ..).\r\nAll of this is implemented using the backend mostly leveraging wild mouse clicks.\r\n\r\nThe backend is exposing its api over midi, and I'm using loopMidi virtual ports to communicate with it.\r\n\r\n> Without setting up the backend (might not be straightforward) the script will only partially work.\r\n\r\n> 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\r\n> from my backend on its port to the main script. See [this repo](https://github.com/lebrunthibault/Protocol0-Midi-Surface-Script)\r\n> The same purpose would be achievable my external midi routing using e.g. midi ox. I like this dependency better.\r\n\r\n## Installation\r\n\r\n### Install the backend\r\n\r\n- clone and follow the README install section of the [backend](https://github.com/lebrunthibault/Protocol0-Backend).\r\n- You should also clone the [companion midi script](https://github.com/lebrunthibault/Protocol0-Midi-Surface-Script) to\r\n  receive data back from the backend\r\n\r\n### Install the script\r\n\r\n- clone the repo in your remote scripts directory\r\n- create a .env.json file by duplicating the .env.example.json and fill it\r\n- create a python virtual env, activate it and `pip install -r .\\requirements.txt`\r\n- Try using a configurable midi controller to match the mappings in ./application/control_surface/group. The main\r\n  commands are defined in ActionGroupMain\r\n\r\n\r\n## Development\r\n\r\nI've written a technical doc that details important parts of the script object model and techniques. Also, a few remote\r\nscripts concepts are\r\nexplained. [see this article](https://lebrunthibault.github.io/post/music/protocol0/p0-technical-overview/) (might be a bit\r\noutdated)\r\n\r\nI'm working on dev and releasing working versions to master\r\n\r\nI've been using DDD concepts to structure the script with a single central domain folder\r\n\r\n### Tools\r\n\r\n- `make test` runs the test suite (pytest).\r\n- `make check` runs the linting tools and tests on the whole project. I'm using flake8, vulture and mypy.\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Thibault Lebrun  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Protocol0 ableton remote script",
    "version": "1.0.2",
    "project_urls": {
        "repository": "https://github.com/lebrunthibault/code"
    },
    "split_keywords": [
        "remote script",
        "ableton"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "46144230fa5f43beb411a040ab48f35ffc569604d3e7e482ba61b8b55efb22a4",
                "md5": "fd075daf41df27d0f330acf7eca5e88c",
                "sha256": "5f3bc9b18f953d10c0f405cf240890f11a801c121cc82fb720a797772b69082e"
            },
            "downloads": -1,
            "filename": "p0_script_2-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fd075daf41df27d0f330acf7eca5e88c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 1660156,
            "upload_time": "2023-06-03T04:25:03",
            "upload_time_iso_8601": "2023-06-03T04:25:03.959880Z",
            "url": "https://files.pythonhosted.org/packages/46/14/4230fa5f43beb411a040ab48f35ffc569604d3e7e482ba61b8b55efb22a4/p0_script_2-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b0420c77576da7789dbd5522f2af01c2dea5d816c75ac17785388a639382f5a",
                "md5": "d11f7f1ae9890daa3d2c21a9ac26bf9d",
                "sha256": "2e893f79a1a87306f7bf9c38663c3d4e473cb4803cba27902934a36a3ccaf747"
            },
            "downloads": -1,
            "filename": "p0-script_2-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d11f7f1ae9890daa3d2c21a9ac26bf9d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 1319962,
            "upload_time": "2023-06-03T04:25:07",
            "upload_time_iso_8601": "2023-06-03T04:25:07.421843Z",
            "url": "https://files.pythonhosted.org/packages/7b/04/20c77576da7789dbd5522f2af01c2dea5d816c75ac17785388a639382f5a/p0-script_2-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-03 04:25:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lebrunthibault",
    "github_project": "code",
    "github_not_found": true,
    "lcname": "p0-script-2"
}
        
Elapsed time: 0.20737s