def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._track = None
     self._device = None
     self._gain_controls = None
     self._cut_buttons = None
     return
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._track = None
     self._device = None
     self._freq_control = None
     self._reso_control = None
     return
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._track = None
     self._device = None
     self._gain_controls = None
     self._cut_buttons = None
     return
예제 #4
0
 def __init__(self, c_instance):
     """ Define and Initialise standard behaviour """
     object.__init__(self)
     self._c_instance = c_instance
     self._midi_map_handle = None
     self._pad_translations = None
     self._suggested_input_port = str('')
     self._suggested_output_port = str('')
     self._modes = []
     self._components = []
     self._displays = []
     self._controls = []
     self._device_component = None
     self._forwarding_registry = {}
     self._timer_callbacks = []
     self._scheduled_messages = []
     self._in_build_midi_map = False
     self._suppress_requests_counter = 0
     self._rebuild_requests_during_suppression = 0
     ControlSurfaceComponent.set_song_and_application(self.song(), self.application())
     ControlElement.set_register_control_callback(self._register_control)
     ControlElement.set_send_midi_callback(self._send_midi)
     InputControlElement.set_mapping_callback(self._install_mapping)
     InputControlElement.set_forwarding_callback(self._install_forwarding)
     InputControlElement.set_translation_callback(self._translate_message)
     ControlSurfaceComponent.set_register_component_callback(self._register_component)
     ControlSurfaceComponent.set_register_timer_notification_callback(self._register_timer_callback)
     ControlSurfaceComponent.set_unregister_timer_notification_callback(self._unregister_timer_callback)
     ControlSurfaceComponent.set_request_rebuild_callback(self.request_rebuild_midi_map)
     SessionComponent.set_highlighting_callback(self._set_session_highlight)
     self.song().add_tracks_listener(self._on_track_list_changed)
     self.song().add_scenes_listener(self._on_scene_list_changed)
     self.song().view.add_selected_track_listener(self._on_selected_track_changed)
     self.song().view.add_selected_scene_listener(self._on_selected_scene_changed)
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._modes_buttons = []
     self._mode_toggle = None
     self._mode_listeners = []
     self._ModeSelectorComponent__mode_index = -1
     return None
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._track = None
     self._device = None
     self._freq_control = None
     self._reso_control = None
     return
예제 #7
0
    def disconnect(self):
        """ Live -> Script: Called right before we get disconnected from Live """
        for message in self._scheduled_messages:
            if (message['Parameter'] != None):
                message['Message'](message['Parameter'])
            else:
                message['Message']()

        self._scheduled_messages = None
        self._forwarding_registry = None
        for component in self._components:
            component.disconnect()

        for control in self._controls:
            control.disconnect()

        self._controls = None
        self._components = None
        self._displays = None
        self._timer_callbacks = None
        self._device_component = None
        self._pad_translations = None
        ControlElement.release_class_attributes()
        InputControlElement.release_class_attributes()
        ControlSurfaceComponent.release_class_attributes()
        SessionComponent.release_class_attributes()
        self.song().remove_tracks_listener(self._on_track_list_changed)
        self.song().remove_scenes_listener(self._on_scene_list_changed)
        self.song().view.remove_selected_track_listener(self._on_selected_track_changed)
        self.song().view.remove_selected_scene_listener(self._on_selected_scene_changed)
예제 #8
0
    def set_enabled(self, enable):
        assert isinstance(enable, type(False))
        if (self.is_enabled() != enable):
            for component in self._sub_components:
                component.set_enabled(enable)

            ControlSurfaceComponent.set_enabled(self, enable)
예제 #9
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._stop_button = None
     self._play_button = None
     self._ffwd_button = None
     self._rwd_button = None
     self._loop_button = None
     self._punch_in_button = None
     self._punch_out_button = None
     self._record_button = None
     self._tap_tempo_button = None
     self._nudge_up_button = None
     self._nudge_down_button = None
     self._metronom_button = None
     self._overdub_button = None
     self._tempo_control = None
     self._tempo_fine_control = None
     self._song_position_control = None
     self._rwd_button_pressed = False
     self._ffwd_button_pressed = False
     self._fine_tempo_needs_pickup = True
     self._prior_fine_tempo_value = -1
     self.song().add_loop_listener(self._on_loop_status_changed)
     self.song().add_punch_in_listener(self._on_punch_in_status_changed)
     self.song().add_punch_out_listener(self._on_punch_out_status_changed)
     self.song().add_record_mode_listener(self._on_record_status_changed)
     self.song().add_is_playing_listener(self._on_playing_status_changed)
     self.song().add_nudge_down_listener(self._on_nudge_down_changed)
     self.song().add_nudge_up_listener(self._on_nudge_up_changed)
     self.song().add_metronom_listener(self._on_metronom_changed)
     self.song().add_overdub_listener(self._on_overdub_changed)
예제 #10
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._stop_button = None
     self._play_button = None
     self._ffwd_button = None
     self._rwd_button = None
     self._loop_button = None
     self._punch_in_button = None
     self._punch_out_button = None
     self._record_button = None
     self._tap_tempo_button = None
     self._nudge_up_button = None
     self._nudge_down_button = None
     self._metronom_button = None
     self._overdub_button = None
     self._tempo_control = None
     self._tempo_fine_control = None
     self._song_position_control = None
     self._rwd_button_pressed = False
     self._ffwd_button_pressed = False
     self._fine_tempo_needs_pickup = True
     self._prior_fine_tempo_value = -1
     self.song().add_loop_listener(self._on_loop_status_changed)
     self.song().add_punch_in_listener(self._on_punch_in_status_changed)
     self.song().add_punch_out_listener(self._on_punch_out_status_changed)
     self.song().add_record_mode_listener(self._on_record_status_changed)
     self.song().add_is_playing_listener(self._on_playing_status_changed)
     self.song().add_nudge_down_listener(self._on_nudge_down_changed)
     self.song().add_nudge_up_listener(self._on_nudge_up_changed)
     self.song().add_metronom_listener(self._on_metronom_changed)
     self.song().add_overdub_listener(self._on_overdub_changed)
예제 #11
0
    def set_enabled(self, enable):
        assert isinstance(enable, type(False))
        if (self.is_enabled() != enable):
            for component in self._sub_components:
                component.set_enabled(enable)

            ControlSurfaceComponent.set_enabled(self, enable)
예제 #12
0
    def disconnect(self):
        """ Live -> Script: Called right before we get disconnected from Live """
        for message in self._scheduled_messages:
            if (message['Parameter'] != None):
                message['Message'](message['Parameter'])
            else:
                message['Message']()

        self._scheduled_messages = None
        self._forwarding_registry = None
        for component in self._components:
            component.disconnect()

        for control in self._controls:
            control.disconnect()

        self._controls = None
        self._components = None
        self._displays = None
        self._timer_callbacks = None
        self._device_component = None
        self._pad_translations = None
        ControlElement.release_class_attributes()
        InputControlElement.release_class_attributes()
        ControlSurfaceComponent.release_class_attributes()
        SessionComponent.release_class_attributes()
        self.song().remove_tracks_listener(self._on_track_list_changed)
        self.song().remove_scenes_listener(self._on_scene_list_changed)
        self.song().view.remove_selected_track_listener(
            self._on_selected_track_changed)
        self.song().view.remove_selected_scene_listener(
            self._on_selected_scene_changed)
예제 #13
0
    def set_allow_update(self, allow_updates):
        assert isinstance(allow_updates, (int,
         type(False)))
        allow = (int(allow_updates) != 0)
        if (self._allow_updates != allow):
            for component in self._sub_components:
                component.set_allow_update(allow)

            ControlSurfaceComponent.set_allow_update(self, allow)
예제 #14
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._clip_slot = None
     self._launch_button = None
     self._triggered_to_play_value = 126
     self._triggered_to_record_value = 121
     self._started_value = 127
     self._recording_value = 120
     self._stopped_value = 0
예제 #15
0
    def set_enabled(self, enable):
        assert isinstance(enable, (int,
         type(False)))
        bool_enable = (int(enable) != 0)
        if (self.is_enabled() != bool_enable):
            for component in self._sub_components:
                component.set_enabled(bool_enable)

            ControlSurfaceComponent.set_enabled(self, bool_enable)
    def __init__(self):
        ControlSurfaceComponent.__init__(self)
        ChannelStripComponent._active_instances.append(self)
        self._track = None
        self._send_controls = []
        self._pan_control = None
        self._volume_control = None
        self._select_button = None
        self._mute_button = None
        self._solo_button = None
        self._arm_button = None
        self._shift_button = None
        self._crossfade_toggle = None
        self._shift_pressed = False
        self._solo_pressed = False
        self._arm_pressed = False
        self._invert_mute_feedback = False
        self._track_name_data_source = DisplayDataSource()
        self._update_track_name_data_source()
        self._empty_control_slots = self.register_slot_manager()

        def make_property_slot(name, alias=None):
            alias = alias or name
            return self.register_slot(None,
                                      getattr(self, '_on_%s_changed' % alias),
                                      name)

        self._track_property_slots = [
            make_property_slot('mute'),
            make_property_slot('solo'),
            make_property_slot('arm'),
            make_property_slot('current_input_routing', 'input_routing'),
            make_property_slot('name', 'track_name')
        ]
        self._mixer_device_property_slots = [
            make_property_slot('crossfade_assign', 'cf_assign'),
            make_property_slot('sends')
        ]

        def make_button_slot(name):
            return self.register_slot(None, getattr(self, '_%s_value' % name),
                                      'value')

        self._select_button_slot = make_button_slot('select')
        self._mute_button_slot = make_button_slot('mute')
        self._solo_button_slot = make_button_slot('solo')
        self._arm_button_slot = make_button_slot('arm')
        self._shift_button_slot = make_button_slot('shift')
        self._crossfade_toggle_slot = make_button_slot('crossfade_toggle')
예제 #17
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._device_banks = DEVICE_DICT
     self._device_best_banks = DEVICE_BOB_DICT
     self._device_bank_names = BANK_NAME_DICT
     self._device = None
     self._parameter_controls = None
     self._bank_up_button = None
     self._bank_down_button = None
     self._bank_buttons = None
     self._on_off_button = None
     self._lock_button = None
     self._lock_callback = None
     self._device_name_data_source = None
     self._bank_index = 0
     self._locked_to_device = False
예제 #18
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._device_banks = DEVICE_DICT
     self._device_best_banks = DEVICE_BOB_DICT
     self._device_bank_names = BANK_NAME_DICT
     self._device = None
     self._parameter_controls = None
     self._bank_up_button = None
     self._bank_down_button = None
     self._bank_buttons = None
     self._on_off_button = None
     self._lock_button = None
     self._lock_callback = None
     self._device_name_data_source = None
     self._bank_index = 0
     self._locked_to_device = False
예제 #19
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     ChannelStripComponent._active_instances.append(self)
     self._track = None
     self._send_controls = []
     self._pan_control = None
     self._volume_control = None
     self._select_button = None
     self._mute_button = None
     self._solo_button = None
     self._arm_button = None
     self._shift_button = None
     self._crossfade_toggle = None
     self._track_name_data_source = None
     self._shift_pressed = False
     self._solo_pressed = False
     self._arm_pressed = False
     self._invert_mute_feedback = False
     self._empty_control_slots = self.register_slot_manager()
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     ChannelStripComponent._active_instances.append(self)
     self._track = None
     self._send_controls = []
     self._pan_control = None
     self._volume_control = None
     self._select_button = None
     self._mute_button = None
     self._solo_button = None
     self._arm_button = None
     self._shift_button = None
     self._crossfade_toggle = None
     self._track_name_data_source = None
     self._shift_pressed = False
     self._solo_pressed = False
     self._arm_pressed = False
     self._invert_mute_feedback = False
     self._empty_control_slots = self.register_slot_manager()
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._track = None
     self._send_controls = []
     self._pan_control = None
     self._volume_control = None
     self._select_button = None
     self._mute_button = None
     self._solo_button = None
     self._arm_button = None
     self._shift_button = None
     self._crossfade_toggle = None
     self._track_name_data_source = None
     self._is_selected = False
     self._shift_pressed = False
     self._solo_pressed = False
     self._arm_pressed = False
     self._invert_mute_feedback = False
     self._solos_pressed_callback = None
     self._arms_pressed_callback = None
    def __init__(self):
        ControlSurfaceComponent.__init__(self)
        ChannelStripComponent._active_instances.append(self)
        self._track = None
        self._send_controls = []
        self._pan_control = None
        self._volume_control = None
        self._select_button = None
        self._mute_button = None
        self._solo_button = None
        self._arm_button = None
        self._shift_button = None
        self._crossfade_toggle = None
        self._shift_pressed = False
        self._solo_pressed = False
        self._arm_pressed = False
        self._invert_mute_feedback = False
        self._track_name_data_source = DisplayDataSource()
        self._update_track_name_data_source()
        self._empty_control_slots = self.register_slot_manager()

        def make_property_slot(name, alias = None):
            alias = alias or name
            return self.register_slot(None, getattr(self, '_on_%s_changed' % alias), name)

        self._track_property_slots = [make_property_slot('mute'),
         make_property_slot('solo'),
         make_property_slot('arm'),
         make_property_slot('current_input_routing', 'input_routing'),
         make_property_slot('name', 'track_name')]
        self._mixer_device_property_slots = [make_property_slot('crossfade_assign', 'cf_assign'), make_property_slot('sends')]

        def make_button_slot(name):
            return self.register_slot(None, getattr(self, '_%s_value' % name), 'value')

        self._select_button_slot = make_button_slot('select')
        self._mute_button_slot = make_button_slot('mute')
        self._solo_button_slot = make_button_slot('solo')
        self._arm_button_slot = make_button_slot('arm')
        self._shift_button_slot = make_button_slot('shift')
        self._crossfade_toggle_slot = make_button_slot('crossfade_toggle')
예제 #23
0
 def __init__(self, c_instance):
     """ Define and Initialise standard behaviour """
     object.__init__(self)
     self._c_instance = c_instance
     self._midi_map_handle = None
     self._pad_translations = None
     self._suggested_input_port = str('')
     self._suggested_output_port = str('')
     self._modes = []
     self._components = []
     self._displays = []
     self._controls = []
     self._device_component = None
     self._forwarding_registry = {}
     self._timer_callbacks = []
     self._scheduled_messages = []
     self._in_build_midi_map = False
     self._suppress_requests_counter = 0
     self._rebuild_requests_during_suppression = 0
     ControlSurfaceComponent.set_song_and_application(
         self.song(), self.application())
     ControlElement.set_register_control_callback(self._register_control)
     ControlElement.set_send_midi_callback(self._send_midi)
     InputControlElement.set_mapping_callback(self._install_mapping)
     InputControlElement.set_forwarding_callback(self._install_forwarding)
     InputControlElement.set_translation_callback(self._translate_message)
     ControlSurfaceComponent.set_register_component_callback(
         self._register_component)
     ControlSurfaceComponent.set_register_timer_notification_callback(
         self._register_timer_callback)
     ControlSurfaceComponent.set_unregister_timer_notification_callback(
         self._unregister_timer_callback)
     ControlSurfaceComponent.set_request_rebuild_callback(
         self.request_rebuild_midi_map)
     SessionComponent.set_highlighting_callback(self._set_session_highlight)
     self.song().add_tracks_listener(self._on_track_list_changed)
     self.song().add_scenes_listener(self._on_scene_list_changed)
     self.song().view.add_selected_track_listener(
         self._on_selected_track_changed)
     self.song().view.add_selected_scene_listener(
         self._on_selected_scene_changed)
예제 #24
0
 def disconnect(self):
     """ Live -> Script: Called right before we get disconnected from Live """        
     for message in self._scheduled_messages:
         if message['Parameter'] != None:
             message['Message'](message['Parameter'])
         else:
             message['Message']()
     self._scheduled_messages = None
     self._forwarding_registry = None
     for component in self.components:
         component.disconnect()
     for control in self.controls:
         control.disconnect()
     self.controls = None
     self.components = None
     self._displays = None
     self._timer_callbacks = None
     self._device_component = None
     self._pad_translations = None
     ControlElement.release_class_attributes()
     InputControlElement.release_class_attributes()
     ControlSurfaceComponent.release_class_attributes()
     SessionComponent.release_class_attributes()
     self.song().remove_visible_tracks_listener(self._on_track_list_changed)
     self.song().remove_scenes_listener(self._on_scene_list_changed)
     self.song().view.remove_selected_track_listener(self._on_selected_track_changed)
     self.song().view.remove_selected_scene_listener(self._on_selected_scene_changed)
     if isinstance(__builtins__, dict):
         if CS_LIST_KEY not in __builtins__.keys():
             __builtins__[CS_LIST_KEY] = []
         if self in __builtins__[CS_LIST_KEY]:
             __builtins__[CS_LIST_KEY].remove(self)
     else:
         if hasattr(__builtins__, CS_LIST_KEY):
             cs_list = getattr(__builtins__, CS_LIST_KEY)
             if self in cs_list:
                 cs_list.remove(self)
                 setattr(__builtins__, CS_LIST_KEY, cs_list)
     return None
예제 #25
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._sub_components = []
예제 #26
0
 def __init__(self, c_instance, publish_self=True):
     """ Define and Initialise standard behaviour """
     object.__init__(self)
     self.canonical_parent = None
     if publish_self:
         if isinstance(__builtins__, dict):
             if CS_LIST_KEY not in __builtins__.keys():
                 __builtins__[CS_LIST_KEY] = []
             __builtins__[CS_LIST_KEY].append(self)
         else:
             if not hasattr(__builtins__, CS_LIST_KEY):
                 setattr(__builtins__, CS_LIST_KEY, [])
             cs_list = getattr(__builtins__, CS_LIST_KEY)
             cs_list.append(self)
             setattr(__builtins__, CS_LIST_KEY, cs_list)
     self._c_instance = c_instance
     self._midi_map_handle = None
     self._pad_translations = None
     self._suggested_input_port = str('')
     self._suggested_output_port = str('')
     self._modes = []
     self.components = []
     self._displays = []
     self.controls = []
     self._device_component = None
     self._device_selection_follows_track_selection = False
     self._forwarding_registry = {}
     self._timer_callbacks = []
     self._scheduled_messages = []
     self._in_build_midi_map = False
     self._suppress_requests_counter = 0
     self._rebuild_requests_during_suppression = 0
     self._enabled = True
     self._components_to_leave_disabled = None
     ControlSurfaceComponent.set_song_and_application(self.song(), self.application())
     ControlElement.set_register_control_callback(self._register_control)
     ControlElement.set_send_midi_callback(self._send_midi)
     InputControlElement.set_mapping_callback(self._install_mapping)
     InputControlElement.set_forwarding_callback(self._install_forwarding)
     InputControlElement.set_translation_callback(self._translate_message)
     ControlSurfaceComponent.set_register_component_callback(self._register_component)
     ControlSurfaceComponent.set_request_rebuild_callback(self.request_rebuild_midi_map)
     ControlSurfaceComponent.set_show_message_callback(self.show_message)
     ControlSurfaceComponent.set_register_timer_notification_callback(self._register_timer_callback)
     ControlSurfaceComponent.set_unregister_timer_notification_callback(self._unregister_timer_callback)
     SessionComponent.set_highlighting_callback(self._set_session_highlight)
     self.song().add_visible_tracks_listener(self._on_track_list_changed)
     self.song().add_scenes_listener(self._on_scene_list_changed)
     self.song().view.add_selected_track_listener(self._on_selected_track_changed)
     self.song().view.add_selected_scene_listener(self._on_selected_scene_changed)
     return None
예제 #27
0
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._sub_components = []
 def __init__(self):
     ControlSurfaceComponent.__init__(self)
     self._modes_buttons = []
     self._mode_toggle = None
     self._mode_index = -1