Combine and edit Ableton Live sets (.als files).
Project description
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
. buildable
won'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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file buildable-0.4.0.tar.gz
.
File metadata
- Download URL: buildable-0.4.0.tar.gz
- Upload date:
- Size: 95.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e64d2afd562ba23de596a48eca7743902fafcaa8330b006c940ec7d86bad9b44 |
|
MD5 | cbc3f7e21d28ccfca8ff0b3dc9474674 |
|
BLAKE2b-256 | 59b2a43c5d78f7e8a0150ef224288d1ac9759e366013fbce15d7890b0420f58c |
File details
Details for the file buildable-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: buildable-0.4.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44fc323a8c67d0eee35a3ba78d340862ee820dbdfce3f1b620e335ddc6b6b77a |
|
MD5 | 3827b235f3161c07796e94ae9533dc3b |
|
BLAKE2b-256 | a8ad1c32c6c96268006bc44dc4b2f647e9f199b0c0ffc4cbba1af32c5cb184bb |