Ableton Extensions Python SDK

API reference

The whole SDK surface — 123 methods — wrapped as Pythonic objects. Properties are reads (and writes where shown); methods perform actions.

Entry points

SymbolDescription
connect(url?) → ApplicationScripting: connect to the Bridge, return the root.
Extension(name, author?, version?)An extension with menu actions/commands. Call .run().

Extension

MemberDescription
@app.context_menu(scope, title)Add a right-click action; handler gets the typed object.
@app.command(id)Register a command by id.
@app.on_selection(scope)Act on the current arrangement / clip-slot selection.
app.song / ui / resources / environmentService accessors.
app.transaction()Context manager → one undo step.
app.execute_command(id, *args)Fire a registered command programmatically.
app.run()Connect, register everything, handle events until stopped.

Application / Song

MemberDescription
app.songThe Song.
song.tracks / return_tracks / main_trackTrack collections.
song.scenes / cue_pointsScenes and arrangement cue points.
song.tempo (read/write)BPM.
song.grid_quantization / grid_is_tripletEditing grid.
song.root_note / scale_name / scale_mode / scale_intervalsCurrent scale.
song.create_midi_track() / create_audio_track()Add tracks.
song.create_scene(i) / create_cue_point(time)Add scene / cue point.
song.delete_track / delete_scene / delete_cue_point(obj)Remove.
song.duplicate_track / duplicate_scene(obj)Duplicate.

Track · MidiTrack · AudioTrack

MemberDescription
name (r/w), mute, solo, arm (r/w)Track state.
muted_via_solo, group_trackRead-only state.
clip_slots / take_lanes / arrangement_clips / devicesContents.
mixerTrackMixer (volume, panning, sends).
insert_device(name, i), delete_device(d), duplicate_device(d)Devices.
create_take_lane()New take lane.
delete_clip(c), clear_clips_in_range(a, b)Arrangement clips.
MidiTrack.create_midi_clip(start, dur)New arrangement MIDI clip.
AudioTrack.create_audio_clip(path, start, dur?, …)New arrangement audio clip.

Clip · MidiClip · AudioClip

MemberDescription
name (r/w), looping (r/w), color (r/w), muted (r/w)Clip state.
start_time / end_time / duration / start_marker / end_marker / loop_start / loop_endTiming (read-only).
MidiClip.notes (r/w)List of NoteDescription.
AudioClip.file_pathSource file.
AudioClip.warping (r/w), warp_mode (r/w), warp_markersWarp settings.

NoteDescription

pitch, start_time, duration (required) · velocity, muted, probability, velocity_deviation, release_velocity, selected (optional).

ClipSlot · TakeLane · Scene · CuePoint

MemberDescription
ClipSlot.clip, create_midi_clip(len), create_audio_clip(path,…), delete_clip()Session slot.
TakeLane.name (r/w), clips, create_midi_clip(s,d), create_audio_clip(path,s,…)Comp take lane.
Scene.name (r/w), tempo, signature_numerator/denominatorScene.
CuePoint.time, name (r/w)Arrangement locator.

Devices & parameters

MemberDescription
Device.name, parametersA device.
DeviceParameter.name / min / max / is_quantized / default_value / value_itemsParam metadata.
DeviceParameter.value (r/w), get_value() / set_value(v)Internal value.
Simpler.sample, replace_sample(path)Simpler.
RackDevice.chains, insert_chain(i)Audio Effect / Instrument Rack.
DrumRack.chainsDrumChain.receiving_note (r/w)Drum Rack.
Chain.devices / mixer, insert_device / delete_device / duplicate_deviceA chain.
TrackMixer / ChainMixer.volume / panning / sendsMixer params.

Navigation & services

MemberDescription
obj.parentCanonical parent of any object (clip → track, device → chain…).
ui.prompt(label, default="") → str | NoneText-input dialog (no HTML). None if cancelled.
ui.confirm(message) → boolYes/no dialog (no HTML).
ui.choose(label, options) → str | NoneDropdown dialog (no HTML). None if cancelled.
ui.modal(html, w, h) → strCustom webview dialog; send(v) is injected for you.
ui.progress(text, fn)Progress bar around fn(update, abort).
resources.import_into_project(path) → strCopy a file into the Set.
resources.render_pre_fx_audio(track, start, end) → strRender a range to WAV.
environment.storage_directory / temp_directory / languageHost paths & locale.

Errors

All raise from AbletonError: DeletedObjectError (stale/invalid handle), WrongTypeError, InvalidArgumentError, BridgeTimeoutError, BridgeConnectionError.

Ableton Extensions Python SDK · MIT · GitHub