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


Python SliderElement.name方法代码示例

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


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

示例1: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
	def _setup_mixer_control(self):
		is_momentary = True # We use non-latching buttons (keys) throughout, so we'll set this as a constant
		num_tracks = 7 # Here we define the mixer width in tracks (a mixer has only one dimension)
		global mixer # We want to instantiate the global mixer as a MixerComponent object (it was a global "None" type up until now...)
		mixer = MixerComponent(num_tracks, 0) #(num_tracks, num_returns, with_eqs, with_filters)
		mixer.set_track_offset(0) #Sets start point for mixer strip (offset from left)
		"""set up the mixer buttons"""		  
		self.song().view.selected_track = mixer.channel_strip(0)._track
		mixer.selected_strip().set_mute_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 64))
		#mixer.selected_strip().set_solo_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 44))
		mixer.selected_strip().set_arm_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, 72))
		track_select_notes = [65, 73, 66, 74, 67, 75, 68, 76] #more note numbers need to be added if num_scenes is increased
		slider_select_notes = [23, 22, 15, 14, 5, 7, 6, 4]
		pan_select_notes = [21, 20, 13, 12, 3, 1, 0, 2]
		master_volume_control = SliderElement(MIDI_CC_TYPE, 0, 4)
		master_select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 76)
		prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 26, Live.MidiMap.MapMode.absolute)
		crossfader = SliderElement(MIDI_CC_TYPE, 0, 24)
		for index in range(num_tracks):
			mixer.channel_strip(index).set_select_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHANNEL, track_select_notes[index]))
			mixer.channel_strip(index).set_volume_control(SliderElement(MIDI_CC_TYPE, CHANNEL, slider_select_notes[index]))
			mixer.channel_strip(index).set_pan_control(EncoderElement(MIDI_CC_TYPE, CHANNEL, pan_select_notes[index], Live.MidiMap.MapMode.absolute))
		crossfader.name = 'Crossfader'
		master_volume_control.name = 'Master_Volume_Control'
		master_select_button.name = 'Master_Select_Button'
		prehear_control.name = 'Prehear_Volume_Control'
		mixer.set_crossfader_control(crossfader)
		mixer.set_prehear_volume_control(prehear_control)
		mixer.master_strip().set_volume_control(master_volume_control)
		mixer.master_strip().set_select_button(master_select_button)
开发者ID:Adamdma,项目名称:monomodular,代码行数:32,代码来源:ohm64.py

示例2: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
 def _setup_mixer_control(self):
     is_momentary = True
     
     ## Quirksmode
     self.arm_buttons = []
     
     self._mixer = SpecialMixerComponent(self, 8) #added self for parent
     self._mixer.name = 'Mixer'
     self._mixer.master_strip().name = 'Master_Channel_Strip'
     self._mixer.selected_strip().name = 'Selected_Channel_Strip'
     for track in range(8):
         self.strip = self._mixer.channel_strip(track)
         self.strip.name = 'Channel_Strip_' + str(track)
         volume_control = SliderElement(MIDI_CC_TYPE, track, 7)
         arm_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 48)
         solo_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 49)
         mute_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 50)
         select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 51)
         volume_control.name = str(track) + '_Volume_Control'
         arm_button.name = str(track) + '_Arm_Button'
         solo_button.name = str(track) + '_Solo_Button'
         mute_button.name = str(track) + '_Mute_Button'
         select_button.name = str(track) + '_Select_Button'
         self.strip.set_volume_control(volume_control)
         
         ##Quirksmode
         self.arm_buttons.append(arm_button)
         
         self.strip.set_arm_button(arm_button)
         self.strip.set_solo_button(solo_button)
         self.strip.set_mute_button(mute_button)
         self.strip.set_select_button(select_button)
         self.strip.set_shift_button(self._shift_button)
         self.strip.set_invert_mute_feedback(True)
     crossfader = SliderElement(MIDI_CC_TYPE, 0, 15)
     
     
     master_volume_control = SliderElement(MIDI_CC_TYPE, 0, 14)
     master_select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 80)
     ##self._prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 47, Live.MidiMap.MapMode.relative_two_compliment)
     crossfader.name = 'Crossfader'
     master_volume_control.name = 'Master_Volume_Control'
     master_select_button.name = 'Master_Select_Button'
     ##self._prehear_control.name = 'Prehear_Volume_Control'
     self._mixer.set_crossfader_control(crossfader)
     ##self._mixer.set_prehear_volume_control(self._prehear_control)
     self._mixer.master_strip().set_volume_control(master_volume_control)
     self._mixer.master_strip().set_select_button(master_select_button)
开发者ID:Quirksmode,项目名称:Custom-DJ-Template-for-APC-40-and-Ableton,代码行数:50,代码来源:APC40.py

示例3: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
	def _setup_mixer_control(self):
		is_momentary = True
		self._mixer = SpecialMixerComponent(8)
		self._mixer.name = 'Mixer'
		self._mixer.master_strip().name = 'Master_Channel_Strip'
		self._mixer.selected_strip().name = 'Selected_Channel_Strip'
		self._solo_buttons = []
		for track in range(8):
			strip = self._mixer.channel_strip(track)
			strip.name = 'Channel_Strip_' + str(track)
			solo_button = FlashingButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 50, self)
			self._solo_buttons.append(solo_button)
			mute_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 49)
			solo_button.name = str(track) + '_Solo_Button'
			mute_button.name = str(track) + '_Mute_Button'
			strip.set_solo_button(solo_button)
			strip.set_mute_button(mute_button)
			strip.set_shift_button(self._shift_button)
			strip.set_invert_mute_feedback(True)
		master_volume_control = SliderElement(MIDI_CC_TYPE, 0, 14)
		prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 47, Live.MidiMap.MapMode.relative_two_compliment)
		master_volume_control.name = 'Master_Volume_Control'
		prehear_control.name = 'Prehear_Volume_Control'
		self._mixer.set_prehear_volume_control(prehear_control)
		self._mixer.master_strip().set_volume_control(master_volume_control)
开发者ID:Adamdma,项目名称:monomodular,代码行数:27,代码来源:AumPC20.py

示例4: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
	def _setup_mixer_control(self):
		is_momentary = True
		self._mixer = SpecialMixerComponent(8)
		self._mixer.name = 'Mixer'
		self._mixer.master_strip().name = 'Master_Channel_Strip'
		self._mixer.selected_strip().name = 'Selected_Channel_Strip'
		self._solo_buttons = []	# added a
		self._select_buttons = []	# added a
		for track in range(8):
			strip = self._mixer.channel_strip(track)
			strip.name = 'Channel_Strip_' + str(track)
			volume_control = EncoderElement(MIDI_CC_TYPE, track, 7, Live.MidiMap.MapMode.absolute) # 'Slider_' + str(track), track, self)
			arm_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 48)
			solo_button = AumPCMonoButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 50, str(track) + '_Solo_Button', self)
			self._solo_buttons.append(solo_button)	# added a
			mute_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 49)
			select_button = AumPCMonoButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 51, str(track) + '_Select_Button', self)
			self._select_buttons.append(select_button)	# added a
			#volume_control.name = str(track) + '_Volume_Control'
			arm_button.name = str(track) + '_Arm_Button'
			#solo_button.name = str(track) + '_Solo_Button'
			mute_button.name = str(track) + '_Mute_Button'
			#select_button.name = str(track) + '_Select_Button'
			strip.set_volume_control(volume_control)
			strip.set_arm_button(arm_button)
			strip.set_solo_button(solo_button)
			strip.set_mute_button(mute_button)
			strip.set_select_button(select_button)
			strip.set_shift_button(self._shift_button)
			strip.set_invert_mute_feedback(True)
		crossfader = SliderElement(MIDI_CC_TYPE, 0, 15)
		self._crossfader = crossfader
		self._crossfader.name = 'Crossfader'
		master_volume_control = SliderElement(MIDI_CC_TYPE, 0, 14)
		master_select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 80)
		self._master_select_button = master_select_button
		prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 47, Live.MidiMap.MapMode.relative_two_compliment)
		crossfader.name = 'Crossfader'
		master_volume_control.name = 'Master_Volume_Control'
		master_select_button.name = 'Master_Select_Button'
		prehear_control.name = 'Prehear_Volume_Control'
		self._mixer.set_crossfader_control(crossfader)
		self._mixer.set_prehear_volume_control(prehear_control)
		self._mixer.master_strip().set_volume_control(master_volume_control)
		self._mixer.master_strip().set_select_button(master_select_button)
开发者ID:Adamdma,项目名称:monomodular,代码行数:47,代码来源:AumPC40.py

示例5: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
    def _setup_mixer_control(self):
        is_momentary = True
        self._mixer = SpecialMixerComponent(self, 8) #added self for parent
        self._mixer.name = 'Mixer'
        self._mixer.master_strip().name = 'Master_Channel_Strip'
        master_select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 80)
        master_select_button.name = 'Master_Select_Button'
        self._mixer.master_strip().set_select_button(master_select_button) #set in ShiftableSelectorComponent instead if used for Note Mode
        self._mixer.selected_strip().name = 'Selected_Channel_Strip'
        select_buttons = [] #added
        arm_buttons = [] #added
        sliders = [] #added     
        for track in range(8):
            strip = self._mixer.channel_strip(track)
            strip.name = 'Channel_Strip_' + str(track)
            #volume_control = SliderElement(MIDI_CC_TYPE, track, 7) #set in ShiftableSelectorComponent instead
            #arm_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 48) #see below
            solo_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 49)
            solo_button.name = str(track) + '_Solo_Button'
            strip.set_solo_button(solo_button)

            if track < 4:
              mute_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 50)
              mute_button.name = str(track) + '_Mute_Button'
              strip.set_mute_button(mute_button)
              strip.set_invert_mute_feedback(True)

            strip.set_shift_button(self._shift_button)
            select_buttons.append(ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 51)) #added
            select_buttons[-1].name = str(track) + '_Select_Button' #added            
            #strip.set_select_button(select_buttons[-1]) #added 
            arm_buttons.append(ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 48)) #added
            arm_buttons[-1].name = str(track) + '_Arm_Button' #added
            sliders.append(SliderElement(MIDI_CC_TYPE, track, 7)) #added
            sliders[-1].name = str(track) + '_Volume_Control' #added

        self._crossfader = SliderElement(MIDI_CC_TYPE, 0, 15)
        master_volume_control = SliderElement(MIDI_CC_TYPE, 0, 14)
        self._prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 47, Live.MidiMap.MapMode.relative_two_compliment)
        self._crossfader.name = 'Crossfader' #not used in APC20
        master_volume_control.name = 'Master_Volume_Control'
        self._prehear_control.name = 'Prehear_Volume_Control'
        self._mixer.set_shift_button(self._shift_button) #added for shifting prehear
        self._mixer.set_crossfader_control(self._crossfader) #not used in APC20
        self._mixer.set_prehear_volume_control(self._prehear_control) #functionality overridden in SpecialMixerComponent
        self._mixer.master_strip().set_volume_control(master_volume_control)
        self._slider_modes = SliderModesComponent(self._mixer, tuple(sliders)) #added from APC20 script
        self._slider_modes.name = 'Slider_Modes' #added from APC20 script
        matrix_modes = MatrixModesComponent(self._matrix, self._session, self._session_zoom, tuple(self._track_stop_buttons), self) #added new
        matrix_modes.name = 'Matrix_Modes' #added new
        # Original method args for ShiftableSelectorComponent: (self, select_buttons, master_button, arm_buttons, matrix, session, zooming, mixer, transport, slider_modes, mode_callback)
        #self._shift_modes = ShiftableSelectorComponent(tuple(select_buttons), master_select_button, tuple(arm_buttons), self._matrix, self._session, self._session_zoom, self._mixer, transport, slider_modes, self._send_introduction_message)
        self._shift_modes = ShiftableSelectorComponent(self, tuple(select_buttons), master_select_button, tuple(arm_buttons), self._matrix, self._session, self._session_zoom, self._mixer, self._slider_modes, matrix_modes) #, self._send_introduction_message) #also added self for _parent
        self._shift_modes.name = 'Shift_Modes'
        self._shift_modes.set_mode_toggle(self._shift_button)
开发者ID:bshmidt,项目名称:AbletonDJTemplate,代码行数:57,代码来源:APC40plus22.py

示例6: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
    def _setup_mixer_control(self):
        is_momentary = True
        self._mixer = SpecialMixerComponent(8)
        self._mixer.name = "Mixer"
        self._mixer.master_strip().name = "Master_Channel_Strip"
        self._mixer.selected_strip().name = "Selected_Channel_Strip"
        for track in range(8):
            strip = self._mixer.channel_strip(track)
            strip.name = "Channel_Strip_" + str(track)
            volume_control = SliderElement(MIDI_CC_TYPE, track, 7)
            arm_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 48)
            solo_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 49)
            mute_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 50)
            select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 51)
            volume_control.name = str(track) + "_Volume_Control"
            arm_button.name = str(track) + "_Arm_Button"
            solo_button.name = str(track) + "_Solo_Button"
            mute_button.name = str(track) + "_Mute_Button"
            select_button.name = str(track) + "_Select_Button"
            strip.set_volume_control(volume_control)
            strip.set_arm_button(arm_button)
            strip.set_solo_button(solo_button)
            strip.set_mute_button(mute_button)
            strip.set_select_button(select_button)
            strip.set_shift_button(self._shift_button)
            strip.set_invert_mute_feedback(True)
        crossfader = SliderElement(MIDI_CC_TYPE, 0, 15)
        master_volume_control = SliderElement(MIDI_CC_TYPE, 0, 14)
        master_select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 80)
        self.prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 47, Live.MidiMap.MapMode.relative_two_compliment)

        self._mixer.set_shift_button(self._shift_button)  # added for shifting prehear

        crossfader.name = "Crossfader"
        master_volume_control.name = "Master_Volume_Control"
        master_select_button.name = "Master_Select_Button"
        self.prehear_control.name = "Prehear_Volume_Control"
        self._mixer.set_crossfader_control(crossfader)
        self._mixer.set_prehear_volume_control(self.prehear_control)
        self._mixer.master_strip().set_volume_control(master_volume_control)
        self._mixer.master_strip().set_select_button(master_select_button)
开发者ID:psykel,项目名称:APC40-Magic,代码行数:43,代码来源:APC40.py

示例7: _init_mixer_component

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
    def _init_mixer_component(self):
        is_momentary = True
        global mixer
        mixer = MixerComponent(8)
        mixer.name = 'Mixer'
        mixer.set_track_offset(0)
        self.song().view.selected_track = mixer.channel_strip(0)._track

        for track in range(8):
            #self.log_message("Adding track " + str(track))
            strip = mixer.channel_strip(track)
            strip.name = 'Channel_Strip_' + str(track)
            volume_control = SliderElement(MIDI_CC_TYPE, track, VOL_CC)
            snd_A_control = SliderElement(MIDI_CC_TYPE, track, SND_A_CC)
            snd_B_control = SliderElement(MIDI_CC_TYPE, track, SND_B_CC)
            pan_control = SliderElement(MIDI_CC_TYPE, track, PAN_CC)

            arm_button = ButtonElement(not is_momentary, MIDI_CC_TYPE, track, ARM_CC)
            select_button = ButtonElement(is_momentary, MIDI_CC_TYPE, track, SEL_CC)
            mute_button = ButtonElement(not is_momentary, MIDI_CC_TYPE, track, MUTE_CC)


            volume_control.name = str(track) + '_Volume_Control'
            snd_A_control.name = str(track) + '_Send_A_Control'
            snd_B_control.name = str(track) + '_Send_B_Control'
            pan_control.name = str(track) + '_Pan_Control'

            arm_button.name = str(track) + '_arm_Button'
            select_button.name = str(track) + '_Select_Button'
            mute_button.name = str(track) + '_Mute_Button'


            strip.set_volume_control(volume_control)
            strip.set_send_controls([snd_A_control, snd_B_control])
            strip.set_pan_control(pan_control)

            strip.set_arm_button(arm_button)
            strip.set_select_button(select_button)
            strip.set_mute_button(mute_button)

        return mixer
开发者ID:CesarPantoja,项目名称:MPK49pp,代码行数:43,代码来源:MPK49pp.py

示例8: __init__

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
 def __init__(self, c_instance):
     ControlSurface.__init__(self, c_instance)
     with self.component_guard():
         self._instance = c_instance
         self._has_slider_section = True
         self.log_message("Midilooper initializing...")
         # register_sender(self)
         self._session = SessionComponent(NUM_TRACKS, NUM_ROWS)
         self._session.name = 'Session_Control'
         self._mixer = MixerComponent(NUM_TRACKS, NUM_RETURNS)
         for track in range(NUM_TRACKS):
             strip = self._mixer.channel_strip(track)
             strip.name = 'Channel_Strip_' + str(track)
             # encoder = EncoderElement(MIDI_CC_TYPE, 0, 20 + track, Live.MidiMap.MapMode.absolute)
             control = SliderElement(MIDI_CC_TYPE, 0, 20+track)
             control.name = str(track) + '_Volume_Control'
             strip.set_volume_control(control)
         for track in range(NUM_RETURNS):
             strip = self._mixer.return_strip(track)
             control = SliderElement(MIDI_CC_TYPE, 0, 40+track)
             control.name = str(track) + '_Return_Control'
             strip.set_volume_control(control)
         strip = self._mixer.master_strip()
         strip.name = 'Master_Channel_Strip'
         control = SliderElement(MIDI_CC_TYPE, 0, 50)
         control.name = 'Master_Volume_Control'
         strip.set_volume_control(control)
         self._session.set_offsets(0, 0);
         self._session.set_mixer(self._mixer)
         for row in range(NUM_ROWS):
             scene = self._session.scene(row)
             for track in range(NUM_TRACKS):
                 slot = scene.clip_slot(track)
                 button = ButtonElement(True, MIDI_NOTE_TYPE, track, 36+row)
                 slot.set_launch_button(button)
         self.set_highlighting_session_component(self._session)
         self.request_rebuild_midi_map()
         self.log_message("Midilooper initialized.")
开发者ID:imclab,项目名称:midilooper,代码行数:40,代码来源:midilooper.py

示例9: _load_MIDI_map

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
 def _load_MIDI_map(self):
     is_momentary = True
     for note in range(128):
         button = ButtonElement(is_momentary, MESSAGETYPE, BUTTONCHANNEL, note)
         button.name = 'Note_' + str(note)
         self._note_map.append(button)
     self._note_map.append(None) #add None to the end of the list, selectable with [-1]
     if MESSAGETYPE == MIDI_CC_TYPE and BUTTONCHANNEL == SLIDERCHANNEL:
         for ctrl in range(128):
             self._ctrl_map.append(None)
     else:
         for ctrl in range(128):
             control = SliderElement(MIDI_CC_TYPE, SLIDERCHANNEL, ctrl)
             control.name = 'Ctrl_' + str(ctrl)
             self._ctrl_map.append(control)
         self._ctrl_map.append(None)
开发者ID:ajasver,项目名称:MidiScripts,代码行数:18,代码来源:FCB1020.py

示例10: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
	def _setup_mixer_control(self):
		is_momentary = True # We use non-latching buttons (keys) throughout, so we'll set this as a constant
		num_tracks = 4 # Here we define the mixer width in tracks (a mixer has only one dimension)
		global mixer # We want to instantiate the global mixer as a MixerComponent object (it was a global "None" type up until now...)
		mixer = MixerComponent(num_tracks, 2, with_eqs=True, with_filters=False) #(num_tracks, num_returns, with_eqs, with_filters)
		mixer.set_track_offset(0) #Sets start point for mixer strip (offset from left)
		"""set up the mixer buttons"""		  
		self.song().view.selected_track = mixer.channel_strip(0)._track
		#mute_notes = [1,5,9,13]
		#solo_notes = [2,6,10,14]
		#arm_notes = [3,7,11,15]
		track_select_notes = [38,39,40,41]#more note numbers need to be added if num_scenes is increased
		send_ccs = [2,6,10,14,1,5,9,13]
		pan_ccs = [3,7,11,15]
		slider_ccs = [4,8,12,16]
		for index in range(num_tracks):
			mixer.channel_strip(index).set_select_button(ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHAN, track_select_notes[index]))
			mixer.channel_strip(index).set_volume_control(SliderElement(MIDI_CC_TYPE, CHAN, slider_ccs[index]))
			mixer.channel_strip(index).set_pan_control(EncoderElement(MIDI_CC_TYPE, CHAN, pan_ccs[index], Live.MidiMap.MapMode.absolute))
			#put send A and send B controllers into an array, which is then "tupled" for set_send_controls:
			send_controlers = [EncoderElement(MIDI_CC_TYPE, CHAN, send_ccs[index], Live.MidiMap.MapMode.absolute), EncoderElement(MIDI_CC_TYPE, CHAN, send_ccs[index+num_tracks], Live.MidiMap.MapMode.absolute)]
			mixer.channel_strip(index).set_send_controls(tuple(send_controlers))
		
		crossfader = SliderElement(MIDI_CC_TYPE, CHAN, 28)
		master_volume_control = SliderElement(MIDI_CC_TYPE, CHAN, 32)
		returna_pan_control = SliderElement(MIDI_CC_TYPE, CHAN, 19)
		returna_volume_control = SliderElement(MIDI_CC_TYPE, CHAN, 20)
		returnb_pan_control = SliderElement(MIDI_CC_TYPE, CHAN, 23)
		returnb_volume_control = SliderElement(MIDI_CC_TYPE, CHAN, 24)
		master_select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, CHAN, 31)
		prehear_control = EncoderElement(MIDI_CC_TYPE, CHAN, 30, Live.MidiMap.MapMode.absolute)
		crossfader.name = 'Crossfader'
		master_volume_control.name = 'Master_Volume_Control'
		returna_pan_control.name = 'ReturnA_Pan_Control'
		returna_volume_control.name = 'ReturnA_Volume_Control'
		returnb_pan_control.name = 'ReturnB_Pan_Control'
		returnb_volume_control.name = 'ReturnB_Volume_Control'
		master_select_button.name = 'Master_Select_Button'
		prehear_control.name = 'Prehear_Volume_Control'
		mixer.set_crossfader_control(crossfader)
		mixer.master_strip().set_volume_control(master_volume_control)
		mixer.master_strip().set_select_button(master_select_button)
		mixer.set_prehear_volume_control(prehear_control)
		mixer.return_strip(0).set_pan_control(returna_pan_control)
		mixer.return_strip(0).set_volume_control(returna_volume_control)
		mixer.return_strip(1).set_pan_control(returnb_pan_control)
		mixer.return_strip(1).set_volume_control(returnb_volume_control)
开发者ID:Adamdma,项目名称:monomodular,代码行数:49,代码来源:code.py

示例11: _load_MIDI_map

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
 def _load_MIDI_map(self):
     is_momentary = True
     rgb_skin = make_rgb_skin()
     for note in range(128):
         button = ButtonElement(is_momentary, MESSAGETYPE, BUTTONCHANNEL, note,)
         button.name = 'Button Note_' + str(note)
         button.is_rgb = True
         self._note_map.append(button)
     self._note_map.append(None) #add None to the end of the list, selectable with [-1]
     
     for note in range(128):
         clip_button = ColorButtonElement(self.log_message,is_momentary, MESSAGETYPE, BUTTONCHANNEL, note, skin = rgb_skin)
         clip_button.name = 'Clip Note_' + str(note)
         button.num_delayed_messages = 3
         self._clip_map.append(clip_button)
     self._clip_map.append(None) #add None
     
     if MESSAGETYPE == MIDI_CC_TYPE and BUTTONCHANNEL == SLIDERCHANNEL:
         for i in range(128):
             self._ctrl_map.append(None)
             self._enc_map.append(None)
     else:
         for ctrl in range(128):
             control = SliderElement(MIDI_CC_TYPE, SLIDERCHANNEL, ctrl)
             control.name = 'Ctrl_' + str(ctrl)
             self._ctrl_map.append(control)
         self._ctrl_map.append(None)
         
         for enc in range(128):
             encoder = EncoderElement(MIDI_CC_TYPE, SLIDERCHANNEL, enc, Live.MidiMap.MapMode.absolute)
             encoder.name = "Encoder_" + str(enc)
             self._enc_map.append(encoder)
         self._enc_map.append(None)
         
     self.log_message('Note Map: %s' % self._note_map)
     self.log_message('Ctrl Map: %s' % self._ctrl_map)
     self.log_message('Enc Map: %s' % self._enc_map)
开发者ID:ajasver,项目名称:MidiScripts,代码行数:39,代码来源:X1MK2.py

示例12: make_slider

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
def make_slider(cc_no, name):
    slider = SliderElement(MIDI_CC_TYPE, 0, cc_no)
    slider.set_feedback_delay(-1)
    slider.name = name
    return slider
开发者ID:paxten,项目名称:AbletonLive9_RemoteScripts,代码行数:7,代码来源:Launchkey.py

示例13: make_slider

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
def make_slider(channel, cc, name):
    element = SliderElement(MIDI_CC_TYPE, channel, cc)
    element.name = name
    return element
开发者ID:cce,项目名称:buttons,代码行数:6,代码来源:KeyPad.py

示例14: _setup_mixer_control

# 需要导入模块: from _Framework.SliderElement import SliderElement [as 别名]
# 或者: from _Framework.SliderElement.SliderElement import name [as 别名]
    def _setup_mixer_control(self):
        is_momentary = True
        self._mixer = SpecialMixerComponent(self, 8)
        self._mixer.name = 'Mixer'
        self._mixer.master_strip().name = 'Master_Channel_Strip'
        master_select_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, 0, 80)
        master_select_button.name = 'Master_Select_Button'
        self._mixer.master_strip().set_select_button(master_select_button)
        self._mixer.selected_strip().name = 'Selected_Channel_Strip'
        select_buttons = []
        arm_buttons = []
        solo_buttons = []
        mute_buttons = []
        sliders = []     
        for track in range(8):
            strip = self._mixer.channel_strip(track)
            strip.name = 'Channel_Strip_' + str(track)
            solo_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 49)
            solo_buttons.append(solo_button)
            mute_button = ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 50)
            mute_buttons.append(mute_button)
            solo_button.name = str(track) + '_Solo_Button'
            mute_button.name = str(track) + '_Mute_Button'
            strip.set_solo_button(solo_button)
            strip.set_mute_button(mute_button)
            strip.set_shift_button(self._shift_button)
            strip.set_invert_mute_feedback(True)
            select_buttons.append(ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 51))
            select_buttons[-1].name = str(track) + '_Select_Button'          
            arm_buttons.append(ButtonElement(is_momentary, MIDI_NOTE_TYPE, track, 48))
            arm_buttons[-1].name = str(track) + '_Arm_Button'
            sliders.append(SliderElement(MIDI_CC_TYPE, track, 7))
            sliders[-1].name = str(track) + '_Volume_Control'

        self._crossfader = SliderElement(MIDI_CC_TYPE, 0, 15)
        master_volume_control = SliderElement(MIDI_CC_TYPE, 0, 14)
        self._prehear_control = EncoderElement(MIDI_CC_TYPE, 0, 47, Live.MidiMap.MapMode.relative_two_compliment)
        self._crossfader.name = 'Crossfader'
        master_volume_control.name = 'Master_Volume_Control'
        self._prehear_control.name = 'Prehear_Volume_Control'
        self._mixer.set_shift_button(self._shift_button)
        self._mixer.set_crossfader_control(self._crossfader)
        self._mixer.set_prehear_volume_control(self._prehear_control)
        self._mixer.master_strip().set_volume_control(master_volume_control)
        self._slider_modes = SliderModesComponent(self._mixer, tuple(sliders))
        self._slider_modes.name = 'Slider_Modes'
        self._matrix_modes = MatrixModesComponent(self._matrix, self._session, self._session_zoom, tuple(self._track_stop_buttons), self)
        self._matrix_modes.name = 'Matrix_Modes'
        self._sequencer = StepSequencerComponent(self, self._session, self._matrix, tuple(self._track_stop_buttons))
        self._sequencer.set_bank_buttons(tuple(select_buttons))
        self._sequencer.set_nav_buttons(self._up_button, self._down_button, self._left_button, self._right_button)
        self._sequencer.set_button_matrix(self._matrix)
        self._sequencer.set_follow_button(master_select_button)
        self._sequencer.set_velocity_buttons(tuple(arm_buttons))
        self._sequencer.set_shift_button(self._shift_button)
        self._sequencer.set_lane_mute_buttons(tuple(self._scene_launch_buttons))
        self._sequencer.set_loop_start_buttons(tuple(mute_buttons))
        self._sequencer.set_loop_length_buttons(tuple(solo_buttons))
        self._shift_modes = ShiftableSelectorComponent(self, tuple(select_buttons), master_select_button, tuple(self._track_stop_buttons), self._stop_all_button, tuple(mute_buttons), tuple(solo_buttons), tuple(arm_buttons), tuple(self._scene_launch_buttons), self._matrix, self._session, self._session_zoom, self._mixer, self._slider_modes, self._matrix_modes, self._sequencer)
        self._shift_modes.name = 'Shift_Modes'
        self._shift_modes.set_mode_toggle(self._shift_button)
开发者ID:SquarewaveMultimedia,项目名称:APC_64_40_9,代码行数:63,代码来源:APC_64_40_9_vu.py


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