def device_enable_button(self, button): DeviceComponentBase.do_device_enable_button(self, button)
def _get_top_device(self): return DeviceComponentBase._get_top_device(self)
def set_bank_buttons(self, buttons): super(DeviceComponent, self).set_bank_buttons(buttons) DeviceComponentBase.set_bank_buttons(self, buttons)
def _show_strip_state(self, index, track_present, iso_present, state): DeviceComponentBase._update_select_enable_lights( self, index, track_present, iso_present, state)
def _show_device_enabled(self, index, flag): DeviceComponentBase._show_device_enabled(self, index, flag)
def update_track_state(self): DeviceComponentBase.update_track_state(self)
def set_device_on_off(self, index): DeviceComponentBase.set_device_on_off(self, index)
def set_device_bank(self, bank): DeviceComponentBase.set_device_bank(self, bank)
def _update_direct_bank(self): DeviceComponentBase._update_direct_bank(self)
def next_device_button(self, button): DeviceComponentBase.do_next_device_button(self, button)
def bank_down_button(self, button): DeviceComponentBase.do_bank_down_button(self, button)
def prev_device_button(self, button): DeviceComponentBase.do_prev_device_button(self, button)
def device_lock_button(self, button): DeviceComponentBase.do_device_lock_button(self, button)
def device_select_button(self, button): DeviceComponentBase.do_device_select_button(self, button)
def refresh(self): DeviceComponentBase.refresh(self)
def _scroll_device_view(self, direction): DeviceComponentBase._scroll_device_view(self, direction)
def on_selected_track_changed(self): DeviceComponentBase.on_selected_track_changed(self)
def set_device(self, device): super(DeviceComponent, self).set_device(device) DeviceComponentBase.set_device(self, device)
def _on_device_enable(self, param): DeviceComponentBase.do_on_device_enable(self, param)
def _notify_device(self, device=None, force=False, clear=False): DeviceComponentBase._notify_device(self, device, force, clear)
def _update_select_enable_lights(self, num_devices, selected_device): DeviceComponentBase._update_select_enable_lights( self, num_devices, selected_device)
def _set_current_bank(self): DeviceComponentBase._set_current_bank(self)
def _show_device_state(self, index, selected, enabled): DeviceComponentBase._show_device_state(self, index, selected, enabled)
def _get_param_details(self): if self._mapper: self._mapper._get_param_details(self) return DeviceComponentBase._get_param_details(self)
def _show_device_selected(self, index, flag): DeviceComponentBase._show_device_selected(self, index, flag)
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)
def _update_bank_buttons(self, disable=False): DeviceComponentBase._update_bank_buttons(self, disable)
def map_controls(self, is_push=False): if self._mapper: self._mapper.map_controls(self, is_push) return DeviceComponentBase.map_controls(self, is_push)
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
def direct_bank_button(self, button): DeviceComponentBase.do_direct_bank_button(self, button)