Python MIDI remote scripts' documentation ...

Share your Ableton Live secrets here
Post Reply
Hielo Patagonia Sounds
Posts: 95
Joined: Fri Sep 17, 2004 11:47 am
Location: Reykjavik, Iceland
Contact:

Python MIDI remote scripts' documentation ...

Post by Hielo Patagonia Sounds » Sat Dec 28, 2013 7:36 am

When will Ableton team publish an official full documentation about Python remote scripts instead of leaving your customers in the "dark". This attitude about this specific aspect of Live is quite annoying and ridiculous. As a long time customer (since 2004), I start to be really upset about this !

:?

And most the informations on the internet about this subject are in-accurate since the v9.1 release : some v8 script's syntaxes have changed, the framework has evolved. I've spent several days studying the scripts and could not even make working a very basic script - STOP and PLAY button ...

:cry:

Hédi K.


Hielo Patagonia Sounds
Posts: 95
Joined: Fri Sep 17, 2004 11:47 am
Location: Reykjavik, Iceland
Contact:

Re: Python MIDI remote scripts' documentation ...

Post by Hielo Patagonia Sounds » Sat Dec 28, 2013 8:12 am

These 2 small scripts below are not working and generate some compilation problems (seen in the log.txt file in the preferences folder).

Code: Select all

#__init__.py
from BCR2000HPS import BCR2000HPS

def create_instance(c_instance):
    """ Creates and returns the BCR2000HPS script """
    return BCR2000HPS(c_instance)

Code: Select all

#BCR2000HPS.py
from __future__ import with_statement
import Live
from _Framework.ButtonElement import ButtonElement
from _Framework.ControlSurface import ControlSurface
#from _Framework.MixerComponent import MixerComponent
#from _Framework.SliderElement import SliderElement
from _Framework.TransportComponent import TransportComponent

CHANNEL = 0
NUM_TRACKS = 16

class BCR2000HPS(ControlSurface):
    __module__ = __name__
    __doc__ = ' BCR2000 hpsounds scripts '

    def __init__(self, c_instance):
        ControlSurface.__init__(self, c_instance)
        with self.component_guard():
            self._setup_transport_control()

    def _setup_transport_control(self):
        is_momentary = True
        transport = TransportComponent()
        transport.set_play_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 61))
        transport.set_stop_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 63))
        #transport.set_record_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 81))
        #transport.set_nudge_buttons(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 86), ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 85))
        #transport.set_loop_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 84))
        #transport.set_punch_buttons(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 82), ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 83))
        #transport.set_tempo_control(SliderElement(MIDI_CC_TYPE, CHANNEL, 26), SliderElement(MIDI_CC_TYPE, CHANNEL, 25))
:?

H.

Post Reply