def track_name_data_source(self):
     if (self._track_name_data_source == None):
         self._track_name_data_source = DisplayDataSource()
         if (self._track != None):
             self._track_name_data_source.set_display_string(self._track.name)
         else:
             self._track_name_data_source.set_display_string(' - ')
     return self._track_name_data_source
    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')
Example #3
0
 def device_name_data_source(self):
     if self._device_name_data_source == None:
         self._device_name_data_source = DisplayDataSource()
         self._on_device_name_changed()
     return self._device_name_data_source
Example #4
0
 def track_name_data_source(self):
     if self._track_name_data_source == None:
         self._track_name_data_source = DisplayDataSource()
         self._update_track_name_data_source()
     return self._track_name_data_source