Editing Python Script for Minilab MKII

Discuss Live-ready controllers other than Push.
Post Reply
manninosi
Posts: 1
Joined: Wed Dec 04, 2019 2:43 am

Editing Python Script for Minilab MKII

Post by manninosi » Wed Dec 04, 2019 2:55 am

Hello!

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
I'm trying to test that if the clip is playing and the button is triggered again, then set the stopped value "high" to stop the clip. However, that's not working so I'm hoping to get some guidance. Any help is greatly appreciated!

Part of this is just to develop a better understanding of python and how it interfaces with Ableton and MIDI controllers.

Thanks!

nastika
Posts: 2
Joined: Thu Mar 02, 2023 4:22 pm

Re: Editing Python Script for Minilab MKII

Post by nastika » Thu Mar 02, 2023 4:24 pm

Hi, very interesting... can u make the knobs 8 and 16 in the bank 8/Pad8 ableton factory preset, work lower?
its too fast when im exploring the scenes and clip scene lets say.

Post Reply