当前位置: 首页>>代码示例>>Python>>正文


Python ChannelTranslationSelector.set_mode_buttons方法代码示例

本文整理汇总了Python中_Framework.ChannelTranslationSelector.ChannelTranslationSelector.set_mode_buttons方法的典型用法代码示例。如果您正苦于以下问题:Python ChannelTranslationSelector.set_mode_buttons方法的具体用法?Python ChannelTranslationSelector.set_mode_buttons怎么用?Python ChannelTranslationSelector.set_mode_buttons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在_Framework.ChannelTranslationSelector.ChannelTranslationSelector的用法示例。


在下文中一共展示了ChannelTranslationSelector.set_mode_buttons方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _setup_global_control

# 需要导入模块: from _Framework.ChannelTranslationSelector import ChannelTranslationSelector [as 别名]
# 或者: from _Framework.ChannelTranslationSelector.ChannelTranslationSelector import set_mode_buttons [as 别名]
 def _setup_global_control(self):
     is_momentary = True
     self._global_bank_buttons = []
     self._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)
         ringed_encoder.set_feedback_delay(-1)
         ring_button.name = ringed_encoder.name + '_Ring_Mode_Button'
         ringed_encoder.set_ring_mode_button(ring_button)
         self._global_param_controls.append(ringed_encoder)
     self._global_bank_buttons = []
     global_bank_labels = ('Pan_Button', 'Send_A_Button', 'Send_B_Button', 'Send_C_Button')
     for index in range(4):
         self._global_bank_buttons.append(ConfigurableButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 87 + index))#(not is_momentary, MIDI_NOTE_TYPE, 0, 87 + index))
         self._global_bank_buttons[-1].name = global_bank_labels[index]
     self._encoder_modes = EncoderMixerModeSelectorComponent(self._mixer)
     self._encoder_modes.name = 'Track_Control_Modes'
     #self._encoder_modes.set_modes_buttons(self._global_bank_buttons) # set in ShiftableEncoderSelectorComponent
     self._encoder_modes.set_controls(tuple(self._global_param_controls))
     #self._encoder_device_modes = EncoderDeviceModeSelectorComponent(self._mixer, self._device) #new
     self._encoder_device_modes = EncoderDeviceComponent(self._mixer, self._device, self)
     self._encoder_device_modes.name = 'Alt_Device_Control_Modes' #new
     self._encoder_eq_modes = EncoderEQComponent(self._mixer, self)#EncoderEQModeSelectorComponent(self._mixer) #new
     self._encoder_eq_modes.name = 'EQ_Control_Modes' #new
     global_translation_selector = ChannelTranslationSelector() #translate track encoders to channels 1 through 4, based on button selection (pan = 1, send A = 2, send B = 3, send C = 4)
     global_translation_selector.name = 'Global_Translations'
     global_translation_selector.set_controls_to_translate(tuple(self._global_param_controls))
     global_translation_selector.set_mode_buttons(tuple(self._global_bank_buttons))
     encoder_user_modes = EncoderUserModesComponent(self, self._encoder_modes, tuple(self._global_param_controls), tuple(self._global_bank_buttons), self._mixer, self._device, self._encoder_device_modes, self._encoder_eq_modes) #self._mixer, tuple(sliders)) #added
     encoder_user_modes.name = 'Encoder_User_Modes' #added   
     self._encoder_shift_modes = ShiftableEncoderSelectorComponent(self, tuple(self._global_bank_buttons), encoder_user_modes, self._encoder_modes, self._encoder_eq_modes, self._encoder_device_modes) #tuple(select_buttons), master_select_button, tuple(arm_buttons), self._matrix, self._session, self._session_zoom, self._mixer, slider_modes, matrix_modes) #, self._send_introduction_message) #also added self for _parent
     self._encoder_shift_modes.name = 'Encoder_Shift_Modes'
     self._encoder_shift_modes.set_mode_toggle(self._shift_button)     
开发者ID:bshmidt,项目名称:AbletonDJTemplate,代码行数:37,代码来源:APC40plus22.py

示例2: _setup_global_control

# 需要导入模块: from _Framework.ChannelTranslationSelector import ChannelTranslationSelector [as 别名]
# 或者: from _Framework.ChannelTranslationSelector.ChannelTranslationSelector import set_mode_buttons [as 别名]
 def _setup_global_control(self):
     is_momentary = True
     self._global_bank_buttons = []
     self._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)
         ringed_encoder.set_feedback_delay(-1)
         ring_button.name = ringed_encoder.name + '_Ring_Mode_Button'
         ringed_encoder.set_ring_mode_button(ring_button)
         self._global_param_controls.append(ringed_encoder)
     self._global_bank_buttons = []
     global_bank_labels = ('Pan_Button', 'Send_A_Button', 'Send_B_Button', 'Send_C_Button')
     for index in range(4):
         self._global_bank_buttons.append(ConfigurableButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 87 + index))
         self._global_bank_buttons[-1].name = global_bank_labels[index]
     self._encoder_modes = EncModeSelectorComponent(self._mixer)
     self._encoder_modes.name = 'Track_Control_Modes'
     self._encoder_modes.set_controls(tuple(self._global_param_controls))
     self._encoder_device_modes = EncoderDeviceComponent(self._mixer, self._device, self)
     self._encoder_device_modes.name = 'Alt_Device_Control_Modes'
     self._encoder_eq_modes = EncoderEQComponent(self._mixer, self)
     self._encoder_eq_modes.name = 'EQ_Control_Modes'
     global_translation_selector = ChannelTranslationSelector()
     global_translation_selector.name = 'Global_Translations'
     global_translation_selector.set_controls_to_translate(tuple(self._global_param_controls))
     global_translation_selector.set_mode_buttons(tuple(self._global_bank_buttons))
     encoder_user_modes = EncoderUserModesComponent(self, self._encoder_modes, tuple(self._global_param_controls), tuple(self._global_bank_buttons), self._mixer, self._device, self._encoder_device_modes, self._encoder_eq_modes)
     encoder_user_modes.name = 'Encoder_User_Modes' 
     self._encoder_shift_modes = ShiftableEncoderSelectorComponent(self, tuple(self._global_bank_buttons), encoder_user_modes, self._encoder_modes, self._encoder_eq_modes, self._encoder_device_modes)
     self._encoder_shift_modes.name = 'Encoder_Shift_Modes'
     self._encoder_shift_modes.set_mode_toggle(self._shift_button)  
开发者ID:SquarewaveMultimedia,项目名称:APC_64_40_9,代码行数:35,代码来源:APC_64_40_9_vu.py

示例3: _setup_global_control

# 需要导入模块: from _Framework.ChannelTranslationSelector import ChannelTranslationSelector [as 别名]
# 或者: from _Framework.ChannelTranslationSelector.ChannelTranslationSelector import set_mode_buttons [as 别名]
    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))
开发者ID:RIOXL,项目名称:AbletonLive9_RemoteScripts,代码行数:28,代码来源:APC40.py

示例4: _setup_device_control

# 需要导入模块: from _Framework.ChannelTranslationSelector import ChannelTranslationSelector [as 别名]
# 或者: from _Framework.ChannelTranslationSelector.ChannelTranslationSelector import set_mode_buttons [as 别名]
    def _setup_device_control(self):
        is_momentary = True
        device_bank_buttons = []
        device_param_controls = []
        for index in range(8):
            device_bank_buttons.append(ButtonElement(is_momentary, MIDI_NOTE_TYPE, 12, (70 + index)))
            device_param_controls.append(EncoderElement(MIDI_CC_TYPE, 12, (12 + index), Live.MidiMap.MapMode.absolute))

        device = DeviceComponent()
        device.set_bank_buttons(tuple(device_bank_buttons))
        device.set_parameter_controls(tuple(device_param_controls))
        device_translation_selector = ChannelTranslationSelector()
        device_translation_selector.set_controls_to_translate(tuple(device_param_controls))
        device_translation_selector.set_mode_buttons(tuple(device_bank_buttons))
        self.set_device_component(device)
开发者ID:Etnorazz,项目名称:LeapConductor,代码行数:17,代码来源:VCM600.py

示例5: APC40

# 需要导入模块: from _Framework.ChannelTranslationSelector import ChannelTranslationSelector [as 别名]
# 或者: from _Framework.ChannelTranslationSelector.ChannelTranslationSelector import set_mode_buttons [as 别名]

#.........这里部分代码省略.........
        self.transport.set_tap_tempo_button(tap_tempo_button)
        self.transport.set_quant_toggle_button(self.device_bank_buttons[5])
        self.transport.set_overdub_button(self.device_bank_buttons[6])
        self.transport.set_metronome_button(self.device_bank_buttons[7])
        self._prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 47, Live.MidiMap.MapMode.relative_two_compliment)
        self.transport.set_tempo_encoder(self._prehear_control) #shifted prehear
        bank_button_translator = ShiftTranslatorComponent()
        bank_button_translator.set_controls_to_translate(tuple(self.device_bank_buttons))
        bank_button_translator.set_shift_button(self._shift_button)

    def _setup_global_control(self):
        is_momentary = True
        global_bank_buttons = []
        self.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)
            self.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(not is_momentary, MIDI_NOTE_TYPE, 0, 87 + index))
            global_bank_buttons[-1].name = global_bank_labels[index]
        self.encoder_modes = EncModeSelectorComponent(self._mixer)
        self.encoder_modes.name = 'Track_Control_Modes'
        self.encoder_modes.set_modes_buttons(global_bank_buttons)
        self.encoder_modes.set_controls(tuple(self.global_param_controls))
        self.global_translation_selector = ChannelTranslationSelector()
        self.global_translation_selector.name = 'Global_Translations'
        self.global_translation_selector.set_controls_to_translate(tuple(self.global_param_controls))
        self.global_translation_selector.set_mode_buttons(tuple(global_bank_buttons))

    def _on_selected_track_changed(self):
        ControlSurface._on_selected_track_changed(self)
        
        ## Quirksmode
        if(self._newDjModeToggle_state):
        
	    	if self.application().view.is_view_visible('Detail/Clip'):
	    		self.application().view.show_view('Detail/DeviceChain')
	    		self.application().view.is_view_visible('Detail/DeviceChain')
	    	else:
	    		self.application().view.show_view('Detail/Clip')
	    		self.application().view.is_view_visible('Detail/Clip')
		
	    	if(self.song().view.selected_track != self.song().master_track):
		    	if (self.song().view.selected_track.playing_slot_index > -1):
		            self.song().view.selected_scene = self.song().scenes[self.song().view.selected_track.playing_slot_index]
	    
        
	        track_index = 0
	        for track in self.song().tracks:
	        	if track == self.song().view.selected_track:
	        		break
	        	track_index += 1
	        self.current_track = track_index
            
        
        
        track = self.song().view.selected_track
        device_to_select = track.view.selected_device
        if device_to_select == None and len(track.devices) > 0:
            device_to_select = track.devices[0]
开发者ID:Quirksmode,项目名称:Custom-DJ-Template-for-APC-40-and-Ableton,代码行数:70,代码来源:APC40.py


注:本文中的_Framework.ChannelTranslationSelector.ChannelTranslationSelector.set_mode_buttons方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。