コード例 #1
0
 def device_enable_button(self, button):
     DeviceComponentBase.do_device_enable_button(self, button)
コード例 #2
0
 def _get_top_device(self):
     return DeviceComponentBase._get_top_device(self)
コード例 #3
0
 def set_bank_buttons(self, buttons):
     super(DeviceComponent, self).set_bank_buttons(buttons)
     DeviceComponentBase.set_bank_buttons(self, buttons)
コード例 #4
0
 def _show_strip_state(self, index, track_present, iso_present, state):
     DeviceComponentBase._update_select_enable_lights(
         self, index, track_present, iso_present, state)
コード例 #5
0
 def _show_device_enabled(self, index, flag):
     DeviceComponentBase._show_device_enabled(self, index, flag)
コード例 #6
0
 def update_track_state(self):
     DeviceComponentBase.update_track_state(self)
コード例 #7
0
 def set_device_on_off(self, index):
     DeviceComponentBase.set_device_on_off(self, index)
コード例 #8
0
 def set_device_bank(self, bank):
     DeviceComponentBase.set_device_bank(self, bank)
コード例 #9
0
 def _update_direct_bank(self):
     DeviceComponentBase._update_direct_bank(self)
コード例 #10
0
 def next_device_button(self, button):
     DeviceComponentBase.do_next_device_button(self, button)
コード例 #11
0
 def bank_down_button(self, button):
     DeviceComponentBase.do_bank_down_button(self, button)
コード例 #12
0
 def prev_device_button(self, button):
     DeviceComponentBase.do_prev_device_button(self, button)
コード例 #13
0
 def device_lock_button(self, button):
     DeviceComponentBase.do_device_lock_button(self, button)
コード例 #14
0
 def device_select_button(self, button):
     DeviceComponentBase.do_device_select_button(self, button)
コード例 #15
0
 def refresh(self):
     DeviceComponentBase.refresh(self)
コード例 #16
0
 def _scroll_device_view(self, direction):
     DeviceComponentBase._scroll_device_view(self, direction)
コード例 #17
0
 def on_selected_track_changed(self):
     DeviceComponentBase.on_selected_track_changed(self)
コード例 #18
0
 def set_device(self, device):
     super(DeviceComponent, self).set_device(device)
     DeviceComponentBase.set_device(self, device)
コード例 #19
0
 def _on_device_enable(self, param):
     DeviceComponentBase.do_on_device_enable(self, param)
コード例 #20
0
 def _notify_device(self, device=None, force=False, clear=False):
     DeviceComponentBase._notify_device(self, device, force, clear)
コード例 #21
0
 def _update_select_enable_lights(self, num_devices, selected_device):
     DeviceComponentBase._update_select_enable_lights(
         self, num_devices, selected_device)
コード例 #22
0
 def _set_current_bank(self):
     DeviceComponentBase._set_current_bank(self)
コード例 #23
0
 def _show_device_state(self, index, selected, enabled):
     DeviceComponentBase._show_device_state(self, index, selected, enabled)
コード例 #24
0
 def _get_param_details(self):
     if self._mapper:
         self._mapper._get_param_details(self)
         return
     DeviceComponentBase._get_param_details(self)
コード例 #25
0
 def _show_device_selected(self, index, flag):
     DeviceComponentBase._show_device_selected(self, index, flag)
コード例 #26
0
 def _my_assign_parameters(self, bank_num=-1, is_push=False):
     if self._mapper:
         return self._mapper._my_assign_parameters(self, bank_num, is_push)
     return DeviceComponentBase._my_assign_parameters(
         self, bank_num, is_push)
コード例 #27
0
 def _update_bank_buttons(self, disable=False):
     DeviceComponentBase._update_bank_buttons(self, disable)
コード例 #28
0
 def map_controls(self, is_push=False):
     if self._mapper:
         self._mapper.map_controls(self, is_push)
         return
     DeviceComponentBase.map_controls(self, is_push)
コード例 #29
0
    def __init__(self,
                 script,
                 num_params=8,
                 direct_bank=False,
                 mono=True,
                 shared=False,
                 path=None,
                 delayed_update=False,
                 new_skin=False,
                 *a,
                 **k):
        self._script = script
        self._use_new_skin = new_skin
        self._mapper = None
        Framework_DeviceComponentBase.__init__(self, *a, **k)
        self._is_osc = hasattr(self._script,
                               '_osc_control') and self._script._osc_control
        if not self._is_osc:
            g_hud = False
        self.log('DeviceComponent(STANDARD): num: ' + str(num_params) +
                 ', path: ' + str(path) + ', HUD: ' + str(g_hud) + ', OSC: ' +
                 str(self._is_osc))
        if g_mapper:
            PrEditorParameterProvider.__init__(self, script)
            self.log('create mapper(STANDARD): path: ' + str(path))
            PrEditorMapper.__init__(self, PrEditorParameterProvider, path,
                                    num_params)
        DeviceComponentBase.__init__(self, script,
                                     PrEditorMapper if g_mapper else None,
                                     False, num_params, direct_bank, mono,
                                     shared, path, delayed_update, new_skin)
        k.pop('feedback_mode', None)
        k.pop('lock_button', None)

        def make_hud_encoder(index, name):
            control = HUDControlElement(self, self._hud_state_control, i)
            control.name = name + '_' + str(i)
            return control

        def make_osc_encoder(index, name, osc_msg):
            control = OSCControlElement(self, self._script.oscServer, i,
                                        osc_msg)
            control.name = name + '_' + str(i)
            return control

        if g_hud:
            self.log('Creating HUD notification', True)
            self._hud_state_control = self._script._create_notifying_control_element(
            )
            self._hud_state_control.name = 'HUD_State'
            self._hud_controls = ButtonMatrixElement(rows=[[
                make_osc_encoder(i, 'HUD_Control', '/hud') for i in xrange(8)
            ]])
            self._hud_cs_controls = ButtonMatrixElement(rows=[[
                make_osc_encoder(i, 'HUD_CS_Control', '/hudcs')
                for i in xrange(8)
            ]])
        self._mono = mono
        for light in self.encoder_rings:
            light.enabled = True

        for light in self.device_select:
            light.enabled = False
            light.color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'
            light.disabled_color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'

        for light in self.device_enable:
            light.enabled = False
            light.color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'
            light.disabled_color = 'DefaultButton.Off' if self._mono else 'Device.NoDevice'

        for light in self.parameter_lights:
            light.enabled = False
コード例 #30
0
 def direct_bank_button(self, button):
     DeviceComponentBase.do_direct_bank_button(self, button)