Learning Midi Remote Scripts

Share your Ableton Live secrets here
Post Reply
lophMusic
Posts: 4
Joined: Thu Feb 11, 2021 9:23 pm

Learning Midi Remote Scripts

Post by lophMusic » Sat Feb 20, 2021 9:37 pm

Hello forum! :)

I've spent some time tying to learn how to write Midi Remote Scripts using Python with Ableton 10. For that matter, I've learned most of the things by "Try & Error", this awesome tutorial about _Framework (remotescripts.blogsport.com)
and this API Documentation (www.structure-void.com).

Though, I'm slowly getting a grip on coding _Framework, there're still a couple of things, I keep wondering about:
1. Browsing the Ableton scrtipt directory, I've noticed scripts called "_Tools" (seems to be legacy-code from Ableton 6), "_UserScript" and most of all "_Generic". Does anybody have information about these classes, or a least point me into the direction to find those informations myself?

2. Like I said before: I did most of my own 'training' using _Framework, but the current scripts don't use those classes anymore, instead they use some classes to be found in ./ableton/v2/*. So, in order to adjust the functionality of my current Masterkeyboard with my own code, I feel like I have to understand those classes better. Again: Any help to find more information on those classes is much appreciated.

Unfortunately it's somehow very hard to find any information about scripting ableton > version 9, so I'm really running out of ideas where to look...

The Rabbits
Posts: 84
Joined: Tue Apr 07, 2020 2:23 pm

Re: Learning Midi Remote Scripts

Post by The Rabbits » Sun Feb 21, 2021 8:59 am

Have a look here for decompiled versions of all the standard scripts.

github/gluon/AbletonLive11_MIDIRemoteScripts

I found a few useful bits here, but there is no useful documentation. The main thing I got from digging through the code was the limitations of the model.

I've been doing the same over the last month or so. Taking the opportunity to learn Python as well as making controlling live with my Launchkey more efficient.

Those limitations are frustrating!!

bxn
Posts: 13
Joined: Sun Nov 08, 2020 3:02 pm

Re: Learning Midi Remote Scripts

Post by bxn » Mon Mar 01, 2021 10:25 pm

[mod edit]
BXN, your message was breaking the terms of the ClyphX Pro EULA so I deleted it.
You're welcome to share info/knowledge, but make sure first that you have the rights to do so - especially when it's about decompyling code.
thx


lophMusic
Posts: 4
Joined: Thu Feb 11, 2021 9:23 pm

Re: Learning Midi Remote Scripts

Post by lophMusic » Fri May 14, 2021 10:19 pm

Thanks for all your helpful answers.

I still find it difficult to find any information about remote scripts.

Right now I have the following problem:
I'm trying to use four buttons to navigate through tracks and scenes, so I can arm (or solo, or mute) the selected track.

For this I'm using ./ableton/v2/[...] classes, because the script I'm trying to modify uses them.

To 'session-record', I've reused previous code:

Code: Select all

	self._session_recording = SessionRecordingComponent(name=u'Session_Recording', is_enabled=False, layer=Layer(record_button=self._record_button))
        self._session_recording.set_enabled(True)
To navigate through tracks (left/right) and scenes (up/down), I've found ViewControlComponent()

Code: Select all

	    self._view_control = ViewControlComponent()
            self._view_control.set_next_track_button(self._pad[3])
            self._view_control.set_prev_track_button(self._pad[1])
            self._view_control.set_prev_scene_button(self._pad[6])
            self._view_control.set_next_scene_button(self._pad[2])
To arm a selected track, I've added a value_listener to the pad that should arm the track when pressed

Code: Select all

# In __init__()
	self._pad[0].add_value_listener(self.pad1_callback)

#later...
def pad1_callback(self, value):
        if not value:
            return
	 selected_track = self._transport.song.view.selected_track
         name = selected_track.name
         self._current_strip.set_arm_button(None)
         self._mixer._selected_strip.set_arm_button(self._pad[0]) # any but this line don't seem to be necessary
         self._current_strip = self._mixer._selected_strip
The problem is:
That code seems to work, unless I've finished recording a couple of clips (with the playback always running). Then the arm_button keeps activating the same track, no matter which one is currently selected. When that happens, I have to restart the playback and things are working again for some time.

To tell the truth, I just have a rough conception of what I'm doing, because lots and lots of try-and-error was involved to get to the code, I'm using right now.

Any help on thatone is appreciated.

I also have tons of little questions, but this ableton forum seems to be the only place to ask questions about remote scripts, but on the other hand I don't want to bore you to death with a lot of little silly questions (e.g. "what's the difference between track and strip?" "what's a session_ring supposed to be for?" "what's a tracks_provider?" etc..)

So, if anyone knows a good place to ask stupid remode script related questions, I'd appreciate that, too.

lophMusic
Posts: 4
Joined: Thu Feb 11, 2021 9:23 pm

Re: Learning Midi Remote Scripts

Post by lophMusic » Sat May 15, 2021 6:10 pm

Okay, I've found a workaround. I don't use set_arm_button() of ViewControlComponent anymore, but used the Live-API instead:

Code: Select all

	    selected_track = self._transport.song.view.selected_track
            name = selected_track.name
            name_prev = self._current_track.name   

            if selected_track.can_be_armed:
                if self._current_track.name != selected_track.name: # ugly but works for now
                    self._current_track.arm = False
                    
                selected_track.arm = not selected_track.arm

                self._current_track = selected_track
Still, I'm confused like hell :) I feel so lonely learning those things...

Post Reply