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


Python ModesComponent.selected_mode方法代码示例

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


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

示例1: _create_global_control

# 需要导入模块: from _Framework.ModesComponent import ModesComponent [as 别名]
# 或者: from _Framework.ModesComponent.ModesComponent import selected_mode [as 别名]
    def _create_global_control(self):

        def set_pan_controls():
            for index, control in enumerate(self._global_param_controls):
                self._mixer.channel_strip(index).set_pan_control(control)
                self._mixer.channel_strip(index).set_send_controls((None, None, None))
                control.set_channel(0)

            return None

        def set_send_controls(send_index):
            for index, control in enumerate(self._global_param_controls):
                self._mixer.channel_strip(index).set_pan_control(None)
                send_controls = [None] * 3
                send_controls[send_index] = control
                self._mixer.channel_strip(index).set_send_controls(send_controls)
                control.set_channel(send_index + 1)

            return

        encoder_modes = ModesComponent(name='Track_Control_Modes', is_enabled=False)
        encoder_modes.add_mode('pan', [set_pan_controls])
        encoder_modes.add_mode('send_a', [partial(set_send_controls, 0)])
        encoder_modes.add_mode('send_b', [partial(set_send_controls, 1)])
        encoder_modes.add_mode('send_c', [partial(set_send_controls, 2)])
        encoder_modes.selected_mode = 'pan'
        encoder_modes.layer = Layer(pan_button=self._global_bank_buttons[0], send_a_button=self._global_bank_buttons[1], send_b_button=self._global_bank_buttons[2], send_c_button=self._global_bank_buttons[3])
        self._translation_selector = ChannelTranslationSelector(name='Global_Translations')
开发者ID:rstets,项目名称:AbletonLive9_RemoteScripts,代码行数:30,代码来源:APC40.py

示例2: _create_step_button_modes

# 需要导入模块: from _Framework.ModesComponent import ModesComponent [as 别名]
# 或者: from _Framework.ModesComponent.ModesComponent import selected_mode [as 别名]
 def _create_step_button_modes(self):
     matrix_modes = ModesComponent(name='Step_Button_Modes')
     clip_mode = AddLayerMode(self._session, Layer(clip_launch_buttons=self._step_buttons, stop_track_clip_buttons=self._modified_step_buttons))
     scene_mode = AddLayerMode(self._session, Layer(scene_launch_buttons=self._step_buttons))
     matrix_modes.add_mode('clip', clip_mode)
     matrix_modes.add_mode('scene', scene_mode)
     matrix_modes.layer = Layer(clip_button=self._recall_button, scene_button=self._store_button)
     matrix_modes.selected_mode = 'clip'
     return matrix_modes
开发者ID:AkiSyndicat,项目名称:AbletonLive9_RemoteScripts,代码行数:11,代码来源:RolandMX1.py

示例3: _create_track_button_modes

# 需要导入模块: from _Framework.ModesComponent import ModesComponent [as 别名]
# 或者: from _Framework.ModesComponent.ModesComponent import selected_mode [as 别名]
 def _create_track_button_modes(self):
     track_button_modes = ModesComponent(name='Track Button Modes', is_enabled=False)
     select_button_matrix = self.wrap_matrix(self._select_buttons)
     track_button_modes.add_mode('clip_stop', AddLayerMode(self._session, Layer(stop_track_clip_buttons=select_button_matrix)))
     track_button_modes.add_mode('solo', AddLayerMode(self._mixer, layer=Layer(solo_buttons=select_button_matrix)))
     track_button_modes.add_mode('arm', AddLayerMode(self._mixer, layer=Layer(arm_buttons=select_button_matrix)))
     track_button_modes.add_mode('mute', AddLayerMode(self._mixer, layer=Layer(mute_buttons=select_button_matrix)))
     track_button_modes.add_mode('select', AddLayerMode(self._mixer, layer=Layer(track_select_buttons=select_button_matrix)))
     track_button_modes.selected_mode = 'clip_stop'
     track_button_modes.layer = Layer(clip_stop_button=self._stop_button, solo_button=self._solo_button, arm_button=self._arm_button, mute_button=self._mute_button, select_button=self._select_button)
开发者ID:rstets,项目名称:AbletonLive9_RemoteScripts,代码行数:12,代码来源:APC_Key_25.py

示例4: _create_encoder_modes

# 需要导入模块: from _Framework.ModesComponent import ModesComponent [as 别名]
# 或者: from _Framework.ModesComponent.ModesComponent import selected_mode [as 别名]
 def _create_encoder_modes(self):
     knob_modes = ModesComponent(name='Knob Modes', is_enabled=False)
     parameter_knobs_matrix = self.wrap_matrix(self._parameter_knobs)
     knob_modes.add_mode('volume', AddLayerMode(self._mixer, Layer(volume_controls=parameter_knobs_matrix)))
     knob_modes.add_mode('pan', AddLayerMode(self._mixer, Layer(pan_controls=parameter_knobs_matrix)))
     knob_modes.add_mode('send', [AddLayerMode(self._mixer, Layer(send_controls=parameter_knobs_matrix)), DelayMode(LayerMode(SendToggleComponent(self._mixer, name='Toggle Send', is_enabled=False), Layer(priority=MODE_PRIORITY, toggle_button=self._send_button)), delay=TIMER_DELAY)])
     knob_modes.add_mode('device', AddLayerMode(self._device, Layer(parameter_controls=parameter_knobs_matrix)))
     knob_modes.selected_mode = 'volume'
     knob_modes.layer = Layer(volume_button=self._volume_button, pan_button=self._pan_button, send_button=self._send_button, device_button=self._device_button)
     knob_modes.layer.priority = MODE_PRIORITY
开发者ID:rstets,项目名称:AbletonLive9_RemoteScripts,代码行数:12,代码来源:APC_Key_25.py

示例5: _create_encoder_modes

# 需要导入模块: from _Framework.ModesComponent import ModesComponent [as 别名]
# 或者: from _Framework.ModesComponent.ModesComponent import selected_mode [as 别名]
 def _create_encoder_modes(self):
     knob_modes = ModesComponent(name='Knob Modes', is_enabled=False)
     parameter_knobs_matrix = self.wrap_matrix(self._parameter_knobs)
     send_toggle_component = SendToggleComponent(self._mixer, name='Toggle Send', is_enabled=False, layer=Layer(toggle_button=self._send_button, priority=1))
     knob_modes.add_mode('volume', AddLayerMode(self._mixer, Layer(volume_controls=parameter_knobs_matrix)))
     knob_modes.add_mode('pan', AddLayerMode(self._mixer, Layer(pan_controls=parameter_knobs_matrix)))
     knob_modes.add_mode('send', [AddLayerMode(self._mixer, Layer(send_controls=parameter_knobs_matrix)), send_toggle_component])
     knob_modes.add_mode('device', AddLayerMode(self._device, Layer(parameter_controls=parameter_knobs_matrix)))
     knob_modes.selected_mode = 'volume'
     knob_modes.layer = Layer(volume_button=self._volume_button, pan_button=self._pan_button, send_button=self._send_button, device_button=self._device_button)
     return knob_modes
开发者ID:OwenPratt,项目名称:AbletonLive9_RemoteScripts,代码行数:13,代码来源:APC_Key_25.py

示例6: _create_mixer

# 需要导入模块: from _Framework.ModesComponent import ModesComponent [as 别名]
# 或者: from _Framework.ModesComponent.ModesComponent import selected_mode [as 别名]
    def _create_mixer(self):
        mixer = MixerComponent(NUM_TRACKS, is_enabled=True, auto_name=True)
        mixer.layer = Layer(track_select_buttons=self._select_buttons, send_controls=self._send_encoders, next_sends_button=self._down_button, prev_sends_button=self._up_button, pan_controls=self._pan_device_encoders, volume_controls=self._volume_faders, send_lights=self._send_encoder_lights, pan_lights=self._pan_device_encoder_lights)
        mixer.on_send_index_changed = partial(self._show_controlled_sends_message, mixer)
        for channel_strip in map(mixer.channel_strip, xrange(NUM_TRACKS)):
            channel_strip.empty_color = 'Mixer.NoTrack'

        mixer_modes = ModesComponent()
        mixer_modes.add_mode('mute', [AddLayerMode(mixer, Layer(mute_buttons=self._state_buttons))])
        mixer_modes.add_mode('solo', [AddLayerMode(mixer, Layer(solo_buttons=self._state_buttons))])
        mixer_modes.add_mode('arm', [AddLayerMode(mixer, Layer(arm_buttons=self._state_buttons))])
        mixer_modes.layer = Layer(mute_button=self._mute_mode_button, solo_button=self._solo_mode_button, arm_button=self._arm_mode_button)
        mixer_modes.selected_mode = 'mute'
        return mixer
开发者ID:AkiSyndicat,项目名称:AbletonLive9_RemoteScripts,代码行数:16,代码来源:LaunchControlXL.py

示例7: _create_track_button_modes

# 需要导入模块: from _Framework.ModesComponent import ModesComponent [as 别名]
# 或者: from _Framework.ModesComponent.ModesComponent import selected_mode [as 别名]
 def _create_track_button_modes(self):
     track_button_modes = ModesComponent(name="Track Button Modes", is_enabled=False)
     select_button_matrix = self.wrap_matrix(self._select_buttons)
     track_button_modes.add_mode(
         "clip_stop", AddLayerMode(self._session, Layer(stop_track_clip_buttons=select_button_matrix))
     )
     track_button_modes.add_mode("solo", AddLayerMode(self._mixer, layer=Layer(solo_buttons=select_button_matrix)))
     track_button_modes.add_mode("arm", AddLayerMode(self._mixer, layer=Layer(arm_buttons=select_button_matrix)))
     track_button_modes.add_mode("mute", AddLayerMode(self._mixer, layer=Layer(mute_buttons=select_button_matrix)))
     track_button_modes.add_mode(
         "select", AddLayerMode(self._mixer, layer=Layer(track_select_buttons=select_button_matrix))
     )
     track_button_modes.selected_mode = "clip_stop"
     track_button_modes.layer = Layer(
         clip_stop_button=self._stop_button,
         solo_button=self._solo_button,
         arm_button=self._arm_button,
         mute_button=self._mute_button,
         select_button=self._select_button,
     )
     return track_button_modes
开发者ID:k100094,项目名称:AbletonLive9_RemoteScripts,代码行数:23,代码来源:APC_Key_25.py


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