def _setup_global_control(self): is_momentary = True global_bank_buttons = [] global_param_controls = [] for index in range(8): ring_button = ButtonElement(not is_momentary, MIDI_CC_TYPE, 0, 56 + index) ringed_encoder = RingedEncoderElement( MIDI_CC_TYPE, 0, 48 + index, Live.MidiMap.MapMode.absolute) ringed_encoder.name = 'Track_Control_' + str(index) ring_button.name = ringed_encoder.name + '_Ring_Mode_Button' ringed_encoder.set_ring_mode_button(ring_button) global_param_controls.append(ringed_encoder) global_bank_buttons = [] global_bank_labels = ('Pan_Button', 'Send_A_Button', 'Send_B_Button', 'Send_C_Button') for index in range(4): global_bank_buttons.append( ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 87 + index)) global_bank_buttons[-1].name = global_bank_labels[index] encoder_modes = EncModeSelectorComponent(self._mixer) encoder_modes.name = 'Track_Control_Modes' encoder_modes.set_modes_buttons(global_bank_buttons) encoder_modes.set_controls(tuple(global_param_controls)) global_translation_selector = ChannelTranslationSelector() global_translation_selector.name = 'Global_Translations' global_translation_selector.set_controls_to_translate( tuple(global_param_controls)) global_translation_selector.set_mode_buttons( tuple(global_bank_buttons))
def _setup_global_control(self): is_momentary = True global_bank_buttons = [] global_param_controls = [] for index in range(8): ring_button = ButtonElement(not is_momentary, MIDI_CC_TYPE, 0, 56 + index) ringed_encoder = RingedEncoderElement(MIDI_CC_TYPE, 0, 48 + index, Live.MidiMap.MapMode.absolute) ringed_encoder.name = "Track_Control_" + str(index) ring_button.name = ringed_encoder.name + "_Ring_Mode_Button" ringed_encoder.set_ring_mode_button(ring_button) global_param_controls.append(ringed_encoder) global_bank_buttons = [] global_bank_labels = ("Pan_Button", "Send_A_Button", "Send_B_Button", "Send_C_Button") for index in range(4): global_bank_buttons.append(ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 87 + index)) global_bank_buttons[-1].name = global_bank_labels[index] encoder_modes = EncModeSelectorComponent(self._mixer) encoder_modes.name = "Track_Control_Modes" encoder_modes.set_modes_buttons(global_bank_buttons) encoder_modes.set_controls(tuple(global_param_controls)) global_translation_selector = ChannelTranslationSelector() global_translation_selector.name = "Global_Translations" global_translation_selector.set_controls_to_translate(tuple(global_param_controls)) global_translation_selector.set_mode_buttons(tuple(global_bank_buttons))