本文整理汇总了Python中SpecialMixerComponent.SpecialMixerComponent.set_strip_mute_solo_buttons方法的典型用法代码示例。如果您正苦于以下问题:Python SpecialMixerComponent.set_strip_mute_solo_buttons方法的具体用法?Python SpecialMixerComponent.set_strip_mute_solo_buttons怎么用?Python SpecialMixerComponent.set_strip_mute_solo_buttons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpecialMixerComponent.SpecialMixerComponent
的用法示例。
在下文中一共展示了SpecialMixerComponent.set_strip_mute_solo_buttons方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Novation_Impulse
# 需要导入模块: from SpecialMixerComponent import SpecialMixerComponent [as 别名]
# 或者: from SpecialMixerComponent.SpecialMixerComponent import set_strip_mute_solo_buttons [as 别名]
#.........这里部分代码省略.........
self._display_reset_delay -= 1
if self._display_reset_delay == -1:
self._show_current_track_name()
def _setup_mixer(self):
mute_solo_flip_button = ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 34)
self._next_nav_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 37)
self._prev_nav_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 38)
self._strip_buttons = []
mute_solo_flip_button.name = 'Mute_Solo_Flip_Button'
self._next_nav_button.name = 'Next_Track_Button'
self._prev_nav_button.name = 'Prev_Track_Button'
self._mixer = SpecialMixerComponent(8)
self._mixer.name = 'Mixer'
self._mixer.set_select_buttons(self._next_nav_button, self._prev_nav_button)
self._mixer.selected_strip().name = 'Selected_Channel_Strip'
self._mixer.master_strip().name = 'Master_Channel_Strip'
self._mixer.master_strip().set_volume_control(self._master_slider)
self._sliders = []
for index in range(8):
strip = self._mixer.channel_strip(index)
strip.name = 'Channel_Strip_' + str(index)
strip.set_invert_mute_feedback(True)
self._sliders.append(SliderElement(MIDI_CC_TYPE, 0, index))
self._sliders[-1].name = str(index) + '_Volume_Control'
self._sliders[-1].set_feedback_delay(-1)
self._sliders[-1].add_value_listener(self._slider_value, identify_sender=True)
strip.set_volume_control(self._sliders[-1])
self._strip_buttons.append(ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 9 + index))
self._strip_buttons[-1].name = str(index) + '_Mute_Button'
self._strip_buttons[-1].add_value_listener(self._mixer_button_value, identify_sender=True)
self._mixer.master_strip().set_mute_button(ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 1, 17))
self._mixer.set_strip_mute_solo_buttons(tuple(self._strip_buttons), mute_solo_flip_button)
def _setup_session(self):
num_pads = len(PAD_TRANSLATIONS)
self._track_left_button = ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 36)
self._track_right_button = ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 35)
self._session = SessionComponent(8, 0)
self._session.name = 'Session_Control'
self._session.selected_scene().name = 'Selected_Scene'
self._session.set_mixer(self._mixer)
self._session.set_page_left_button(self._track_left_button)
self._session.set_page_right_button(self._track_right_button)
pads = []
for index in range(num_pads):
pads.append(ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 60 + index))
pads[-1].name = 'Pad_' + str(index)
clip_slot = self._session.selected_scene().clip_slot(index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.set_launch_button(pads[-1])
clip_slot.name = str(index) + '_Selected_Clip_Slot'
def _setup_transport(self):
rwd_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 27)
ffwd_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 28)
stop_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 29)
play_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 30)
loop_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 31)
rec_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 32)
ffwd_button.name = 'FFwd_Button'
示例2: Launchkey
# 需要导入模块: from SpecialMixerComponent import SpecialMixerComponent [as 别名]
# 或者: from SpecialMixerComponent.SpecialMixerComponent import set_strip_mute_solo_buttons [as 别名]
class Launchkey(ControlSurface):
""" Script for Novation's Launchkey 25/49/61 keyboards """
def __init__(self, c_instance):
ControlSurface.__init__(self, c_instance)
with self.component_guard():
self.set_pad_translations(PAD_TRANSLATIONS)
self._device_selection_follows_track_selection = True
self._suggested_input_port = "Launchkey InControl"
self._suggested_output_port = "Launchkey InControl"
self._has_sliders = True
self._current_midi_map = None
self._master_slider = make_slider(7, "Master_Volume_Control")
self._modes_buttons = []
for index in range(3):
button = ButtonElement(IS_MOMENTARY, MIDI_NOTE_TYPE, 0, 13 + index)
self._modes_buttons.append(button)
self._modes_buttons[-1].add_value_listener(self._dummy_listener)
self._setup_mixer()
self._setup_session()
self._setup_transport()
self._setup_device()
for component in self.components:
component.set_enabled(False)
def refresh_state(self):
ControlSurface.refresh_state(self)
self.schedule_message(2, self._send_midi, LIVE_MODE_ON)
self.schedule_message(3, self._send_midi, SIZE_QUERY)
def handle_sysex(self, midi_bytes):
if midi_bytes[0:11] == SIZE_RESPONSE:
self._has_sliders = midi_bytes[11] != 48
self._send_midi(LED_FLASHING_ON)
self._update_mixer_offset()
for control in self.controls:
if isinstance(control, InputControlElement):
control.clear_send_cache()
for component in self.components:
component.set_enabled(True)
if self._has_sliders:
self._mixer.master_strip().set_volume_control(self._master_slider)
self._mixer.update()
else:
self._mixer.master_strip().set_volume_control(None)
for index in range(len(self._sliders)):
self._mixer.channel_strip(index).set_volume_control(None)
self._mixer.channel_strip(index).set_mute_button(None)
slider = self._sliders[index]
slider.release_parameter()
self._mixer.selected_strip().set_volume_control(self._master_slider)
self.request_rebuild_midi_map()
def disconnect(self):
ControlSurface.disconnect(self)
for button in self._modes_buttons:
if button.value_has_listener(self._dummy_listener):
button.remove_value_listener(self._dummy_listener)
self._modes_buttons = None
self._encoders = None
self._sliders = None
self._strip_buttons = None
self._master_slider = None
self._current_midi_map = None
self._transport_view_modes = None
self._send_midi(LED_FLASHING_OFF)
self._send_midi(LIVE_MODE_OFF)
def build_midi_map(self, midi_map_handle):
self._current_midi_map = midi_map_handle
ControlSurface.build_midi_map(self, midi_map_handle)
def _setup_mixer(self):
self._next_nav_button = make_button(103, "Next_Track_Button")
self._prev_nav_button = make_button(102, "Prev_Track_Button")
mute_solo_flip_button = make_button(59, "Master_Button")
self._mixer = SpecialMixerComponent(8)
self._mixer.name = "Mixer"
self._mixer.set_select_buttons(self._next_nav_button, self._prev_nav_button)
self._mixer.selected_strip().name = "Selected_Channel_Strip"
self._mixer.master_strip().name = "Master_Channel_Strip"
self._mixer.master_strip().set_volume_control(self._master_slider)
self._sliders = []
self._strip_buttons = []
for index in range(8):
strip = self._mixer.channel_strip(index)
strip.name = "Channel_Strip_" + str(index)
strip.set_invert_mute_feedback(True)
self._sliders.append(make_slider(41 + index, "Volume_Control_%d" % index))
strip.set_volume_control(self._sliders[-1])
self._strip_buttons.append(make_button(51 + index, "Mute_Button_%d" % index))
self._mixer.set_strip_mute_solo_buttons(tuple(self._strip_buttons), mute_solo_flip_button)
def _setup_session(self):
#.........这里部分代码省略.........
示例3: Novation_Impulse2
# 需要导入模块: from SpecialMixerComponent import SpecialMixerComponent [as 别名]
# 或者: from SpecialMixerComponent.SpecialMixerComponent import set_strip_mute_solo_buttons [as 别名]
#.........这里部分代码省略.........
if self._display_reset_delay == -1:
self._show_current_track_name()
def _setup_mixer(self):
self.log('setup mixer')
mute_solo_flip_button = ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 34)
self._next_nav_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 37)
self._prev_nav_button = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 38)
self._strip_buttons = []
mute_solo_flip_button.name = 'Mute_Solo_Flip_Button'
self._next_nav_button.name = 'Next_Track_Button'
self._prev_nav_button.name = 'Prev_Track_Button'
self._mixer = SpecialMixerComponent(self, 8, self.c_instance)
self._mixer.name = 'Mixer'
self._mixer.set_select_buttons(self._next_nav_button, self._prev_nav_button)
self._mixer.selected_strip().name = 'Selected_Channel_Strip'
self._mixer.master_strip().name = 'Master_Channel_Strip'
self._mixer.master_strip().set_volume_control(self._master_slider)
self._sliders = []
for index in range(8):
strip = self._mixer.channel_strip(index)
strip.name = 'Channel_Strip_' + str(index)
strip.set_invert_mute_feedback(True)
self._sliders.append(SliderElement(MIDI_CC_TYPE, 0, index))
self._sliders[-1].name = str(index) + '_Volume_Control'
self._sliders[-1].set_feedback_delay(-1)
self._sliders[-1].add_value_listener(self._slider_value, identify_sender=True)
strip.set_volume_control(self._sliders[-1])
self._strip_buttons.append(ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 9 + index))
self._strip_buttons[-1].name = str(index) + '_Mute_Button'
self._strip_buttons[-1].add_value_listener(self._mixer_button_value, identify_sender=True)
self._mixer.master_strip().set_mute_button(ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 1, 17))
self._mixer.set_strip_mute_solo_buttons(tuple(self._strip_buttons), mute_solo_flip_button)
#self._mixer.set_shift_button(self._shift_button)
self._mixer.updateMixerButtons()
self._button9 = ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 9 + 8)
def _setup_session(self):
num_pads = len(PAD_TRANSLATIONS)
self._session = SessionComponent(8, 0)
self._session.name = 'Session_Control'
self._session.selected_scene().name = 'Selected_Scene'
self._session.set_mixer(self._mixer)
# for ableton 9.1.1 and lower
#self._session.set_track_banking_increment(num_pads)
#self._session.set_track_bank_buttons(ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 35), ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 36))
# for ableton 9.1.1 and higher
self._track_left_button = ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 36)
self._track_right_button = ButtonElement(not IS_MOMENTARY, MIDI_CC_TYPE, 0, 35)
self._session.set_page_left_button(self._track_left_button)
self._session.set_page_right_button(self._track_right_button)
pads = []
for index in range(num_pads):
pads.append(ButtonElement(IS_MOMENTARY, MIDI_CC_TYPE, 0, 60 + index))
pads[-1].name = 'Pad_' + str(index)
clip_slot = self._session.selected_scene().clip_slot(index)
clip_slot.set_triggered_to_play_value(GREEN_BLINK)
clip_slot.set_triggered_to_record_value(RED_BLINK)
clip_slot.set_stopped_value(AMBER_FULL)
clip_slot.set_started_value(GREEN_FULL)
clip_slot.set_recording_value(RED_FULL)
clip_slot.set_launch_button(pads[-1])
clip_slot.name = str(index) + '_Selected_Clip_Slot'