I'm working on editing the python scripts for the Arturia Minilab mkII script. I found the "unofficial" python script here:
https://github.com/gluon/AbletonLive10. ... oteScripts
I've worked with python a bunch before, but never for this application. Currently the mkII is set up in memory pad 8. When selected, all of the pads are associated to a scene. A user can use encoders 8 & 16 to scroll through scenes and clips. When you press the pad, while the track is armed, a recording is started. Once you press the pad again it stops and starts to loop the track. The LED on the pad changes if there is a clip available to play (yellow), recording (red), and playing (green). Using pads 9-16 have the some functionality but for the row below, which feels awkward.
I'd like to be able to stop and clip if the selected one is playing and I press the associated pad. Right now it just restarts the clip. I'd like to place this all in pads 9-16 to focus on the selected row, while pads 1-8 are being used for finger drums.
First, I'm just trying to get the clip to stop. This seems to be in the "SessionComponent.py" file under the minilab_mkII directory. Here is the chunk of code I've been modifying:
Code: Select all
def _feedback_value(self):
if self._clip_slot != None:
if self.has_clip():
clip = self._clip_slot.clip
if clip.is_triggered: #Pad is pressed
if clip.will_record_on_start: #There is no clip, so it will record
return TRIGGERED_TO_RECORD_VALUE #Both of theses will turn red
return TRIGGERED_TO_PLAY_VALUE
if clip.is_playing and clip.is_triggered:#Clip is playing
clip.set_stopped_value(127)
#if clip.is_recording: #If user is also recording over said clip
# return RECORDING_VALUE
#return STARTED_VALUE
return TEST_VALUE
return STOPPED_VALUE
return
Part of this is just to develop a better understanding of python and how it interfaces with Ableton and MIDI controllers.
Thanks!