3

Is it possible to create a clip in the session view of Ableton Live programmatically using the Python API?

More context: I'm hacking a MIDI Remote Script using the _Framework classes in. In response to an event trigger I want to fill a ClipSlot with a new midi clip.

The Live Object Model seems pretty restrictive on create actions—is it even possible to programmatically create a clip in Ableton Live?

pje
  • 21,801
  • 10
  • 54
  • 70
  • Seems likely to be impossible via Live API calls: https://forum.ableton.com/viewtopic.php?f=2&t=151056&hilit=create+clip+python – pje Dec 23 '12 at 15:54
  • Update: seems that as of Live 9, Push's RemoteScript invokes an API method called `Track.duplicate_clip_slot`: http://julienbayle.net/PythonLiveAPI_documentation/Live.Track.Track.html – pje Jun 26 '13 at 22:31

1 Answers1

1

not sure if this is frowned upon or not, but I was trying to do the same thing, and apparently it's now possible to create a clip using Live.ClipSlot.ClipSlot.create_clip()

from http://julienbayle.net/PythonLiveAPI_documentation/Live9.1.xml (Decompiled Live 9.1 API)

Live.ClipSlot.ClipSlot.create_clip() Method

create_clip( (ClipSlot)arg1, (float)arg2) -> None :

Creates an empty clip with the given length in the slot. Throws an error when called on non-empty slots or slots in non-MIDI >tracks. C++ signature : void create_clip(TPyHandle,double)

jars
  • 145
  • 2
  • 8