def setup_nav(self): self._nav = LaunchpadSessionComponent(8, 8, True) ControlSurface._send_midi(self, (176, 0, BIT_0 + BIT_3 + BIT_5)) ControlSurface._send_midi(self, (176, 0, BIT_0 + BIT_3 + BIT_5)) right_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE, 0, RIGHT_BUTTON) right_button.set_on_off_values(60, 28) left_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE, 0, LEFT_BUTTON) left_button.set_on_off_values(60, 28) down_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE, 0, DOWN_BUTTON) down_button.set_on_off_values(60, 28) up_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE, 0, UP_BUTTON) up_button.set_on_off_values(60, 28) self._nav.set_track_bank_buttons(right_button, left_button) self._nav.set_scene_bank_buttons(down_button, up_button)
def handle_sysex(self, midi_bytes): if (midi_bytes[0:8] == (SYSEX_KMK_HEADER + (0x5F, 0x03, 0x00))): # when native mode transition complete self._on_selected_track_changed() elif (midi_bytes[0:7] == (SYSEX_KMK_HEADER + (KMK_ENC_COMMAND, 0x08))): # toggle lcd displays using 'main' encoder device.set_param_name_value_toggle(midi_bytes[7] < 63) else: # output any sysex received (from KMK_A) back to hardware ControlSurface._send_midi(self, midi_bytes)
def _send_midi(self, midi_bytes, optimized=None): sent_successfully = False if not self._suppress_send_midi: sent_successfully = ControlSurface._send_midi(self, midi_bytes, optimized=optimized) return sent_successfully
def setup_nav(self): self._nav = LaunchpadSessionComponent(options['width'],options['height'],options['constrain']) ControlSurface._send_midi(self,(176,0,BIT_0 + BIT_3 + BIT_5)) ControlSurface._send_midi(self,(176,0,BIT_0 + BIT_3 + BIT_5)) right_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE,0,RIGHT_BUTTON) right_button.set_on_off_values(60,28) left_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE,0,LEFT_BUTTON) left_button.set_on_off_values(60,28) down_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE,0,DOWN_BUTTON) down_button.set_on_off_values(60,28) up_button = LaunchpadButtonComponent(options['hold'], MIDI_CC_TYPE,0,UP_BUTTON) up_button.set_on_off_values(60,28) self._nav.set_track_bank_buttons(right_button, left_button) self._nav.set_scene_bank_buttons(down_button, up_button) return None
def _send_midi(self, midi_bytes, optimized = None): sent_successfully = False if (not self._suppress_send_midi): sent_successfully = ControlSurface._send_midi(self, midi_bytes, optimized=optimized) return sent_successfully
def _send_midi(self, midi_bytes): sent_successfully = False if not self._suppress_send_midi: sent_successfully = ControlSurface._send_midi(self, midi_bytes) return sent_successfully
def _send_midi(self, midi_bytes): if not self._suppress_send_midi: self._suppress_send_midi ControlSurface._send_midi(self, midi_bytes) else: self._suppress_send_midi
def _send_midi(self, midi_bytes): if (not self._suppress_send_midi): ControlSurface._send_midi(self, midi_bytes)
def connect_script_instances(self, instances): ControlSurface._send_midi(self, (176, 0, BIT_0 + BIT_3 + BIT_5)) ControlSurface._send_midi(self, (176, 0, BIT_0 + BIT_3 + BIT_5))