buildable
buildable allows you to edit and extend Ableton Live sets programmatically. For example, you could
have a single set that stores your common return tracks, and use buildable to add them to various
template sets.
Currently you can:
- copy tracks/returns from other sets.
- delete and re-order tracks/returns.
- edit key and MIDI mappings for many set elements.
- set some high-level view properties, like the session/arrangement state.
Installation
pip install buildable
Usage
For example, you could create a project containing set components that you want to mix together, and generate templates from them with something like:
from buildable import LiveSet
# Template bases containing MIDI/audio tracks.
jam_session = LiveSet.from_file('jam-session-tracks.als')
composition = LiveSet.from_file('composition-tracks.als')
# Shared main track and return tracks to be copied to the templates.
shared_structure = LiveSet.from_file('shared-structure.als')
for template_set in (jam_session, composition):
# Copy returns and main track from the shared set.
template_set.insert_return_tracks(shared_returns.return_tracks)
template_set.main_track = shared_main.main_track
# Assign tap tempo to key "p".
template_set.transport.tap_tempo_key_midi.persistent_key_string = "p"
# Assign crossfader to the mod wheel on MIDI channel 1.
jam_session.main_track.key_midi_crossfade_equal.channel = 0
jam_session.main_track.key_midi.crossfade_equal.note_or_controller = 1
# Switch to arrangement view.
composition.chooser_bar = LiveSet.CHOOSER_BAR_ARRANGEMENT
jam_session.write_to_file("/path/to/user-library/Templates/JamSession.als")
composition.write_to_file("/path/to/user-library/Templates/Composition.als")
Design
Live sets are represented natively as XML documents, and buildable objects mirror a subset of the
native document structure as closely as possible, with helpers for more complex operations like
copying tracks. XML elements are also exposed directly if you want to go off-piste. This helps with
flexibility and maintainability, but comes with some caveats:
- spelling mistakes and naming inconsistencies are carried over from the native format.
- some simple operations require using relatively complex accessors - for example, key/MIDI mappings
for sends are accessed using
e.g.
live_set.primary_tracks[0].device_chain.mixer.sends.track_send_holders[0].send.key_midi. buildablewon't stop you from setting values that are semantically valid, but invalid at runtime.
The best way to familiarize yourself with the native document structure is to examine existing Live
sets (using e.g. gunzip -c my-set.als) and/or look through the buildable source code.
Release files for buildable 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| buildable-0.4.0.tar.gz | 95.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| buildable-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 111.6 kB
Release files / buildable-0.4.0.tar.gz
| Download URL | buildable-0.4.0.tar.gz |
|---|---|
| Size | 95.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e64d2afd562ba23de596a48eca7743902fafcaa8330b006c940ec7d86bad9b44
|
|
BLAKE2b-256 checksum How to use checksums |
59b2a43c5d78f7e8a0150ef224288d1ac9759e366013fbce15d7890b0420f58c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|
Release files / buildable-0.4.0-py3-none-any.whl
| Download URL | buildable-0.4.0-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44fc323a8c67d0eee35a3ba78d340862ee820dbdfce3f1b620e335ddc6b6b77a
|
|
BLAKE2b-256 checksum How to use checksums |
a8ad1c32c6c96268006bc44dc4b2f647e9f199b0c0ffc4cbba1af32c5cb184bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|